metanorma-cli 1.5.0 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5419e7db087c36a77374043a69faa01025d1dda03613cb9ded9c55b535bdbed6
4
- data.tar.gz: 86c51d24bc217efc69fb35a0009255af1e360f7c94e6af240ee08972888c51f4
3
+ metadata.gz: 75433112416d221107bfe4026cfa96eadddee6db08cd443b3a30062a42e2156b
4
+ data.tar.gz: 0e94f5d9d66bd2feaf6df97f2e5e4967f3182fb0f35b86f2203f231924c75304
5
5
  SHA512:
6
- metadata.gz: 82a275d58231c0989eab46cf097a486c4bbca98ecc77cc15ae233d7e1fbd73338dc7b56eb2b317670466b114927f684b08977cbbde892e1a39a8e59eba52f548
7
- data.tar.gz: 03b818073b6b39ee5545732949714ec2f85a45567ae385a709ab01667d075e57a6e80ec342079e05f0610f9fd6960e84fdc62abd2c1955e4817066bdc2fe78b1
6
+ metadata.gz: b71badf1d32af2dc89c1eaeb4f4af97f3719503fb6ea88646a15cedea3c30d0cbfc2c67bfdb29131bf735d9b2b00e6de93b14eb948add486ac2a895e3e72fcb5
7
+ data.tar.gz: d53dbfc4f1999a2f80d02e8351298a48954ac076a8550baa257814c14b67d3dc807ea9bd7cc3e422aec758f3303f220c8d705c7fe7c701bbc3b2ce0abb53bceb
data/docs/usage.adoc CHANGED
@@ -1,21 +1,75 @@
1
1
  = Using the Metanorma CLI
2
2
 
3
- == Usage sample
3
+ == Usage samples
4
+
5
+ For a single document:
6
+ [source,sh]
7
+ ----
8
+ $ metanorma iso-my-standard-document.adoc
9
+ ----
10
+
11
+ or
4
12
 
5
13
  [source,sh]
6
14
  ----
7
15
  $ metanorma --type iso -x html iso-my-standard-document.adoc
8
16
  ----
9
17
 
18
+ if type and extensions are not defined in adoc header
19
+
10
20
  == Full syntax & options
11
21
 
22
+ General help message can be shown by `metanorma help`
23
+
12
24
  [source,sh]
13
25
  ----
14
- $ metanorma --type <chosen-type> \
15
- [--format input-format] \
16
- [--extensions EXT1,EXT2...] \
17
- iso-my-standard-document.adoc
26
+ Commands:
27
+ metanorma collection FILENAME -w, --output-folder=OUTPUT_FOLDER # Render HTML pages from XML/YAML colection
28
+ metanorma compile FILENAME # Compile to a metanorma document
29
+ metanorma config # Manage configuration file
30
+ metanorma help [COMMAND] # Describe available commands or one specific command
31
+ metanorma list-doctypes # List supported doctypes
32
+ metanorma list-extensions # List supported extensions
33
+ metanorma new NAME -d, --doctype=DOCTYPE -t, --type=TYPE # Create new Metanorma document
34
+ metanorma site # Manage site for metanorma collections
35
+ metanorma template-repo # Manage metanorma templates repository
36
+ metanorma version # Version of the code
37
+
38
+ Options:
39
+ -s, [--no-progress], [--no-no-progress] # Don't show progress for long running tasks (like download)
40
+ # Default: true
41
+ ----
42
+
43
+ Also you can get a help message for a specific command for example `metanorma help compile`:
44
+
45
+ [source,sh]
18
46
  ----
47
+ Usage:
48
+ metanorma compile FILENAME
49
+
50
+ Options:
51
+ -t, [--type=TYPE] # Type of standard to generate
52
+ -x, [--extensions=EXTENSIONS] # Type of extension to generate per type
53
+ -f, [--format=FORMAT] # Format of source file: eg. asciidoc
54
+ # Default: asciidoc
55
+ -r, [--require=REQUIRE] # Require LIBRARY prior to execution
56
+ -w, [--wrapper], [--no-wrapper] # Create wrapper folder for HTML output
57
+ -a, [--asciimath], [--no-asciimath] # Keep Asciimath in XML output instead of converting it to MathM
58
+ -d, [--datauriimage], [--no-datauriimage] # Encode HTML output images as data URIs
59
+ -R, [--relaton=RELATON] # Export Relaton XML for document to nominated filename
60
+ -e, [--extract=EXTRACT] # Export sourcecode fragments from this document to nominated directory
61
+ -v, [--version=VERSION] # Print version of code (accompanied with -t)
62
+ -o, [--output-dir=OUTPUT_DIR] # Directory to save compiled files
63
+ [--agree-to-terms], [--no-agree-to-terms] # Agree / Disagree with all third-party licensing terms presented (WARNING: do know what you are agreeing with!)
64
+ [--no-install-fonts], [--no-no-install-fonts] # Skip the font installation process
65
+ [--continue-without-fonts], [--no-continue-without-fonts] # Continue processing even when fonts are missing
66
+ -s, [--no-progress], [--no-no-progress] # Don't show progress for long running tasks (like download)
67
+ # Default: true
68
+
69
+ Compile to a metanorma document
70
+ ----
71
+
72
+ A bit more details on options:
19
73
 
20
74
  `type`:: (mandatory, specified via `--type` or `-t`) takes one of the following types:
21
75
  `rfc2`, `rfc3`, `iso`, `gb`, `csd`, `csand`, `m3d`, `rsd`. Each of these corresponds to a
@@ -28,6 +82,8 @@ what has been defined for each standard type. All standards can generate Metanor
28
82
  and at least one of HTML (`html`), DOC (`doc`), PDF (`pdf`). Some standards generate alternative
29
83
  HTML renderings (e.g. `html_alt` for ISO).
30
84
 
85
+ Actual list of supported `types` and `extension`s you can get with `metanorma list-doctypes`
86
+
31
87
  `wrapper`:: create a separate folder for each instance of HTML output generated; the folder is named
32
88
  the same as the output file, without the `.html` suffix. Used to make distribution of HTML outputs
33
89
  more straightforward.
@@ -47,24 +103,3 @@ $ metanorma -t mpfd mpfd-bpn.adoc
47
103
  $ metanorma -t mpfd -r metanorma-mpfd mpfd-bpn.adoc
48
104
  ----
49
105
 
50
- == Command-line help
51
-
52
- [source,sh]
53
- ----
54
- $ metanorma help
55
- Commands:
56
- metanorma collection FILENAME -w, --output-folder=OUTPUT_FOLDER # Render HTML pages from XML/YAML colection
57
- metanorma compile FILENAME # Compile to a metanorma document
58
- metanorma config # Manage configuration file
59
- metanorma help [COMMAND] # Describe available commands or one specific command
60
- metanorma list-doctypes # List supported doctypes
61
- metanorma list-extensions # List supported extensions
62
- metanorma new NAME -d, --doctype=DOCTYPE -t, --type=TYPE # Create new Metanorma document
63
- metanorma site # Manage site for metanorma collections
64
- metanorma template-repo # Manage metanorma templates repository
65
- metanorma version # Version of the code
66
-
67
- Options:
68
- -s, [--no-progress], [--no-no-progress] # Don't show progress for long running tasks (like download)
69
- # Default: true
70
- ----
@@ -78,6 +78,7 @@ module Metanorma
78
78
  format: :asciidoc, output_dir: build_asset_output_directory(source)
79
79
  )
80
80
 
81
+ options[:baseassetpath] = Pathname.new(source.to_s).dirname.to_s
81
82
  Metanorma::Cli::Compiler.compile(source.to_s, options)
82
83
  end
83
84
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cli
3
- VERSION = "1.5.0".freeze
3
+ VERSION = "1.5.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-25 00:00:00.000000000 Z
11
+ date: 2021-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug