metanorma-cli 1.5.0 → 1.5.1pre

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: 10cc309ff314ca31ff04136b7b9e2a981d781fd60896ccc66761ee8dc06cfb45
4
+ data.tar.gz: a9d4cebc65c9262a26be6e560ffd9b63e52ae28b7b341cf60ddd476c7cc272e9
5
5
  SHA512:
6
- metadata.gz: 82a275d58231c0989eab46cf097a486c4bbca98ecc77cc15ae233d7e1fbd73338dc7b56eb2b317670466b114927f684b08977cbbde892e1a39a8e59eba52f548
7
- data.tar.gz: 03b818073b6b39ee5545732949714ec2f85a45567ae385a709ab01667d075e57a6e80ec342079e05f0610f9fd6960e84fdc62abd2c1955e4817066bdc2fe78b1
6
+ metadata.gz: e7bd2b661690fff1255bb8de6986d1285427a4197d50aca722c5ae09a8a716c6226f67ad6714fbd04f9d35dfa518faaf89caafb3e3b8307fecc03e8a7c1d2f6a
7
+ data.tar.gz: 2126cb2901a0aafc877e532cdf8d499a571b43981e83a220e783622fac450368d1b2a793b417d6ad3ef9290b71a08bcc5b1eec4cfeefa74b01b7759bf405abb5
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.1pre".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.1pre
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-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -509,9 +509,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
509
509
  version: 2.5.0
510
510
  required_rubygems_version: !ruby/object:Gem::Requirement
511
511
  requirements:
512
- - - ">="
512
+ - - ">"
513
513
  - !ruby/object:Gem::Version
514
- version: '0'
514
+ version: 1.3.1
515
515
  requirements: []
516
516
  rubygems_version: 3.2.22
517
517
  signing_key: