Skip to content

Commit 930d113

Browse files
committed
📚 Add docs to the readme
1 parent eb78734 commit 930d113

File tree

1 file changed

+100
-1
lines changed

1 file changed

+100
-1
lines changed

‎README.md

Lines changed: 100 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,106 @@ To use from the command line, use the `-g` to create a global install.
1212
npm install -g crossref-utils
1313
```
1414

15-
## From the command line
15+
## Creating a deposit
16+
17+
To create a deposit, from within a [MyST](https://github.com/jupyter-book/mystmd) project, run:
18+
19+
```
20+
crossref deposit --type <type> -o <output>.xml
21+
```
22+
23+
This will prompt the user to select new DOIs, if they are not present in MyST metadata. Available options are:
24+
25+
- `--type`: Currently available types are `journal`, `preprint`, `conference`, and `dataset`. Each type is discussed in more detail below.
26+
- `-o, --output`: Output xml file. If this is not provided, the xml will be printed to stdout.
27+
- `--file`: Specific file to use for the deposit; this may be a single article or a `myst.yml` file. If not specified, the CLI will prompt the user.
28+
- `--prefix`: DOI prefix to use for new, generated DOIs. Default is Curvenote's prefix.
29+
- `--name`, `--email`: Depositor name and email. Default Depositor is Curvenote.
30+
- `--registrant`: Registrant organization. Default is `Crossref` - likely this should not be changed.
31+
- `--id`: Unique ID for the deposit. By default, a random ID will be autogenerated - likely this should not be changed.
32+
33+
### Deposit types
34+
35+
Crossref supports multiple deposit types; currently `crossref-utils` supports the following four. For each of these, supported article metadata pulled from MyST frontmatter include:
36+
37+
- `title`
38+
- `subtitle`
39+
- `doi`
40+
- `date` - used as publication date
41+
- `license` - only the URL is used
42+
- `funding` - MyST funding information is reduced to only award numbers and sources
43+
- `first_page`/`last_page`
44+
45+
Additionally, the following information will be pulled from the MyST project:
46+
47+
- `abstract`
48+
- `citations` - only citations with DOIs are included
49+
50+
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.
51+
52+
#### Journal
53+
54+
This type is used to register a new journal and/or new journal articles. If `--file` is set to `myst.yml`, this deposit type will attempt to discover multiple articles in the MyST project.
55+
56+
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`:
57+
58+
- `venue.title` - journal title
59+
- `venue.doi` - journal DOI
60+
61+
You may also specify in the frontmatter:
62+
63+
- `venue.short_title` - journal abbreviation
64+
- `volume.number`
65+
- `issue.number`
66+
- `issue.doi`
67+
68+
#### Conference
69+
70+
This type is used to register a conference proceedings. Similar to "journal" deposits, this will attempt to discover multiple articles.
71+
72+
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` (Note - the mapping from available MyST frontmatter fields (venue/volume/journal) to required deposit fields (conference/proceedings/series) is currently complex and unintuitive, so be careful!):
73+
74+
- `venue.title` - conference title
75+
- `volume.title` - proceedings title
76+
- `venue.publisher` - proceedings publisher
77+
78+
You may also specify in the frontmatter:
79+
80+
- `venue.short_title` - conference acronym
81+
- `venue.number` - conference number
82+
- `venue.date` - conference date
83+
- `venue.location` - conference location
84+
- `venue.series` - series title
85+
- `venue.issn` - series issn
86+
- `venue.doi` - series doi
87+
- `volume.subject` - proceedings subject
88+
- `editors` - proceedings editors
89+
90+
#### Dataset
91+
92+
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.
93+
94+
In addition to the individual dataset metadata, this deposit type requires a database title, set under `venue` frontmatter in `myst.yml`:
95+
96+
- `venue.title` - database title
97+
98+
You may also specify in the frontmatter:
99+
100+
- `editors` - database contributors (independent from the individual dataset authors)
101+
- `venue.doi` - a related item that each dataset is part of.
102+
103+
#### Preprint
104+
105+
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.
106+
107+
## Validating a deposit file
108+
109+
To validate an existing deposit XML file against the schema:
110+
111+
```
112+
crossref validate <deposit>.xml
113+
```
114+
16115

17116
---
18117

0 commit comments

Comments
 (0)