You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+10-9
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
The tools are intended to be run from the project root directory. `cmt` expects the file path of your codemeta.json file as well as one or more target files to be generated. The target file's extension determines the generated content. The tool can generate the following project files based on the contents of the codemeta.json file. `cme` expects the file path of your codemeta.json file and optionally the attributes of the CodeMeta object you wish to manage.
7
7
8
-
`cme` is used to create manage "codemeta.json". `cmt` is used to generate the following.
8
+
`cme` is used to create and manage "codemeta.json". `cmt` is used to generate the following.
9
9
10
10
- CITATION.cff
11
11
- version.ts, version.js, version.go or version.py
@@ -14,21 +14,22 @@ The tools are intended to be run from the project root directory. `cmt` expects
14
14
15
15
## Create and manage your file
16
16
17
-
`cme` is for managing your "codemeta.json" file. Using the "interactive" option it will prompt for the various top level attributes and allow you to set them. For complex list attributes like "author", "contributor", "maintainer" you can enter those using YAML notation. Here's an example of setting up to use `cme` to create and edit the "codemeta.json" file.
17
+
`cme` is for managing your "codemeta.json" file. If only the "codemeta.json" file is provided then you'll be in an "interactive" mode. You will be prompted for each top level attribute. You either press enter and accept the current value or replace the value. For complex attributes like "author", and "keywords"[^1] you use YAML notation followed by a line containing only a period to indicate completion. If you enter only the line with a period then the current value remains. Here's an example of setting up to use `cme` to create and edit the "codemeta.json" file.
18
+
19
+
[^1]: For a full list of complex fields see the user manual for `cme`.
18
20
19
21
~~~shell
20
-
# Set our EDITOR environment variable
21
-
export EDITOR=micro
22
-
cme -e -i codemeta.json
22
+
cme codemeta.json
23
23
~~~
24
24
25
-
The will let you iterate over the top level CodeMeta object attributes. For multi line or list attributes your favorate editor will be used to create or update the values.
25
+
The will let you iterate over the top level CodeMeta object attributes. For multi line or list attributes your favorite editor will be used to create or update the values.
26
+
27
+
Here's an example of updating the version and `.releaseNotes` attributes but instead of the direct input you edit the value using the Micro Editor[^2].
26
28
27
-
Here's an example of updating the version and `.releaseNotes` attributes (I assume you have the
28
-
EDITOR environment variable already set).
29
+
[^2]: You need to have [Micro Editor](http://micro-editor.github.io) installed for this to work.
29
30
30
31
~~~shell
31
-
cme -e codemeta.json version releaseNotes
32
+
cme codemeta.json version releaseNotes -e
32
33
~~~
33
34
34
35
Since the version is short you'll just be prompted to type in a new version string. You release notes maybe longer so for that you'll drop into your editor.
0 commit comments