
Here is an extract of it: //initialise the command $command=’/usr/local/bin/exiftool ‘ //prepare commands and associated variables retrieved from our DB $command.=’-XMP-dc:Contributor=”’.$manuscript_edited_by.’” ‘ $command.=’-XMP-dc:Creator=”’.$var_list_authors.’” ‘ $command.=’-XMP-dc:Date=”’.$year.’” ‘ $command.=’-XMP-dc:Format=”application/pdf” ‘ $command.=’-XMP-dc:Identifier=”’.$manuscript_doi.’” ‘ $command.=’-XMP-dc:Publisher=”’.$publisher.’” ‘ $command.=’-XMP-dc:Rights=”’.$licence.’” ‘ … //add file to be updated $command.=$file.'.pdf' //execute the command //“2>&1” is one way to get a log on your screen in case of errors $output=shell_exec($command.' 2>&1') echo $output //save the metadata in a text file $output=shell_exec('/usr/local/bin/exiftool -G1 ‘.$file.'.pdf > metadata.txt 2>&1') echo $outputĪs such, we hope to have a few more visitors interested in our publications, who will find it easier to happen upon our website. We wrote a script in PHP retrieving the information in our Firebase database to populate the fields automatically. The beauty of it is that the process can be automatised.
