Experiments in augmenting ZooKeys XML by adding additional citation identifiers.
This script takes XML for the journal ZooKeys (see https://github.com/pensoft/ZooKeys-xml) and uses services from CrossRef to add DOIs to citations that lack them. Any DOIs are added back into the XML.
php add_dois.php <zookeys XML file>
will dump the augmented XML to standard output. You can redirect this, e.g.:
php add_dois.php <zookeys XML file> > <new XML file>
Output all citations (marked by the tag) BibJSON format.
php xml2json.php <zookeys XML file>
Count the number of citations that have DOIs.
php count_dois.php <zookeys XML file>