Ignore:
Timestamp:
2021-02-26T19:39:51+13:00 (3 years ago)
Author:
anupama
Message:

Committing the improvements to EmbeddedMetaPlugin's processing of Keywords vs other metadata fields. Keywords were literally stored as arrays of words rather than phrases in PDFs (at least in Diego's sample PDF), whereas other meta fields like Subjects and Creators stored them as arrays of phrases. To get both to work, Kathy updated EXIF to a newer version, to retrieve the actual EXIF values stored in the PDF. And Kathy and Dr Bainbridge came up with a new option that I added called apply_join_before_split_to_metafields that's a regex which can list the metadata fields to apply the join_before_split to and whcih previously always got applied to all metadata fields. Now it's applied to any *Keywords metafields by default, as that's the metafield we have experience of that behaves differently to the others, as it stores by word instead of phrases. Tested on Diego's sample PDF. Diego has double-checked it to works on his sample PDF too, setting the split char to ; and turning on the join_before_split and leaving apply_join_before_split_to_metafields at its default of .*Keywords. File changes are strings.properties for the tooltip, the plugin introducing the option and working with it and Kathy's EXIF updates affecting cpan/File and cpan/Image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Shortcuts.pm

    r24107 r34921  
    44# Description:  ExifTool shortcut tags
    55#
    6 # Revisions:    02/07/2004 - P. Harvey Moved out of Exif.pm
    7 #               09/15/2004 - P. Harvey Added D70Boring from Greg Troxel
    8 #               01/11/2005 - P. Harvey Added Canon20D from Christian Koller
    9 #               03/03/2005 - P. Harvey Added user defined shortcuts
    10 #               03/26/2005 - P. Harvey Added Nikon from Tom Christiansen
     6# Revisions:    02/07/2004 - PH Moved out of Exif.pm
     7#               09/15/2004 - PH Added D70Boring from Greg Troxel
     8#               01/11/2005 - PH Added Canon20D from Christian Koller
     9#               03/03/2005 - PH Added user defined shortcuts
     10#               03/26/2005 - PH Added Nikon from Tom Christiansen
     11#               02/28/2007 - PH Removed model-dependent shortcuts
     12#                            --> this is what UserDefined::Shortcuts is for
     13#               02/25/2009 - PH Added Unsafe
     14#               07/03/2010 - PH Added CommonIFD0
    1115#------------------------------------------------------------------------------
    1216
     
    1620use vars qw($VERSION);
    1721
    18 $VERSION = '1.41';
     22$VERSION = '1.65';
    1923
    2024# this is a special table used to define command-line shortcuts
     25# (documentation Notes may be added for these via %shortcutNotes in BuildTagLookup.pm)
    2126%Image::ExifTool::Shortcuts::Main = (
    2227    # this shortcut allows the three common date/time tags to be shifted at once
     
    109114    MakerNotes => [
    110115        'MakerNotes',   # (for RIFF MakerNotes)
     116        'MakerNoteApple',
    111117        'MakerNoteCanon',
    112118        'MakerNoteCasio',
    113119        'MakerNoteCasio2',
     120        'MakerNoteDJI',
     121        'MakerNoteFLIR',
    114122        'MakerNoteFujiFilm',
    115123        'MakerNoteGE',
    116124        'MakerNoteGE2',
     125        'MakerNoteHasselblad',
    117126        'MakerNoteHP',
    118127        'MakerNoteHP2',
     
    133142        'MakerNoteKodak8a',
    134143        'MakerNoteKodak8b',
     144        'MakerNoteKodak8c',
    135145        'MakerNoteKodak9',
    136146        'MakerNoteKodak10',
     147        'MakerNoteKodak11',
     148        'MakerNoteKodak12',
    137149        'MakerNoteKodakUnknown',
    138150        'MakerNoteKyocera',
     
    140152        'MakerNoteMinolta2',
    141153        'MakerNoteMinolta3',
     154        'MakerNoteMotorola',
    142155        'MakerNoteNikon',
    143156        'MakerNoteNikon2',
    144157        'MakerNoteNikon3',
     158        'MakerNoteNintendo',
    145159        'MakerNoteOlympus',
    146160        'MakerNoteOlympus2',
     
    151165        'MakerNoteLeica5',
    152166        'MakerNoteLeica6',
     167        'MakerNoteLeica7',
     168        'MakerNoteLeica8',
     169        'MakerNoteLeica9',
     170        'MakerNoteLeica10',
    153171        'MakerNotePanasonic',
    154172        'MakerNotePanasonic2',
     173        'MakerNotePanasonic3',
    155174        'MakerNotePentax',
    156175        'MakerNotePentax2',
     
    158177        'MakerNotePentax4',
    159178        'MakerNotePentax5',
     179        'MakerNotePentax6',
    160180        'MakerNotePhaseOne',
    161181        'MakerNoteReconyx',
     182        'MakerNoteReconyx2',
     183        'MakerNoteReconyx3',
    162184        'MakerNoteRicoh',
     185        'MakerNoteRicoh2',
     186        'MakerNoteRicohPentax',
    163187        'MakerNoteRicohText',
    164188        'MakerNoteSamsung1a',
     
    173197        'MakerNoteSony3',
    174198        'MakerNoteSony4',
     199        'MakerNoteSony5',
    175200        'MakerNoteSonyEricsson',
    176201        'MakerNoteSonySRF',
    177202        'MakerNoteUnknownText',
     203        'MakerNoteUnknownBinary',
    178204        'MakerNoteUnknown',
    179205    ],
     
    191217        'InteropIFD:RelatedImageHeight',
    192218    ],
     219    # standard tags used to define the color space of an image
     220    # (useful to preserve color space when deleting all meta information)
     221    ColorSpaceTags => [
     222        'ExifIFD:ColorSpace',
     223        'ExifIFD:Gamma',
     224        'InteropIFD:InteropIndex',
     225        'ICC_Profile',
     226    ],
    193227    # common metadata tags found in IFD0 of TIFF images
    194228    CommonIFD0 => [
     
    202236        'IFD0:Copyright',
    203237        # other TIFF tags
    204         'IFD0:Rating', 
     238        'IFD0:Rating',
    205239        'IFD0:RatingPercent',
    206240        'IFD0:DNGLensInfo',
     
    212246        'IFD0:XPKeywords',
    213247        'IFD0:XPSubject',
     248    ],
     249    # large binary data tags which won't be loaded if excluded when extracting
     250    LargeTags => [
     251        'CanonVRD',
     252        'DLOData',
     253        'EXIF',
     254        'ICC_Profile',
     255        'IDCPreviewImage',
     256        'ImageData',
     257        'IPTC',
     258        'JpgFromRaw',
     259        'OriginalRawImage',
     260        'OtherImage',
     261        'PreviewImage',
     262        'ThumbnailImage',
     263        'TIFFPreview',
     264        'XML',
     265        'XMP',
     266        'ZoomedPreviewImage',
     267    ],
     268    'ls-l' => [
     269        'FilePermissions',
     270        'FileHardLinks',
     271        'FileUserID',
     272        'FileGroupID',
     273        'FileSize#',
     274        'FileModifyDate',
     275        'FileName',
    214276    ],
    215277);
     
    274336FocalLengthIn35mmFormat.
    275337
     338The target tag names may contain an optional group name prefix.  A group
     339name applied to the shortcut will be ignored for any target tag with a group
     340name prefix.
     341
    276342=head1 AUTHOR
    277343
    278 Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
     344Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
    279345
    280346This library is free software; you can redistribute it and/or modify it
Note: See TracChangeset for help on using the changeset viewer.