Class: Metanorma::Tools::Cli
- Inherits:
-
Thor
- Object
- Thor
- Metanorma::Tools::Cli
- Defined in:
- lib/metanorma/tools/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #__version ⇒ Object
- #extract_images(input_xml) ⇒ Object
- #fetch_iso(document_id) ⇒ Object
- #help(command = nil) ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
8 9 10 |
# File 'lib/metanorma/tools/cli.rb', line 8 def self.exit_on_failure? true end |
Instance Method Details
#__version ⇒ Object
15 16 17 |
# File 'lib/metanorma/tools/cli.rb', line 15 def __version puts Metanorma::Tools::VERSION end |
#extract_images(input_xml) ⇒ Object
34 35 36 37 |
# File 'lib/metanorma/tools/cli.rb', line 34 def extract_images(input_xml) extractor = FigureExtractor.new() extractor.extract(input_xml, [:output_dir], [:prefix]) end |
#fetch_iso(document_id) ⇒ Object
46 47 48 49 50 |
# File 'lib/metanorma/tools/cli.rb', line 46 def fetch_iso(document_id) puts "ISO document fetching functionality is planned for future release." puts "This will fetch ISO documents from the OBP into Metanorma format." puts "Document ID: #{document_id}" end |
#help(command = nil) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/metanorma/tools/cli.rb', line 54 def help(command = nil) if command.nil? puts " Metanorma Tools - Standards Editing Lifecycle Support\n =====================================================\n\n Metanorma Tools supports the lifecycle of standards editing for various flavors\n to facilitate pre and post-compilation of Metanorma documents.\n\n Available tools:\n \u2022 Figure extraction - Extract embedded figures from Metanorma presentation XML files\n \u2022 Comment management - Manage ISO comment sheets (planned)\n \u2022 ISO document fetching - Fetch documents from OBP (planned)\n\n For detailed documentation, see the docs/ directory:\n \u2022 docs/figure-extraction.adoc - Figure extraction guide\n \u2022 docs/iso-drg-filename-guidance.adoc - ISO DRG compliance guidance\n\n Commands:\n HELP\n end\n super\nend\n" |