-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmt.1.html
88 lines (88 loc) · 2.87 KB
/
cmt.1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>CMTools</title>
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="index.html">README</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">INSTALL</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="about.html">About</a></li>
<li><a href="search.html">Search</a></li>
<li><a href="https://github.com/caltechlibrary/CMTools">GitHub</a></li>
</ul>
</nav>
<section>
<h1 id="name">NAME</h1>
<p>cmt</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>cmt INPUT_NAME <a href="#options">OPTIONS</a> cmt INPUT_NAME
[OUTPUT_NAME] <a href="#options">OPTIONS</a> cmt INPUT_NAME [OUTPUT_NAME
OUTPUT_NAME …] <a href="#options">OPTIONS</a></p>
<h1 id="description">DESCRIPTION</h1>
<p>cmt provides tooling for working with CodeMeta objects targeting your
Python, Go, JavaScript or TypeScript build process.</p>
<p>cmt can be used to generate various code artifacts including the
following.</p>
<ul>
<li>CITATION.cff</li>
<li>about.md</li>
<li>version.py, version.go, version.js or version.ts</li>
</ul>
<h1 id="options">OPTIONS</h1>
<p>Options come as the last parameter(s) on the command line.</p>
<dl>
<dt>-h, –help</dt>
<dd>
display help
</dd>
<dt>-v, –version</dt>
<dd>
display version
</dd>
<dt>-l, –license</dt>
<dd>
display license
</dd>
<dt>-f, –format</dt>
<dd>
output format to use when piping the output to another programming.
</dd>
<dt>-d, –deno</dt>
<dd>
update the deno.json file tasks based on output files requested.
</dd>
</dl>
<h1 id="examples">EXAMPLES</h1>
<p>Here’s an example of rendering <code>CITATION.cff</code> from a
<code>codemeta.json</code> file. The second version shows how to use the
format option.</p>
<pre><code>cmt codemeta.json CITATION.cff
cmt codemeta.json --format=cff >CITATION.cff</code></pre>
<p>Here’s an example of rendering <code>version.ts</code>,
<code>version.py</code>, and <code>version.go</code> from
<code>codemeta.json</code> file.</p>
<pre><code>cmt codemeta.json version.ts
cmt codemeta.json version.py
cmt codemeta.json version.go</code></pre>
<p>Here’s an example of generating an “about.md” file from the CodeMeta
file.</p>
<pre><code>cmt codemeta.json about.md</code></pre>
<p>You can also just stack the output files you need one after another.
This is an example of creating the files to bootstrap a TypeScript
project.</p>
<pre><code>cmt codemeta.json about.md CITATION.cff version.ts</code></pre>
<p>The “–deno” option can trail the above command to update the
deno.json file with a set of tasks to update the files you have
specified.</p>
<pre><code>cmt codemeta.json about.md CITATION.cff version.ts --deno</code></pre>
<p>This will create a “gen-code” task that will rebuild those files
based on the current contents of the CodeMeta file.</p>
</section>
</body>
</html>