Skip to content

Instantly share code, notes, and snippets.

@kokkytos
Created September 6, 2023 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kokkytos/be88576322aeba9d9a1ab845f2aa33b5 to your computer and use it in GitHub Desktop.
Save kokkytos/be88576322aeba9d9a1ab845f2aa33b5 to your computer and use it in GitHub Desktop.
[Batch edit metadata in pdf] #pdf #metadata #batch #exiftool
#! /usr/bin/env bash
while IFS="," read -r Filename Title Author Subject
do
echo "Filename:$Filename"
echo "Title: $Title"
echo "Author: $Author"
echo "Subject: $Subject"
echo ""
exiftool -Title="$Title" -Author="$Author" -Subject="$Subject" "$Filename"
done < <(tail -n +2 titles.csv)
# CSV file (titles.csv) contents:
#Filename,Title,Author,Subject
#Adelphoi Karamazob - A - Phiontor Ntostogephsku.pdf,Αδελφοί Καραμαζόφ (Α),Fyodor Dostoevsky,Λογοτεχνία
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment