titlemypdf

titlemypdf is a perl script to change the pdf metadata title to the bibTeX key of a paper (as such it shouldn't be used for pdf files which are not papers in our papers collection).

The need for this script arose when I realised I was reading references off a different paper than the one I was reading the text from. I had found the cited material odd and couldn't immediately check that the files were the same, as both featured in their metadata "untitled" (which is flushed in the title bar with my pdf reader, okular). After the ordeal or going back to the main page, I could realize I was indeed looking at two different "untitled" papers! Chances for that were dim as many actually put the real title. For my purpose, however, it is better to work directly with the bib key. Hence the script.

Usage

Single file:

titlemypdf zubizarretacasalengua17a.pdf
Screenshot 20240924 161950.png

all files in directory

titlemypdf /home/laussy/Dropbox/Fabrice/bib/transit/*.pdf

This can trigger some minor warnings, e.g.,

Warning: [Minor] Duplicate XMP property: jav:journal_article_version - /home/laussy/Dropbox/Fabrice/bib/transit/garziano17a.pdf
    1 image files updated
/home/laussy/Dropbox/Fabrice/bib/transit/garziano17a.pdf titled to garziano17a

Warning: [Minor] Improperly enclosed XMP property: x:xmpmeta/rdf:RDF/dc:title - /home/laussy/Dropbox/Fabrice/bib/transit/lounis05a.pdf
    1 image files updated
/home/laussy/Dropbox/Fabrice/bib/transit/lounis05a.pdf titled to lounis05a

Warning: [Minor] Improperly enclosed XMP property: x:xmpmeta/rdf:RDF/dc:description - /home/laussy/Dropbox/Fabrice/bib/transit/rarity05a.pdf
    1 image files updated
/home/laussy/Dropbox/Fabrice/bib/transit/rarity05a.pdf titled to rarity05a

/home/laussy/Dropbox/Fabrice/bib/transit/xu07a.pdf titled to xu07a
Warning: [Minor] Improperly enclosed XMP property: x:xmpmeta/rdf:RDF/rdf:RDF/xmp:CreateDate - /home/laussy/Dropbox/Fabrice/bib/transit/xu20a.pdf
    1 image files updated

Those are due to improper encoding in the original file, and should remain as harmless after the processing as it was before.

Versions

  1. v0°1 on 24 September (2024).