xantora 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e62bb76f892c8c6d8ae8f6ec720e1ddeb5f8d7fe51ff40d932cfcaa3c320fc7b
4
- data.tar.gz: 725c922eed0d2c2e6aad23c86617a9d682174930b17e185f5a8e368887fe60ea
3
+ metadata.gz: 2b6544ba69c27e9bd6d6395d26ea28fd7a079c53a5e397de7aa03175e016f762
4
+ data.tar.gz: d1f69ad17bbb6ee8b58daf37cc0f3c51c9060a63f73957fd7f2dbcc2978d667a
5
5
  SHA512:
6
- metadata.gz: 5b69af38b6f177fd99e88553c76b6e5fd3ae5e35dc59933eeecea533814fe27630f764378b2822573540565ce276d34a7791a70b9d76f4f0b3828a90ee4a7431
7
- data.tar.gz: 3b2e555986bb077b8846105b7fbfa236a01761c1fc4ae83f0729c9b3ce86cace840541f9700fbb0f6ce87c80fef33b503af66ded41100e5ac3fb1c6fe0efa315
6
+ metadata.gz: df2c234502ef88e5f16e96bbdac1ca6a083cfb11506fd24b2f75f31583d85d31b853a35d111fe636ce4a7092fcce3a9c9d808687141ab4ecac6ea1ce2c81de99
7
+ data.tar.gz: f5a93f5486f7eed96e43c7f058ada1aad59b20412843d0623fa7bf8155885927bffeda789881cc10717646ec0ec043c1657f1a2e938419d2c5fb0eb97916bb92
data/README.md CHANGED
@@ -17,19 +17,19 @@ gem install xantora
17
17
  Convert a single AsciiDoc document:
18
18
 
19
19
  ```bash
20
- xantora convert -s modules/user-guide/pages/index.adoc
20
+ xantora convert modules/user-guide/pages/index.adoc
21
21
  ```
22
22
 
23
23
  Convert a all documents within an Antora component:
24
24
 
25
25
  ```bash
26
- xantora convert -s modules/
26
+ xantora convert modules/
27
27
  ```
28
28
 
29
29
  Convert all documents and store PDF's in the attachment folders (using option `--to-attachments` or `-A`):
30
30
 
31
31
  ```bash
32
- xantora convert-modules -s modules/ --to-attachments
32
+ xantora convert modules/ --to-attachments
33
33
  ```
34
34
 
35
35
  See `xantora help` for more usage instructions.
data/lib/xantora/cli.rb CHANGED
@@ -20,11 +20,11 @@ module Xantora
20
20
  end
21
21
  map %w[--version -v] => :version
22
22
 
23
- desc "convert", "Convert Antora document(s) to PDF"
24
- option :source,
25
- desc: "Antora document (.adoc) or modules path",
26
- aliases: %w[-s],
27
- required: true
23
+ desc "convert SOURCE (.adoc or modules-path)", "Convert Antora a document(s) to PDF. SOURCE can be an AsciiDoc-file or an Antora modules-path."
24
+ # option :source,
25
+ # desc: "Antora document (.adoc) or modules path",
26
+ # aliases: %w[-s],
27
+ # required: true
28
28
  option :output,
29
29
  desc: "destination file or directory",
30
30
  aliases: %w[-o],
@@ -39,12 +39,12 @@ module Xantora
39
39
  type: :boolean,
40
40
  aliases: %w[-A],
41
41
  default: false
42
- def convert
43
- if File.directory? options[:source]
42
+ def convert(source)
43
+ if File.directory? source #options[:source]
44
44
  puts "[.] Scanning module directory for .adoc files ..."
45
45
  Dir.glob("#{options[:source]}/**/pages/*.adoc") { |file| convert_document(file, options) }
46
46
  elsif options[:source].end_with? ".adoc"
47
- convert_document(options[:source], options)
47
+ convert_document(source, options)
48
48
  else
49
49
  puts "[error] No valid source detected."
50
50
  exit 1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Xantora
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xantora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nik Wolfgramm