asciibook 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/book_template/asciibook.yml +12 -4
- data/lib/asciibook/builders/pdf_builder.rb +1 -0
- data/lib/asciibook/command.rb +23 -4
- data/lib/asciibook/version.rb +1 -1
- data/templates/inline_callout.html +1 -1
- data/theme/share/default.css +6 -1
- metadata +30 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb4347a438a375868d0a2173c66ea9519341d167eb4a2ea963cb54d614c3cac4
|
4
|
+
data.tar.gz: c1f4dadda074a10b9a4431dbbf2ef975083b8c1c25beb316e547c918671b910b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0bf598a7570cacd63f6939c55a115f28651b375d87711a08486a6419af87947521ab12ada2b6984efacc3716d3226411f62109b552f877ddd4090c9e1095cad
|
7
|
+
data.tar.gz: 0db9909fc5f9cb62775d5d3452522090e79567352cbdd433b9d1162e97bec5a9e0989245f637551c26b5b6cab47d87c8e5f894127ea2969b4f1fbddec0fb5094
|
data/book_template/asciibook.yml
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
source: book.adoc
|
2
|
-
#formats:
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
2
|
+
# formats:
|
3
|
+
# - html
|
4
|
+
# - pdf
|
5
|
+
# - epub
|
6
|
+
# - mobi
|
7
|
+
#
|
8
|
+
# theme_dir:
|
9
|
+
# template_dir:
|
10
|
+
# page_level: 1
|
11
|
+
#
|
12
|
+
# plugins:
|
13
|
+
# - asciidoctor-diagram
|
data/lib/asciibook/command.rb
CHANGED
@@ -38,10 +38,18 @@ module Asciibook
|
|
38
38
|
File.open(File.join(dir, 'asciibook.yml'), 'w') do |file|
|
39
39
|
file.write <<~EOF
|
40
40
|
source: #{filename}
|
41
|
-
#formats:
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
41
|
+
# formats:
|
42
|
+
# - html
|
43
|
+
# - pdf
|
44
|
+
# - epub
|
45
|
+
# - mobi
|
46
|
+
#
|
47
|
+
# theme_dir:
|
48
|
+
# template_dir:
|
49
|
+
# page_level: 1
|
50
|
+
#
|
51
|
+
# plugins:
|
52
|
+
# - asciidoctor-diagram
|
45
53
|
EOF
|
46
54
|
end
|
47
55
|
else
|
@@ -58,6 +66,7 @@ module Asciibook
|
|
58
66
|
c.option :template_dir, '--template-dir DIR', 'Template dir.'
|
59
67
|
c.option :dest_dir, '--dest-dir DIR', 'Destination dir.'
|
60
68
|
c.option :page_level, '--page-level NUM', Integer, 'Page split base on section level, default is 1.'
|
69
|
+
c.option :plugins, '-r', '--require PLUGIN1[,PLUGIN2[,PLUGIN3...]]', Array, 'Require plugins'
|
61
70
|
c.action do |args, options|
|
62
71
|
source = args[0] || '.'
|
63
72
|
if File.directory?(source)
|
@@ -66,8 +75,10 @@ module Asciibook
|
|
66
75
|
hash
|
67
76
|
end
|
68
77
|
options = config_options.merge(options)
|
78
|
+
load_plugins(options[:plugins])
|
69
79
|
Asciibook::Book.load_file(options.delete(:source), options).build
|
70
80
|
elsif File.file?(source)
|
81
|
+
load_plugins(options[:plugins])
|
71
82
|
Asciibook::Book.load_file(source, options).build
|
72
83
|
else
|
73
84
|
abort "Build target '#{source}' neither a folder nor a file"
|
@@ -81,5 +92,13 @@ module Asciibook
|
|
81
92
|
|
82
93
|
p.go(argv)
|
83
94
|
end
|
95
|
+
|
96
|
+
def self.load_plugins(plugins)
|
97
|
+
if plugins
|
98
|
+
plugins.each do |plugin|
|
99
|
+
require plugin
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
84
103
|
end
|
85
104
|
end
|
data/lib/asciibook/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<a class="callout" id="callout-{{ node.id }}" href="#colist-{{ node.id }}">{{ node.text }}</a>
|
1
|
+
<a class="callout" id="callout-{{ node.id }}" href="#colist-{{ node.id }}">{{ node.text }}</a>
|
data/theme/share/default.css
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciibook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rei
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3
|
33
|
+
version: '0.3'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3
|
40
|
+
version: '0.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: liquid
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '5.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: gepub
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,38 +70,52 @@ dependencies:
|
|
70
70
|
name: mercenary
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '0.4'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
82
|
+
version: '0.4'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rouge
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
89
|
+
version: '3.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
96
|
+
version: '3.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: nokogiri
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
|
-
type: :
|
118
|
+
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
@@ -205,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
219
|
- !ruby/object:Gem::Version
|
206
220
|
version: '0'
|
207
221
|
requirements: []
|
208
|
-
rubygems_version: 3.
|
222
|
+
rubygems_version: 3.1.6
|
209
223
|
signing_key:
|
210
224
|
specification_version: 4
|
211
225
|
summary: ''
|