Created
November 21, 2016 20:41
-
-
Save fiver-watson/c19b384bb27a6b43f6d96a710fa28e43 to your computer and use it in GitHub Desktop.
This script, when run in Access to Memory (AtoM - see: https://www.accesstomemory.org) using the tools:run command-line task, will generate a PDF finding aid for each published archival descriptive hierarchy (e.g. fonds, collection, record group, etc) in AtoM. If you want to generate a finding aid for all descriptions regardless of publication s…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$c = new Criteria; | |
$c->add(QubitInformationObject::PARENT_ID, 1); | |
foreach (QubitInformationObject::get($c) as $io) | |
{ | |
if ($io->getPublicationStatus()->statusId == QubitTerm::PUBLICATION_STATUS_DRAFT_ID) | |
continue; | |
print "Generating PDF for ".$io->title."\n"; | |
$params = array( | |
'objectId' => $io->id, | |
'description' =>'Generating finding aid for: '.$io->getTitle(array('cultureFallback' => true)) | |
); | |
$job = QubitJob::runJob('arGenerateFindingAidJob', $params); | |
sleep(30); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment