Create ~/.ExifTool_config
:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::xmp' => {
# SRCURL tag (simple string, no checking, we specify the name explicitly so it stays all uppercase)
SRCURL => { Name => 'SRCURL' },
PUBURL => { Name => 'PUBURL' },
# Text tag (can be specified in alternative languages)
Text => { },
},
);
1;
Then after fetching a PDF, run this:
$ exiftool -config ~/.ExifTool_config -xmp-xmp:srcurl="$URL" "$PDF"
To see the URL, simply run:
$ exiftool "$PDF"
It is a bit ugly that we need a complicated config file just to add an attribute to the metadata. But at least it works. I also have a PUBURL field to store URLs of PDFs I have published so I can keep track of where they were published.
Note that “srcurl” is an arbitrray identifier of my choosing, so use whatever tag suits you. I could not find a standard fieldname for this.
You must log in or register to comment.