commonmeta-ruby 3.7.2 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/publish.yml +23 -0
- data/Gemfile.lock +30 -29
- data/bin/commonmeta +1 -1
- data/docs/.gitignore +1 -0
- data/docs/_publish.yml +4 -0
- data/docs/_quarto.yml +46 -0
- data/docs/_site/favicon.ico +0 -0
- data/docs/_site/images/icon.png +0 -0
- data/docs/_site/index.html +947 -0
- data/docs/_site/readers/bibtex_reader.html +802 -0
- data/docs/_site/search.json +74 -0
- data/docs/_site/site_libs/bootstrap/bootstrap-dark.min.css +9 -0
- data/docs/_site/site_libs/bootstrap/bootstrap-icons.css +2078 -0
- data/docs/_site/site_libs/bootstrap/bootstrap-icons.woff +0 -0
- data/docs/_site/site_libs/bootstrap/bootstrap.min.css +9 -0
- data/docs/_site/site_libs/bootstrap/bootstrap.min.js +7 -0
- data/docs/_site/site_libs/clipboard/clipboard.min.js +7 -0
- data/docs/_site/site_libs/quarto-html/anchor.min.js +9 -0
- data/docs/_site/site_libs/quarto-html/popper.min.js +6 -0
- data/docs/_site/site_libs/quarto-html/quarto-syntax-highlighting-dark.css +179 -0
- data/docs/_site/site_libs/quarto-html/quarto-syntax-highlighting.css +179 -0
- data/docs/_site/site_libs/quarto-html/quarto.js +889 -0
- data/docs/_site/site_libs/quarto-html/tippy.css +1 -0
- data/docs/_site/site_libs/quarto-html/tippy.umd.min.js +2 -0
- data/docs/_site/site_libs/quarto-nav/headroom.min.js +7 -0
- data/docs/_site/site_libs/quarto-nav/quarto-nav.js +288 -0
- data/docs/_site/site_libs/quarto-search/autocomplete.umd.js +3 -0
- data/docs/_site/site_libs/quarto-search/fuse.min.js +9 -0
- data/docs/_site/site_libs/quarto-search/quarto-search.js +1241 -0
- data/docs/_site/utils/doi_utils.html +787 -0
- data/docs/_site/writers/bibtex_writer.html +803 -0
- data/docs/favicon.ico +0 -0
- data/docs/images/icon.png +0 -0
- data/docs/index.qmd +83 -0
- data/docs/readers/bibtex_reader.ipynb +37 -0
- data/docs/theme.scss +7 -0
- data/docs/utils/doi_utils.ipynb +28 -0
- data/docs/writers/bibtex_writer.ipynb +39 -0
- data/lib/commonmeta/cli.rb +5 -5
- data/lib/commonmeta/crossref_utils.rb +7 -1
- data/lib/commonmeta/doi_utils.rb +5 -0
- data/lib/commonmeta/metadata.rb +66 -62
- data/lib/commonmeta/readers/json_feed_reader.rb +15 -5
- data/lib/commonmeta/version.rb +1 -1
- data/spec/cli_spec.rb +2 -2
- data/spec/doi_utils_spec.rb +14 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_blog_slug.yml +71 -0
- data/spec/readers/json_feed_reader_spec.rb +40 -8
- data/spec/writers/crossref_xml_writer_spec.rb +25 -8
- metadata +40 -3
@@ -0,0 +1,74 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"objectID": "writers/bibtex_writer.html",
|
4
|
+
"href": "writers/bibtex_writer.html",
|
5
|
+
"title": "BibTex Writer",
|
6
|
+
"section": "",
|
7
|
+
"text": "As with all commonmeta-ruby notebooks, we start by fetching metadata, in this example a journal article via its Crossref DOI, and then convert it to the commonmeta format.",
|
8
|
+
"crumbs": [
|
9
|
+
"Writers",
|
10
|
+
"BibTex Writer"
|
11
|
+
]
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"objectID": "writers/bibtex_writer.html#fetch-the-metadata",
|
15
|
+
"href": "writers/bibtex_writer.html#fetch-the-metadata",
|
16
|
+
"title": "BibTex Writer",
|
17
|
+
"section": "",
|
18
|
+
"text": "As with all commonmeta-ruby notebooks, we start by fetching metadata, in this example a journal article via its Crossref DOI, and then convert it to the commonmeta format.",
|
19
|
+
"crumbs": [
|
20
|
+
"Writers",
|
21
|
+
"BibTex Writer"
|
22
|
+
]
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"objectID": "index.html",
|
26
|
+
"href": "index.html",
|
27
|
+
"title": "Guide",
|
28
|
+
"section": "",
|
29
|
+
"text": "commonmeta-ruby is a Ruby gem and command-line utility for the conversion of scholarly metadata, including schema.org. Based on the bolognese gem, but using commonmeta as the intermediate format, and supporting additional metadata formats. A Python version is available at commonmeta-py.",
|
30
|
+
"crumbs": [
|
31
|
+
"Guide"
|
32
|
+
]
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"objectID": "index.html#installation",
|
36
|
+
"href": "index.html#installation",
|
37
|
+
"title": "Guide",
|
38
|
+
"section": "Installation",
|
39
|
+
"text": "Installation\nRequires Ruby 3.0 or later (Ruby 2.x has reached its end of life March 2023). Then add the following to your Gemfile to install the latest version:\ngem 'commonmeta-ruby'\nThen run bundle install to install into your environment.\nYou can also install the gem system-wide in the usual way:\ngem install commonmeta-ruby",
|
40
|
+
"crumbs": [
|
41
|
+
"Guide"
|
42
|
+
]
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"objectID": "index.html#commands",
|
46
|
+
"href": "index.html#commands",
|
47
|
+
"title": "Guide",
|
48
|
+
"section": "Commands",
|
49
|
+
"text": "Commands\nRun the commonmeta command with either an identifier (DOI or URL) or filename:\ncommonmeta https://doi.org/10.7554/elife.01567\ncommonmeta example.xml\ncommonmeta can read BibTeX files (file extension .bib), RIS files (file extension .ris), Crossref files (file extension .xml), DataCite files and CSL-JSON files.\nThe input format (e.g. Crossref or BibteX) is automatically detected, but you can also provide the format with the --from or -f flag. The supported input formats are listed in the table above.\nThe output format is determined by the --to or -t flag, and defaults to schema_org.\nShow all commands with commonmeta help:\nCommands:\n commonmeta # convert metadata\n commonmeta --version, -v # print the version\n commonmeta help [COMMAND] # Describe available commands or one specific command",
|
50
|
+
"crumbs": [
|
51
|
+
"Guide"
|
52
|
+
]
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"objectID": "index.html#errors",
|
56
|
+
"href": "index.html#errors",
|
57
|
+
"title": "Guide",
|
58
|
+
"section": "Errors",
|
59
|
+
"text": "Errors\nErrors are returned to STDOUT.\nAll input is validated against the commonmeta JSON schema.",
|
60
|
+
"crumbs": [
|
61
|
+
"Guide"
|
62
|
+
]
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"objectID": "index.html#supported-metadata-formats",
|
66
|
+
"href": "index.html#supported-metadata-formats",
|
67
|
+
"title": "Guide",
|
68
|
+
"section": "Supported Metadata Formats",
|
69
|
+
"text": "Supported Metadata Formats\ncommonmeta-ruby reads and/or writes these metadata formats:\n\n\n\nFormat\nName\nContent Type\nRead\nWrite\n\n\n\n\nCommonmeta\ncommonmeta\napplication/vnd.commonmeta+json\nyes\nyes\n\n\nCrossRef Unixref XML\ncrossref\napplication/vnd.crossref.unixref+xml\nyes\nyes\n\n\nCrossref\ncrossref\napplication/vnd.crossref+json\nyes\nno\n\n\nDataCite\ndatacite\napplication/vnd.datacite.datacite+json\nyes\nyes\n\n\nSchema.org (in JSON-LD)\nschema_org\napplication/vnd.schemaorg.ld+json\nyes\nyes\n\n\nRDF XML\nrdf_xml\napplication/rdf+xml\nno\nyes\n\n\nRDF Turtle\nturtle\ntext/turtle\nno\nyes\n\n\nCSL-JSON\ncsl\napplication/vnd.citationstyles.csl+json\nyes\nyes\n\n\nFormatted text citation\ncitation\ntext/x-bibliography\nno\nyes\n\n\nCodemeta\ncodemeta\napplication/vnd.codemeta.ld+json\nyes\nyes\n\n\nCitation File Format (CFF)\ncff\napplication/vnd.cff+yaml\nyes\nyes\n\n\nJATS\njats\napplication/vnd.jats+xml\nno\nyes\n\n\nCSV\ncsv\ntext/csv\nno\nyes\n\n\nBibTex\nbibtex\napplication/x-bibtex\nyes\nyes\n\n\nRIS\nris\napplication/x-research-info-systems\nyes\nyes",
|
70
|
+
"crumbs": [
|
71
|
+
"Guide"
|
72
|
+
]
|
73
|
+
}
|
74
|
+
]
|