Skip to content
tsgshPublic

About

Python program to set the modification time of image files to match timestamps stored in EXIF tags (requires exiftool)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

exifdate

Python program to set the modification time of image files to match timestamps stored in EXIF tags (requires exiftool)

usage: exifdata [-h] [-E EXIFTOOL] [-n] [-v | -c | -q] [-O | -C | -M | -t METADATA_TAG] [-R] [-L |
                -P] [-e EXTENSIONS] [-D THRESHOLD_DAYS]
                [-H {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}] [-V]
                [PATH ...]

Set the modified date and time of a JPEG file or all files in a directory to the time and date
specified by the "DateTime Original", "ChangeDate" or "ModifyDate" tags in the EXIF metadata.

positional arguments:
  PATH                  One or more files or directories to process (default: None)

options:
  -h, --help            show this help message and exit
  -E, --exiftool EXIFTOOL
                        path to the exiftool binary (default: /usr/bin/exiftool)
  -n, --dry-run         do not make changes to files Running exifdate with only the -n option can
                        be used to find files that will fail (e.g. because they are missing the
                        EXIF tag) (default: False)
  -v, --verbose         output a diagnostic for every file processed (default: False)
  -c, --changes         report when a change is made (default: False)
  -q, --quiet, --silent
                        suppress most error messages (default: False)
  -O, --original-date   Set the modify date of the file to the value of the "DateTime Original"
                        metadata tag (default: DateTimeOriginal)
  -C, --create-date     Set the modify date of the file to the value of the "CreateDate" metadata
                        tag
  -M, --modify-date     Set the modify date of the file to the value of the "ModifyDate" metadata
                        tag
  -t, --metadata-tag METADATA_TAG
                        Set the modify date of the file to the value of METADATA_TAG
  -R, --recursive       operate on files and directories recursively (default: False)
  -L, --dereference     affect the referent of each symbolic link rather than the symbolic link
                        itself (default: False)
  -P, --no-dereference  change the timestamp of each symbolic file link rather than the referent
                        of the symbolic link (directories are always dereferenced) (default: True)
  -e, --extensions EXTENSIONS
                        Specify the file extensios to be processed as a comma-separated list of
                        strings: any file that does not end in a dot followed by one of the
                        strings will not be processed If --dereference is specified, the list of
                        extensions applies to the target of the symlink; the extension of the
                        symlink iteslf is not tested. (default: jpg,JPG,jpeg,JPEG)
  -D, --threshold-days THRESHOLD_DAYS
                        A lower limit on the number of days absolute difference between the file
                        timestamp and the metadata timestamp. If the difference is less than this
                        then the file timestamp will not be modified. If --threshold-days and
                        --threshold-hours are both specified, then the threshold is the
                        combination of the two, eg. 4 days, 12 hours. (default: 0)
  -H, --threshold-hours {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}
                        A lower limit on the number of hours absolute difference between the file
                        timestamp and the metadata timestamp. If the difference is less than this
                        then the file timestamp will not be modified. If --threshold-days and
                        --threshold-hours are both specified, then the threshold is the
                        combination of the two, eg. 4 days, 12 hours. (default: 0)
  -V, --version         show program's version number and exit

Requires the exiftool package to be installed.

About

Python program to set the modification time of image files to match timestamps stored in EXIF tags (requires exiftool)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages