Class exiftool.ExifToolAlpha
This class is for the “experimental” functionality. In the grand scheme of things, this class
contains “not well tested” functionality, methods that are less used, or methods with niche use cases.
In some methods, edge cases on some of these methods may produce unexpected or ambiguous results.
However, if there is increased demand, or robustness improves, functionality may merge into
exiftool.ExifToolHelper
class.
The starting point of this class was to remove all the “less used” functionality that was merged in
on some arbitrary pull requests to the original v0.2 PyExifTool repository. This alpha-quality code is brittle and contains
a lot of “hacks” for a niche set of use cases. As such, it may be buggy and it shouldn’t crowd the core functionality
of the exiftool.ExifTool
class or the stable extended functionality of the exiftool.ExifToolHelper
class
with unneeded bloat.
The class heirarchy: ExifTool -> ExifToolHelper -> ExifToolAlpha
ExifTool - stable base class with CORE functionality
ExifToolHelper - user friendly class that extends the base class with general functionality not found in the core
ExifToolAlpha - alpha-quality code which extends the ExifToolHelper to add functionality that is niche, brittle, or not well tested
Because of this heirarchy, you could always use/extend the exiftool.ExifToolAlpha
class to have all functionality,
or at your discretion, use one of the more stable classes above.
Please issue PR to this class to add functionality, even if not tested well. This class is for experimental code after all!
- param bool auto_start:
Will automatically start the exiftool process on first command run, defaults to True
- param bool check_execute:
Will check the exit status (return code) of all commands. This catches some invalid commands passed to exiftool subprocess, defaults to True. See
check_execute
for more info.- param bool check_tag_names:
Will check the tag names provided to methods which work directly with tag names. This catches unintended uses and bugs, default to True. See
check_tag_names
for more info.- param kwargs:
All other parameters are passed directly to the super-class constructor:
exiftool.ExifTool.__init__()
- exiftool.ExifToolAlpha.copy_tags(from_filename, to_filename)
Copy all tags from one file to another.
- exiftool.ExifToolAlpha.execute_json_wrapper(filenames, params=None, retry_on_error=True)
- exiftool.ExifToolAlpha.get_metadata_batch_wrapper(filenames, params=None)
- exiftool.ExifToolAlpha.get_metadata_wrapper(filename, params=None)
- exiftool.ExifToolAlpha.get_tag(filename, tag)
Extract a single tag from a single file.
The return value is the value of the specified tag, or
None
if this tag was not found in the file.Does existence checks
- exiftool.ExifToolAlpha.get_tag_batch(filenames, tag)
Extract a single tag from the given files.
The first argument is a single tag name, as usual in the format <group>:<tag>.
The second argument is an iterable of file names.
The return value is a list of tag values or
None
for non-existent tags, in the same order asfilenames
.
- exiftool.ExifToolAlpha.get_tag_batch_wrapper(tag, filenames, params=None)
- exiftool.ExifToolAlpha.get_tag_wrapper(tag, filename, params=None)
- exiftool.ExifToolAlpha.get_tags_batch_wrapper(tags, filenames, params=None)
- exiftool.ExifToolAlpha.get_tags_wrapper(tags, filename, params=None)
- exiftool.ExifToolAlpha.set_keywords(filename, mode, keywords)
Modifies the keywords tag for the given file.
This is a convenience function derived from set_keywords_batch(). Only difference is that it takes as last argument only one file name as a string.
- exiftool.ExifToolAlpha.set_keywords_batch(files, mode, keywords)
Modifies the keywords tag for the given files.
The first argument is the operation mode:
KW_REPLACE: Replace (i.e. set) the full keywords tag with keywords.
- KW_ADD: Add keywords to the keywords tag.
If a keyword is present, just keep it.
- KW_REMOVE: Remove keywords from the keywords tag.
If a keyword wasn’t present, just leave it.
The second argument is an iterable of key words.
The third argument is an iterable of file names.
The format of the return value is the same as for
execute()
.It can be passed into check_ok() and format_error().