Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)PA
Paperless office; document/image processing @sopuli.xyz

Store the URL of a PDF you downloaded in the PDF’s metadata

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.

0 comments

No comments

Start the conversation!