CLI¶
python -m mecadoi¶
python -m mecadoi [OPTIONS] COMMAND [ARGS]...
batch¶
Create DOIs for peer reviews and author replies in MECA archives.
All actions taken during these commands are recorded in the MECADOI database. Its location can be set through the DB_URL parameter in the .env file.
python -m mecadoi batch [OPTIONS] COMMAND [ARGS]...
deposit¶
Create DOIs for MECA archives in the MECADOI database.
The command finds those MECA archives in the MECADOI database for which DOIs can be deposited, i.e. those that have reviews and a preprint DOI and for which no deposition has been attempted yet. Then a deposition attempt is made for each selected MECA and its result recorded in the MECADOI database. Information about each successful deposition attempt is written to a file in –output-dir.
DOIs are deposited by sending an XML file conforming to the Crossref metadata schema to the Crossref API. Emails with detailed information about the status of every submission is sent to the depositor’s email address, which is taken from the DEPOSITOR_EMAIL variable in your .env file. Failures in the deposition data (e.g. malformed DOIs) are only reported in this email, i.e. this command almost always executes successfully.
Before a deposition is attempted the DOIs to be created are verified against the EEB platform (eeb.embo.org). If any review or reply already has a DOI, or if the amount of reviews and replies don’t match exactly, the attempt is marked as failed.
The ID of this command invocation and a list of all processed MECA archives is printed to stdout. The MECA archives are grouped by their status:
NOTE: By default, this command will not create any DOIs or update the MECADOI database. Pass the –no-dry-run option to actually execute the irreversible deposition and update the database.
python -m mecadoi batch deposit [OPTIONS]
Options
- -o, --output-dir <output_dir>¶
Required The directory to which a file with information about successful deposition attempts is written.
- --dry-run, --no-dry-run¶
Only show what would happen / actually create DOIs and update the database. DEFAULT: –dry-run
- --retry-failed, --no-retry-failed¶
Re-try DOI deposition for MECA archives for which a previous attempt has failed / deposit DOIs for MECA archives without deposition attempt. DEFAULT: –no-retry-failed
- -a, --after <after>¶
Only attempt to deposit DOIs for MECA archives that were received after this date. Example: 2022-04-01
- -b, --before <before>¶
Only attempt to deposit DOIs for MECA archives that were received before this date. Example: 2022-10-01
parse¶
Import files into the MECADOI database.
The command archives all files in INPUT_DIR to a new folder in –output-dir, tries to parse them as MECA archives, and registers them in the MECADOI database.
The processed files are moved to a subfolder named parsed/<id>/ within –output-dir, where <id> is the unique ID generated for this command invocation.
The ID of this command invocation and a list of all processed files is printed to stdout. The files are grouped by their status:
python -m mecadoi batch parse [OPTIONS] INPUT_DIR
Options
- -o, --output-dir <output_dir>¶
Required The directory to which processed files will be archived. Must be an existing directory.
Arguments
- INPUT_DIR¶
Required argument
prune¶
Delete MECA archives that are no longer needed for deposition.
All MECA archives are parsed during the initial import and all information necessary for DOI creation is stored in the MECADOI database. After this step, the actual file on disk is no longer needed to create DOIs.
This command checks the file path of every MECA archive registered in the MECADOI database and deletes those files that exist on disk.
NOTE: By default, this command will not delete any files. Pass the –no-dry-run option to actually execute the deletions.
python -m mecadoi batch prune [OPTIONS]
Options
- --dry-run, --no-dry-run¶
Only show what would happen / actually delete MECA archives. DEFAULT: –dry-run
meca¶
Read information from a MECA archive.
python -m mecadoi meca [OPTIONS] COMMAND [ARGS]...
info¶
Show basic information about the manuscript in a MECA archive.
Parses the file at MECA_ARCHIVE and prints the authors, journal, title, any DOIs, and a summary of the peer review process of the manuscript to stdout.
python -m mecadoi meca info [OPTIONS] MECA_ARCHIVE
Arguments
- MECA_ARCHIVE¶
Required argument
reviews¶
Show information about the review process of the manuscript in a MECA archive.
Parses the file at MECA_ARCHIVE and prints the authors, date, and a summary of all reviews and author replies of the manuscript to stdout.
python -m mecadoi meca reviews [OPTIONS] MECA_ARCHIVE
Arguments
- MECA_ARCHIVE¶
Required argument