Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save documentprocessing/f6e27b3c3dae88ba35c8fd4b53f6b1f2 to your computer and use it in GitHub Desktop.
Save documentprocessing/f6e27b3c3dae88ba35c8fd4b53f6b1f2 to your computer and use it in GitHub Desktop.
Set Metadata Tags for a document in Python
from exiftool import ExifToolHelper
from datetime import datetime
with ExifToolHelper() as et:
now = datetime.strftime(datetime.now(), "%Y:%m:%d %H:%M:%S")
et.set_tags(
["rose.jpg", "skyblue.png"],
tags={"DateTimeOriginal": now},
params=["-P", "-overwrite_original"]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment