Fixed octal issue

This commit is contained in:
Morgan Hardwood
2015-08-23 22:47:01 +02:00
parent 7f60ed65c2
commit b22b8582b0
2 changed files with 9 additions and 11 deletions

View File

@@ -1054,15 +1054,15 @@ class SALensID2Interpreter : public IntLensInterpreter< int >
public:
SALensID2Interpreter ()
{
choices.insert(p_t(00000, "Unknown E-mount lens or other lens"));
choices.insert(p_t(00001, "Sony LA-EA1 Adapter"));
choices.insert(p_t(00002, "Sony LA-EA2 Adapter"));
choices.insert(p_t(00003, "Sony LA-EA3 Adapter"));
choices.insert(p_t(00006, "Sony LA-EA4 Adapter"));
choices.insert(p_t(00044, "Metabones Canon EF Smart Adapter"));
choices.insert(p_t(00078, "Metabones Canon EF Smart Adapter Mark III or IV"));
choices.insert(p_t(00234, "Adapter only - no lens attached"));
choices.insert(p_t(00239, "Metabones Canon EF Speed Booster"));
choices.insert(p_t(0, "Unknown E-mount lens or other lens"));
choices.insert(p_t(1, "Sony LA-EA1 Adapter"));
choices.insert(p_t(2, "Sony LA-EA2 Adapter"));
choices.insert(p_t(3, "Sony LA-EA3 Adapter"));
choices.insert(p_t(6, "Sony LA-EA4 Adapter"));
choices.insert(p_t(44, "Metabones Canon EF Smart Adapter"));
choices.insert(p_t(78, "Metabones Canon EF Smart Adapter Mark III or IV"));
choices.insert(p_t(234, "Adapter only - no lens attached"));
choices.insert(p_t(239, "Metabones Canon EF Speed Booster"));
choices.insert(p_t(32784, "Sony E 16mm F2.8"));
choices.insert(p_t(32785, "Sony E 18-55mm F3.5-5.6 OSS"));
choices.insert(p_t(32786, "Sony E 55-210mm F4.5-6.3 OSS"));

View File

@@ -46,8 +46,6 @@ for cam in "${cams[@]}"; do
xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType2']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -sony:all) > "${tmpdir}/cam" || { printf '%s\n' "Saving failed: ${tmpdir}/cam"; exit 1; }
sort -fuV "${tmpdir}/cam" > "${tmpdir}/sony-lenstype2"
rm -f "${tmpdir}/cam"
# Pad IDs shorter than 5 digits with 0s
sed -r -i -e 's/^[0-9]/0000&/' -e 's/0*([0-9]{5,})/\1/' "${tmpdir}/sony-lenstype2"
sed -r -i -e '/255\tTamron Lens (255)/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' ${tmpdir}/sony ${tmpdir}/sony-lenstype2
;;
esac