We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At tests/example.xml there are no image... So run example at test/index.php also without.
Alternative to send figs by git, and generalize the local build of an HTML, using fig's DOI... But need an PeerJ API to get image file from DOI-fig.
$xpath = new DOMXPath($document); foreach($xpath->query('//fig|//table') as $e) { $id = $e->getAttribute('id'); $out = "\n -- {$e->tagName} $id"; foreach($xpath->query('.//graphic',$e) as $g) { $gfile = $g->getAttribute('xlink:href'); print "$out\n\t file: $gfile"; $out = ''; if (file_exists(__DIR__.$gfile)) print " OK!"; else { $oid = $xpath->query('object-id[@pub-id-type="doi"]',$e)->item(0); if ($oid) { $doi = $oid->nodeValue; print " without file here, get it from DOI $doi..."; $bin = file_get_contents("http://dx.doi.org/$doi"); if ($bin) { // OPS, WHERE THE API for get full-image!? // Example, DOI:10.7717/peerj.182/fig-1 must be transtated to // https://dfzljdn9uc3pi.cloudfront.net/2013/182/1/fig-1-2x.jpg file_put_contents($gfile,$bin); print " OK!"; } else print " ops, NO ONLINE FILE"; } else print "... no DOI"; } } // graphic } // graphic-container
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At tests/example.xml there are no image... So run example at test/index.php also without.
Alternative to send figs by git, and generalize the local build of an HTML, using fig's DOI... But need an PeerJ API to get image file from DOI-fig.
The text was updated successfully, but these errors were encountered: