Utilities for creating crossref.org deposit metadata from node or the command line.
To use from the command line, use the -g to create a global install.
npm install -g crossref-utils
To create a deposit, from within a MyST project, run:
crossref deposit --type <type> -o <output>.xml [paths...]
The optional paths arguments say what to deposit; each one may be:
- a MyST content file, e.g.
papers/smith/article.md- deposited as a single article, using the metadata of the page and its containing project - a
myst.yml/curvenote.ymlfile or the folder containing one, e.g.papers/smith- deposited as a single article, using the project metadata, with the abstract and citations collected from the project pages - a folder of MyST projects, e.g.
papers- deposited as one article per project found in it (its subfolders, and their subfolders)
Since folders of projects are expanded, crossref deposit papers essays and crossref deposit papers/* essays/* are equivalent; patterns are expanded by your shell, so do not quote them. Paths may be mixed and are deduplicated, so crossref deposit myst.yml papers/* deposits the project in the current folder alongside each project in papers.
If no paths are given, the CLI falls back to discovery: if there is a project in the current folder, the CLI prompts for a file from that project; otherwise, every project in the current folder's subfolders (up to two levels deep) is deposited. Note that discovery has no concept of which projects are articles - if the repository contains MyST projects that are not articles, list the article paths explicitly instead.
This will prompt the user to select new DOIs, if they are not present in MyST metadata. Available options are:
--type: Currently available types arejournal,preprint,conference, anddataset. Each type is discussed in more detail below.-o, --output: Output xml file. If this is not provided, the xml will be printed to stdout.--file: Deprecated - pass the file as an argument instead. May not be combined with path arguments.--prefix: DOI prefix to use for new, generated DOIs. Default is Curvenote's prefix.--name,--email: Depositor name and email. Default Depositor is Curvenote.--registrant: Registrant organization. Default isCrossref- likely this should not be changed.--id: Unique ID for the deposit. By default, a random ID will be autogenerated - likely this should not be changed.--contributor-type: For conference deposits only, sets thecontributor_rolefor people listed under MySTeditorsin the proceedings metadata. Values areeditor(default) orchair. Other deposit types ignore this flag.
Crossref supports multiple deposit types; currently crossref-utils supports the following four. For each of these, supported article metadata pulled from MyST frontmatter include:
titlesubtitledoidate- used as publication datelicense- only the URL is usedfunding- MyST funding information is reduced to only award numbers and sourcesfirst_page/last_page
Additionally, the following information will be pulled from the MyST project:
abstractcitations- only citations with DOIs are included
Different deposit types have different required fields. If DOIs are not provided, the user will be prompted to select new DOIs. If other required fields are not provided, the user will receive an error message.
This type is used to register a new journal and/or new journal articles. Multiple articles may be deposited at once, for example crossref deposit --type journal papers/*.
In addition to the above article metadata for each article, this deposit type requires journal title and DOI, set under venue frontmatter in myst.yml:
venue.title- journal titlevenue.doi- journal DOI
You may also specify in the frontmatter:
venue.short_title- journal abbreviationvolume.numberissue.numberissue.doi
This type is used to register a conference proceedings. Similar to "journal" deposits, multiple articles may be deposited at once.
In addition to the above article metadata for each article, this deposit type requires conference title, proceedings title, and proceedings publisher, set in myst.yml:
venue.title- conference titlevolume.title- proceedings titlevenue.publisher- proceedings publisher
You may also specify in the frontmatter:
venue.short_title- conference acronymvenue.number- conference numbervenue.date- conference datevenue.location- conference locationvenue.series- series titlevenue.issn- series issnvenue.doi- series doivolume.subject- proceedings subjectvolume.doi- proceedings doieditors- proceedings editors (or "chairs" if--contributor-type chairis specified)
This type is used to register a database deposit. For this type, each "article" is considered a dataset, where "article frontmatter" is used as dataset frontmatter.
In addition to the individual dataset metadata, this deposit type requires a database title, set under venue frontmatter in myst.yml:
venue.title- database title
You may also specify in the frontmatter:
editors- database contributors (independent from the individual dataset authors)venue.doi- a related item that each dataset is part of.
This type is used to register any posted content - these are standalone articles not associated with a journal or conference. You cannot register multiple articles with this type. Also, there is no additional metadata required than the article metadata described above.
To validate an existing deposit XML file against the schema:
crossref validate <deposit>.xml
This package is ESM only.
Made with love by
Continuous Science Foundation