Skip to content
New issue

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

Import embargo information of files #147

Closed
sebdeleze opened this issue Feb 11, 2020 · 4 comments
Closed

Import embargo information of files #147

sebdeleze opened this issue Feb 11, 2020 · 4 comments

Comments

@sebdeleze
Copy link
Contributor

sebdeleze commented Feb 11, 2020

Provide a script that updates embargo dates and file access

@sebdeleze
Copy link
Contributor Author

Someone can give me some examples from RERODOC, which have files with embargo date?

@sebdeleze
Copy link
Contributor Author

@jma For doing this, I need :

  • Add embargo information for files in MarcXML
    OR
  • You give me a new dump file containing this information
    OR
  • You give me an access to the mysql database and I do the dump.

@sebdeleze sebdeleze added 3 and removed 2 labels Mar 12, 2020
@sebdeleze
Copy link
Contributor Author

Here's a dump of files status and the query used to retrieve them:

select distinct id_bibrec, status, docname from bibrec_bibdoc INNER JOIN bibdoc on bibrec_bibdoc.id_bibdoc=bibdoc.id where status!='' and status!='DELETED';

files_status_2020-03-12.zip

@sebdeleze
Copy link
Contributor Author

Test CSV file for testing all permissions possibilities

"id_bibrec";"status";"docname"
14278;"status:PA16JU";"PAL_E1518"
29506;"status:NEUCHATEL";"Soys_ren_Ibrahim_-_La_sociologie_d_Abdelmalek_Sayad_et_l_expulsion_des_trangers_d_linquants_en_Suisse_UNINE_MEMOIRE_2012"
465;"status:RERO";"s550142"
23234;"status:UNISI";"T541_BLUE"
22130;"status:INTERNAL";"KuJB"
232563;"firerole:
    allow roles /.*,INTERNAL,.*/
    allow from ""2015-02-15""
    allow any
";"Fragniere_Catenazzo_2014_Satisfaction_pricing"
209243;"firerole:
    allow roles /.*,UNIFR,.*/
    allow from ""2014-07-14""
    allow any
";"boc_tps"
289209;"firerole:
    allow roles /.*,CSAL,.*/
    allow from ""2018-01-07""
    allow any
";"stu2500"
292071;"firerole:
    allow roles /.*,CSAL,.*/
    allow from ""2020-08-01""
    allow any
";"S1935789315000403"
324197;"firerole:
    allow roles /.*,UNISI,.*/
    allow from ""2020-08-17""
    allow any
";"Palomino-Segura_JVE_2018"
328224;"firerole:
    allow roles /.*,INTERNAL,.*/
    allow from ""2022-01-09""
    allow any
";"semitotal_rero"

And corresponding oaiharvester commands:

invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:20091210001703-ZZ -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:20120629155123-IQ -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:465 -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:20110616171237-KC -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:20110316145620-YX -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:20141021134941-IJ -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:289209 -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:292071 -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:20190219111855-YI -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:20200309134011-NO -q
invenio oaiharvester harvest -u http://doc.rero.ch/oai2d -m marcxml -i oai:doc.rero.ch:20140214134013-OI -q

sebdeleze pushed a commit that referenced this issue Mar 27, 2020
* Updates files permissions using a CLI command and an input CSV file.
* Moves existing CLI commands for documents.
* Closes #147.

Co-Authored-by: Sébastien Délèze <sebastien.deleze@rero.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant