Skip to content

Commit

Permalink
build docs site
Browse files Browse the repository at this point in the history
  • Loading branch information
mfenner committed Dec 7, 2023
1 parent de63971 commit 10de079
Show file tree
Hide file tree
Showing 18 changed files with 2,935 additions and 294 deletions.
26 changes: 20 additions & 6 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@ execute:
freeze: true
website:
title: "commonmeta-ruby"
favicon: favicon.ico
bread-crumbs: false
navbar:
left:
- href: index.qmd
text: Guide
tools:
background: light
logo: "/images/icon.png"
logo-alt: "commonmeta-py"
right:
- icon: github
href: https://github.com/front-matter/commonmeta-ruby
sidebar:
contents:
- index.qmd
- section: "Readers"
contents: "readers/*.ipynb"
- section: "Writers"
contents: "writers/*.ipynb"
- section: "Utils"
contents: "utils/*.ipynb"
page-footer:
left: "Copyright ©2023 Front Matter."
right:
Expand All @@ -27,6 +38,9 @@ format:
theme:
light: [flatly, theme.scss]
dark: [darkly, theme.scss]
page-layout: article
code-fold: false
code-block-bg: true
code-block-border-left: "#38a169"
highlight-style: github
toc: true
toc-location: left
toc-location: right
Binary file added docs/_site/favicon.ico
Binary file not shown.
Binary file added docs/_site/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
198 changes: 135 additions & 63 deletions docs/_site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>commonmeta-ruby</title>
<title>commonmeta-ruby - Guide</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand All @@ -20,40 +20,6 @@
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
}
pre.numberSource { margin-left: 3em; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
</style>


Expand All @@ -64,6 +30,7 @@
<script src="site_libs/quarto-search/fuse.min.js"></script>
<script src="site_libs/quarto-search/quarto-search.js"></script>
<meta name="quarto:offset" content="./">
<link href="./favicon.ico" rel="icon">
<script src="site_libs/quarto-html/quarto.js"></script>
<script src="site_libs/quarto-html/popper.min.js"></script>
<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
Expand Down Expand Up @@ -105,13 +72,16 @@

</head>

<body class="floating nav-fixed">
<body class="nav-sidebar floating nav-fixed">

<div id="quarto-search-results"></div>
<header id="quarto-header" class="headroom fixed-top">
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="./index.html" class="navbar-brand navbar-brand-logo">
<img src="./images/icon.png" alt="commonmeta-py" class="navbar-logo">
</a>
<a class="navbar-brand" href="./index.html">
<span class="navbar-title">commonmeta-ruby</span>
</a>
Expand All @@ -121,50 +91,161 @@
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link active" href="./index.html" aria-current="page">
<span class="menu-text">Guide</span></a>
<ul class="navbar-nav navbar-nav-scroll ms-auto">
<li class="nav-item compact">
<a class="nav-link" href="https://github.com/front-matter/commonmeta-ruby"> <i class="bi bi-github" role="img">
</i>
<span class="menu-text"></span></a>
</li>
</ul>
</div> <!-- /navcollapse -->
<div class="quarto-navbar-tools">
<a href="https://github.com/front-matter/commonmeta-ruby" title="" class="quarto-navigation-tool px-1" aria-label=""><i class="bi bi-github"></i></a>
<a href="" class="quarto-color-scheme-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleColorScheme(); return false;" title="Toggle dark mode"><i class="bi"></i></a>
</div>
</div> <!-- /container-fluid -->
</nav>
<nav class="quarto-secondary-nav">
<div class="container-fluid d-flex">
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<a class="flex-grow-1 no-decor" role="button" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<h1 class="quarto-secondary-nav-title">Guide</h1>
</a>
</div>
</nav>
</header>
<!-- content -->
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto">
<nav id="TOC" role="doc-toc" class="toc-active">
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link active">
<span class="menu-text">Guide</span></a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<span class="menu-text">Readers</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./readers/bibtex_reader.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">BibTex Reader</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<span class="menu-text">Writers</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./writers/bibtex_writer.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">BibTex Writer</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">
<span class="menu-text">Utils</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./utils/doi_utils.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">doi_utils</span></a>
</div>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div>
<!-- margin-sidebar -->
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
<nav id="TOC" role="doc-toc" class="toc-active">
<h2 id="toc-title">On this page</h2>

<ul>
<li><a href="#commonmeta-ruby" id="toc-commonmeta-ruby" class="nav-link active" data-scroll-target="#commonmeta-ruby">commonmeta-ruby</a>
<ul class="collapse">
<li><a href="#installation" id="toc-installation" class="nav-link active" data-scroll-target="#installation">Installation</a></li>
<li><a href="#commands" id="toc-commands" class="nav-link" data-scroll-target="#commands">Commands</a></li>
<li><a href="#errors" id="toc-errors" class="nav-link" data-scroll-target="#errors">Errors</a></li>
<li><a href="#supported-metadata-formats" id="toc-supported-metadata-formats" class="nav-link" data-scroll-target="#supported-metadata-formats">Supported Metadata Formats</a></li>
<li><a href="#installation" id="toc-installation" class="nav-link" data-scroll-target="#installation">Installation</a></li>
</ul></li>
</ul>
</nav>
</nav>
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div>
<!-- margin-sidebar -->
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
</div>
<!-- main -->
<main class="content" id="quarto-document-content">

<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title d-none d-lg-block">Guide</h1>
</div>



<div class="quarto-title-meta">

<p><a href="https://doi.org/10.5281/zenodo.5785519"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.5785519.svg" class="img-fluid" alt="DOI"></a> <a href="https://badge.fury.io/rb/commonmeta-ruby"><img src="https://badge.fury.io/rb/commonmeta-ruby.svg" class="img-fluid" alt="Gem Version"></a> <a href="https://sonarcloud.io/summary/new_code?id=front-matter_commonmeta-ruby"><img src="https://sonarcloud.io/api/project_badges/measure?project=front-matter_commonmeta-ruby&amp;metric=coverage.png" class="img-fluid" alt="Coverage"></a> <a href="https://sonarcloud.io/summary/new_code?id=front-matter_commonmeta-ruby"><img src="https://sonarcloud.io/api/project_badges/measure?project=front-matter_commonmeta-ruby&amp;metric=sqale_rating.png" class="img-fluid" alt="Maintainability Rating"></a> <img src="https://img.shields.io/github/license/front-matter/commonmeta-ruby?logo=MIT.png" class="img-fluid" alt="GitHub"></p>
<section id="commonmeta-ruby" class="level1">
<h1>commonmeta-ruby</h1>
<p>Ruby gem and command-line utility for the conversion of scholarly metadata, including <a href="https://schema.org">schema.org</a>. Based on the <a href="https://github.com/datacite/bolognese">bolognese</a> gem, but using <a href="https://commonmeta.org">commonmeta</a> as the intermediate format, and supporting additional metadata formats. A Python version is available at <a href="https://github.com/front-matter/commonmeta-py">commonmeta-py</a>.</p>



</div>



</header>


<p><a href="https://doi.org/10.5281/zenodo.5785519"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.5785519.svg" class="img-fluid" alt="DOI"></a> <a href="https://badge.fury.io/rb/commonmeta-ruby"><img src="https://badge.fury.io/rb/commonmeta-ruby.svg" class="img-fluid" alt="Gem Version"></a> <img src="https://img.shields.io/github/license/front-matter/commonmeta-ruby?logo=MIT.png" class="img-fluid" alt="GitHub"></p>
<p>commonmeta-ruby is a Ruby gem and command-line utility for the conversion of scholarly metadata, including <a href="https://schema.org">schema.org</a>. Based on the <a href="https://github.com/datacite/bolognese">bolognese</a> gem, but using <a href="https://commonmeta.org">commonmeta</a> as the intermediate format, and supporting additional metadata formats. A Python version is available at <a href="https://github.com/front-matter/commonmeta-py">commonmeta-py</a>.</p>
<section id="installation" class="level2">
<h2 class="anchored" data-anchor-id="installation">Installation</h2>
<p>Requires Ruby 3.0 or later (Ruby 2.x <a href="https://endoflife.date/ruby">has reached its end of life</a> March 2023). Then add the following to your <code>Gemfile</code> to install the latest version:</p>
<pre><code>gem 'commonmeta-ruby'</code></pre>
<p>Then run <code>bundle install</code> to install into your environment.</p>
<p>You can also install the gem system-wide in the usual way:</p>
<pre><code>gem install commonmeta-ruby</code></pre>
</section>
<section id="commands" class="level2">
<h2 class="anchored" data-anchor-id="commands">Commands</h2>
<p>Run the <code>commonmeta</code> command with either an identifier (DOI or URL) or filename:</p>
<pre><code>commonmeta https://doi.org/10.7554/elife.01567</code></pre>
<pre><code>commonmeta example.xml</code></pre>
<p>commonmeta can read BibTeX files (file extension <code>.bib</code>), RIS files (file extension <code>.ris</code>), Crossref files (file extension <code>.xml</code>), DataCite files and CSL-JSON files.</p>
<p>The input format (e.g.&nbsp;Crossref or BibteX) is automatically detected, but you can also provide the format with the <code>--from</code> or <code>-f</code> flag. The supported input formats are listed in the table above.</p>
<p>The output format is determined by the <code>--to</code> or <code>-t</code> flag, and defaults to <code>schema_org</code>.</p>
<p>Show all commands with <code>commonmeta help</code>:</p>
<pre><code>Commands:
commonmeta # convert metadata
commonmeta --version, -v # print the version
commonmeta help [COMMAND] # Describe available commands or one specific command</code></pre>
</section>
<section id="errors" class="level2">
<h2 class="anchored" data-anchor-id="errors">Errors</h2>
<p>Errors are returned to STDOUT.</p>
<p>All input is validated against the commonmeta JSON schema.</p>
</section>
<section id="supported-metadata-formats" class="level2">
<h2 class="anchored" data-anchor-id="supported-metadata-formats">Supported Metadata Formats</h2>
<p>commonmeta-ruby reads and/or writes these metadata formats:</p>
Expand Down Expand Up @@ -286,17 +367,8 @@ <h2 class="anchored" data-anchor-id="supported-metadata-formats">Supported Metad
</tr>
</tbody>
</table>
</section>
<section id="installation" class="level2">
<h2 class="anchored" data-anchor-id="installation">Installation</h2>
<p>Requires Ruby 3.0 or later (Ruby 2.x <a href="https://endoflife.date/ruby">has reached its end of life</a> March 2023). Then add the following to your <code>Gemfile</code> to install the latest version:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode ruby code-with-copy"><code class="sourceCode ruby"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>gem <span class="vs">'commonmeta-ruby'</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Then run <code>bundle install</code> to install into your environment.</p>
<p>You can also install the gem system-wide in the usual way:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">gem</span> install commonmeta-ruby</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>


</section>
</section>

</main> <!-- /main -->
Expand Down
Loading

0 comments on commit 10de079

Please sign in to comment.