review-retrovert 0.9.1 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/retrovert.yml +32 -10
- data/Dockerfile +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +59 -60
- data/README.md +68 -3
- data/lib/review/retrovert/cli.rb +6 -2
- data/lib/review/retrovert/converter.rb +235 -40
- data/lib/review/retrovert/version.rb +1 -1
- data/lib/review/retrovert/yamlconfig.rb +33 -2
- data/review-retrovert.gemspec +1 -1
- data/testdata/mybook/catalog.yml +1 -0
- data/testdata/mybook/config-retrovert.yml +7 -0
- data/testdata/mybook/config.yml +1 -1
- data/testdata/mybook/contents/r0-inner.re +2 -0
- data/testdata/mybook/contents/r0-root.re +9 -0
- metadata +8 -12
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02507e93743d82045d68c54d9aa2acec9666def48b1187b7577e1e70ade8a4f5
|
4
|
+
data.tar.gz: f2121fe5b228534e7f1ada87cbce40d35674cc7f1b92f2de14d04e500ef5b640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edcf427bdad063863a08aff465863a8a6f6f0fc626b8491aab77df8902b46439239298fe21e220b2a7e8e712f93367267ae3a7a7a3a67eb89780a56f3e72ab03
|
7
|
+
data.tar.gz: 66b55029a3127ad59626c8852c883a9c1d264be675686d4562d56ec9e58ee41458aa89e9a6a49e9a506684902256f18924b68f0a68bafa7fd53de37af1088f13
|
@@ -8,12 +8,22 @@ name: Retrovert
|
|
8
8
|
jobs:
|
9
9
|
review:
|
10
10
|
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
review-version: [ "3.2", "4.2", "5.0" ]
|
14
|
+
fail-fast: false
|
11
15
|
steps:
|
12
16
|
- uses: actions/checkout@v2
|
13
17
|
- uses: ruby/setup-ruby@v1
|
14
18
|
with:
|
15
19
|
ruby-version: 2.6
|
16
|
-
- run:
|
20
|
+
- run: |
|
21
|
+
rm -f Gemfile.lock
|
22
|
+
cp Gemfile Gemfile-${{ matrix.review-version }}
|
23
|
+
echo 'gem "review", "${{ matrix.review-version }}"' >> Gemfile-${{ matrix.review-version }}
|
24
|
+
cat Gemfile-${{ matrix.review-version }}
|
25
|
+
echo "BUNDLE_GEMFILE=Gemfile-${{ matrix.review-version }}" >> $GITHUB_ENV
|
26
|
+
- run: bundle install --gemfile=Gemfile-${{ matrix.review-version }}
|
17
27
|
# spec
|
18
28
|
- name: spec
|
19
29
|
run: bundle exec rake spec
|
@@ -21,19 +31,31 @@ jobs:
|
|
21
31
|
- name: convert
|
22
32
|
run: bundle exec review-retrovert convert testdata/mybook/config.yml tmp -f
|
23
33
|
# build
|
24
|
-
- name: review build
|
25
|
-
|
34
|
+
# - name: review build
|
35
|
+
# uses: ${{ matrix.uses }}
|
36
|
+
# with:
|
37
|
+
# entrypoint: bash
|
38
|
+
# args: -c "cd tmp; rake preproc all"
|
39
|
+
# docker login
|
40
|
+
- name: Login to DockerHub
|
41
|
+
uses: docker/login-action@v1
|
26
42
|
with:
|
27
|
-
|
28
|
-
|
43
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
44
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
45
|
+
- name: build html
|
46
|
+
run: |
|
47
|
+
docker run --rm -v "$(pwd)/tmp":/work -w /work vvakame/review:${{ matrix.review-version }} rake preproc html
|
48
|
+
- name: build pdf
|
49
|
+
run: |
|
50
|
+
docker run --rm -v "$(pwd)/tmp":/work -w /work vvakame/review:${{ matrix.review-version }} rake preproc pdf
|
29
51
|
# artifacts
|
30
52
|
- name: artifacts
|
31
53
|
uses: actions/upload-artifact@v1
|
32
54
|
with:
|
33
55
|
name: mybook
|
34
56
|
path: tmp/mybook.pdf
|
35
|
-
- name: artifacts
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
57
|
+
# - name: artifacts
|
58
|
+
# uses: actions/upload-artifact@v1
|
59
|
+
# with:
|
60
|
+
# name: mybook
|
61
|
+
# path: tmp/mybook.epub
|
data/Dockerfile
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,68 +1,67 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
review-retrovert (0.
|
5
|
-
review (>= 3.
|
4
|
+
review-retrovert (0.9.6)
|
5
|
+
review (>= 3.0.0)
|
6
6
|
thor
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (6.
|
11
|
+
activesupport (6.1.1)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
-
i18n (>=
|
14
|
-
minitest (
|
15
|
-
tzinfo (~>
|
16
|
-
zeitwerk (~> 2.
|
17
|
-
aruba (1.0.
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
16
|
+
zeitwerk (~> 2.3)
|
17
|
+
aruba (1.0.4)
|
18
18
|
childprocess (>= 2.0, < 5.0)
|
19
19
|
contracts (~> 0.16.0)
|
20
|
-
cucumber (>= 2.4, <
|
21
|
-
ffi (~> 1.9)
|
20
|
+
cucumber (>= 2.4, < 6.0)
|
22
21
|
rspec-expectations (~> 3.4)
|
23
22
|
thor (~> 1.0)
|
24
23
|
builder (3.2.4)
|
25
24
|
childprocess (4.0.0)
|
26
|
-
concurrent-ruby (1.1.
|
25
|
+
concurrent-ruby (1.1.7)
|
27
26
|
contracts (0.16.0)
|
28
|
-
cucumber (
|
29
|
-
builder (~> 3.2, >= 3.2.
|
30
|
-
cucumber-core (~>
|
31
|
-
cucumber-create-meta (~>
|
32
|
-
cucumber-cucumber-expressions (~> 10.
|
33
|
-
cucumber-gherkin (~>
|
34
|
-
cucumber-html-formatter (~>
|
35
|
-
cucumber-messages (~>
|
36
|
-
cucumber-wire (~>
|
37
|
-
diff-lcs (~> 1.
|
27
|
+
cucumber (5.2.0)
|
28
|
+
builder (~> 3.2, >= 3.2.4)
|
29
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
30
|
+
cucumber-create-meta (~> 2.0, >= 2.0.2)
|
31
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
32
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
33
|
+
cucumber-html-formatter (~> 9.0, >= 9.0.0)
|
34
|
+
cucumber-messages (~> 13.1, >= 13.1.0)
|
35
|
+
cucumber-wire (~> 4.0, >= 4.0.1)
|
36
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
38
37
|
multi_test (~> 0.1, >= 0.1.2)
|
39
|
-
sys-uname (~> 1.
|
40
|
-
cucumber-core (
|
41
|
-
cucumber-gherkin (~>
|
42
|
-
cucumber-messages (~>
|
38
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
39
|
+
cucumber-core (8.0.1)
|
40
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
41
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
43
42
|
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
|
44
|
-
cucumber-create-meta (
|
45
|
-
cucumber-messages (~>
|
43
|
+
cucumber-create-meta (2.0.4)
|
44
|
+
cucumber-messages (~> 13.1, >= 13.1.0)
|
46
45
|
sys-uname (~> 1.2, >= 1.2.1)
|
47
|
-
cucumber-cucumber-expressions (10.
|
48
|
-
cucumber-gherkin (
|
49
|
-
cucumber-messages (~>
|
50
|
-
cucumber-html-formatter (
|
51
|
-
cucumber-messages (~>
|
52
|
-
cucumber-messages (
|
46
|
+
cucumber-cucumber-expressions (10.3.0)
|
47
|
+
cucumber-gherkin (15.0.2)
|
48
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
49
|
+
cucumber-html-formatter (9.0.0)
|
50
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
51
|
+
cucumber-messages (13.2.1)
|
53
52
|
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
54
53
|
cucumber-tag-expressions (2.0.4)
|
55
|
-
cucumber-wire (
|
56
|
-
cucumber-core (~>
|
57
|
-
cucumber-cucumber-expressions (~> 10.
|
58
|
-
cucumber-messages (~>
|
59
|
-
diff-lcs (1.
|
60
|
-
ffi (1.
|
61
|
-
i18n (1.8.
|
54
|
+
cucumber-wire (4.0.1)
|
55
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
56
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
57
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
58
|
+
diff-lcs (1.4.4)
|
59
|
+
ffi (1.14.2)
|
60
|
+
i18n (1.8.7)
|
62
61
|
concurrent-ruby (~> 1.0)
|
63
|
-
image_size (2.0
|
62
|
+
image_size (2.1.0)
|
64
63
|
middleware (0.1.0)
|
65
|
-
minitest (5.14.
|
64
|
+
minitest (5.14.3)
|
66
65
|
multi_test (0.1.2)
|
67
66
|
protobuf-cucumber (3.10.8)
|
68
67
|
activesupport (>= 3.2)
|
@@ -70,32 +69,32 @@ GEM
|
|
70
69
|
thor
|
71
70
|
thread_safe
|
72
71
|
rake (12.3.3)
|
73
|
-
review (
|
72
|
+
review (5.0.0)
|
74
73
|
image_size
|
75
74
|
rouge
|
76
75
|
rubyzip
|
77
|
-
rouge (3.
|
78
|
-
rspec (3.
|
79
|
-
rspec-core (~> 3.
|
80
|
-
rspec-expectations (~> 3.
|
81
|
-
rspec-mocks (~> 3.
|
82
|
-
rspec-core (3.
|
83
|
-
rspec-support (~> 3.
|
84
|
-
rspec-expectations (3.
|
76
|
+
rouge (3.26.0)
|
77
|
+
rspec (3.10.0)
|
78
|
+
rspec-core (~> 3.10.0)
|
79
|
+
rspec-expectations (~> 3.10.0)
|
80
|
+
rspec-mocks (~> 3.10.0)
|
81
|
+
rspec-core (3.10.1)
|
82
|
+
rspec-support (~> 3.10.0)
|
83
|
+
rspec-expectations (3.10.1)
|
85
84
|
diff-lcs (>= 1.2.0, < 2.0)
|
86
|
-
rspec-support (~> 3.
|
87
|
-
rspec-mocks (3.
|
85
|
+
rspec-support (~> 3.10.0)
|
86
|
+
rspec-mocks (3.10.1)
|
88
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
89
|
-
rspec-support (~> 3.
|
90
|
-
rspec-support (3.
|
88
|
+
rspec-support (~> 3.10.0)
|
89
|
+
rspec-support (3.10.1)
|
91
90
|
rubyzip (2.3.0)
|
92
|
-
sys-uname (1.2.
|
93
|
-
ffi (
|
91
|
+
sys-uname (1.2.2)
|
92
|
+
ffi (~> 1.1)
|
94
93
|
thor (1.0.1)
|
95
94
|
thread_safe (0.3.6)
|
96
|
-
tzinfo (
|
97
|
-
|
98
|
-
zeitwerk (2.4.
|
95
|
+
tzinfo (2.0.4)
|
96
|
+
concurrent-ruby (~> 1.0)
|
97
|
+
zeitwerk (2.4.2)
|
99
98
|
|
100
99
|
PLATFORMS
|
101
100
|
ruby
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# ReVIEW::Retrovert
|
6
6
|
|
7
|
-
[Re:VIEW Starter](https://kauplan.org/reviewstarter/) Project convert to [Re:VIEW](https://reviewml.org/ja/) 3.X
|
7
|
+
[Re:VIEW Starter](https://kauplan.org/reviewstarter/) Project convert to [Re:VIEW](https://reviewml.org/ja/) 3.X/4.X/5.X
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -21,13 +21,78 @@ And then execute:
|
|
21
21
|
Or install it yourself as:
|
22
22
|
|
23
23
|
$ gem install review-retrovert
|
24
|
+
|
25
|
+
## Use Docker
|
24
26
|
|
25
|
-
|
27
|
+
```
|
28
|
+
docker run -v "$(pwd):/work" -w /work srzzumix/review-retrovert convert target/config.yml outdir
|
29
|
+
```
|
30
|
+
|
31
|
+
## Commands
|
32
|
+
|
33
|
+
```sh
|
34
|
+
Commands:
|
35
|
+
review-retrovert convert {review_starter_configfile} {outdir} # convert Re:VIEW Starter project to Re:VIEW project
|
36
|
+
review-retrovert help [COMMAND] # Describe available commands or one specific command
|
37
|
+
review-retrovert version # show version
|
38
|
+
```
|
39
|
+
|
40
|
+
### Convert
|
41
|
+
|
42
|
+
#### e.g.
|
26
43
|
|
27
44
|
```sh
|
28
45
|
review-retrovert convert /path/to/dir/review-starter/config.yml <output directory>
|
29
46
|
```
|
30
47
|
|
48
|
+
#### Options
|
49
|
+
|
50
|
+
```sh
|
51
|
+
sage:
|
52
|
+
review-retrovert convert {review_starter_configfile} {outdir}
|
53
|
+
|
54
|
+
Options:
|
55
|
+
f, [--force] # Force output
|
56
|
+
[--strict], [--no-strict] # Only process files registered in the catalog
|
57
|
+
[--preproc], [--no-preproc] # Execute preproc after conversion
|
58
|
+
[--tabwidth=N] # Preproc tabwidth option value
|
59
|
+
# Default: 0
|
60
|
+
[--table-br-replace=TABLE-BR-REPLACE] # @<br>{} in table replace string (Default: empty)
|
61
|
+
[--table-empty-replace=TABLE-EMPTY-REPLACE] # empty cell(.) in table replace string (Default full-width space)
|
62
|
+
# Default:
|
63
|
+
[--ird], [--no-ird] # for IRD
|
64
|
+
[--no-image] # donot copy image
|
65
|
+
|
66
|
+
convert Re:VIEW Starter project to Re:VIEW project
|
67
|
+
```
|
68
|
+
|
69
|
+
#### retrovert config
|
70
|
+
|
71
|
+
If the retrovert key is present in config.yml, the subordinate elements will take effect after convert.
|
72
|
+
|
73
|
+
If you have a setting that you want to enable only after retrovert, use inherit as shown below.
|
74
|
+
|
75
|
+
* config-retrovert.yml
|
76
|
+
|
77
|
+
```yml
|
78
|
+
retrovert:
|
79
|
+
chapterlink: null
|
80
|
+
```
|
81
|
+
|
82
|
+
* config-base.yml
|
83
|
+
|
84
|
+
```yml
|
85
|
+
chapterlink: true
|
86
|
+
```
|
87
|
+
|
88
|
+
* config.yml
|
89
|
+
|
90
|
+
```yml
|
91
|
+
inherit: ["config-base.yml", "config-starter.yml", "config-retrovert.yml"]
|
92
|
+
|
93
|
+
#chapterlink: true
|
94
|
+
```
|
95
|
+
|
31
96
|
## Development
|
32
97
|
|
33
98
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -40,7 +105,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/srz-zu
|
|
40
105
|
|
41
106
|
## Develop
|
42
107
|
|
43
|
-
docker run -it --rm -v $(pwd)/:/work -w /work vvakame/review:
|
108
|
+
docker run -it --rm -v $(pwd)/:/work -w /work vvakame/review:5.0 bash
|
44
109
|
|
45
110
|
## License
|
46
111
|
|
data/lib/review/retrovert/cli.rb
CHANGED
@@ -7,8 +7,12 @@ module ReVIEW
|
|
7
7
|
desc "convert {review_starter_configfile} {outdir}", "convert Re:VIEW Starter project to Re:VIEW project"
|
8
8
|
method_option "force", aliases: "f", desc: 'Force output', type: :boolean
|
9
9
|
method_option "strict", desc: 'Only process files registered in the catalog', type: :boolean
|
10
|
-
method_option "
|
11
|
-
method_option "
|
10
|
+
method_option "preproc", desc: 'Execute preproc after conversion', type: :boolean
|
11
|
+
method_option "tabwidth", desc: 'Preproc tabwidth option value', type: :numeric, default: 0
|
12
|
+
method_option "table-br-replace", desc: '@<br>{} in table replace string (Default: empty)', type: :string, default: ''
|
13
|
+
method_option "table-empty-replace", desc: 'empty cell(.) in table replace string (Default full-width space)', type: :string, default: ' '
|
14
|
+
method_option "ird", desc: 'for IRD', type: :boolean
|
15
|
+
method_option "no-image", desc: 'donot copy image', type: :boolean
|
12
16
|
def convert(review_starter_configfile, outdir)
|
13
17
|
Converter.execute(review_starter_configfile, outdir, options)
|
14
18
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "review"
|
2
2
|
require 'fileutils'
|
3
|
+
require 'tmpdir'
|
3
4
|
require "review/retrovert/yamlconfig"
|
4
5
|
|
5
6
|
module ReVIEW
|
@@ -13,6 +14,9 @@ module ReVIEW
|
|
13
14
|
@outimagedir = nil
|
14
15
|
@logger = ReVIEW.logger
|
15
16
|
@configs = YamlConfig.new
|
17
|
+
@embeded_contents = []
|
18
|
+
@catalog_contents = []
|
19
|
+
@ird = false
|
16
20
|
end
|
17
21
|
|
18
22
|
def error(msg)
|
@@ -45,21 +49,50 @@ module ReVIEW
|
|
45
49
|
FileUtils.cp_r(Dir.glob(File.join(path, '*.re')), outdir)
|
46
50
|
end
|
47
51
|
|
48
|
-
def
|
52
|
+
def get_out_imagedir(outdir)
|
49
53
|
imagedir = @config['imagedir']
|
50
|
-
srcpath = File.join(@basedir, imagedir)
|
51
54
|
outimagedir = File.basename(imagedir) # Re:VIEW not support sub-directory
|
52
55
|
outpath = File.join(outdir, outimagedir)
|
56
|
+
return outpath
|
57
|
+
end
|
58
|
+
|
59
|
+
def store_out_image(outdir)
|
60
|
+
outpath = get_out_imagedir(outdir)
|
61
|
+
if File.exist?(outpath)
|
62
|
+
dir = Dir.mktmpdir('review-retrovert')
|
63
|
+
FileUtils.mv(Dir.glob(File.join(outpath, "**/*")), dir)
|
64
|
+
return dir
|
65
|
+
end
|
66
|
+
return nil
|
67
|
+
end
|
68
|
+
|
69
|
+
def restore_out_image(outpath, tmpdir)
|
70
|
+
if File.exist?(tmpdir)
|
71
|
+
FileUtils.mkdir_p(outpath)
|
72
|
+
FileUtils.mv(Dir.glob(File.join(tmpdir, "**/*")), outpath)
|
73
|
+
FileUtils.rm_rf(tmpdir)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def copy_images(outdir, store_image_dir)
|
78
|
+
imagedir = @config['imagedir']
|
79
|
+
outimagedir = File.basename(imagedir) # Re:VIEW not support sub-directory
|
80
|
+
outpath = get_out_imagedir(outdir)
|
53
81
|
FileUtils.mkdir_p(outpath)
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
82
|
+
if store_image_dir
|
83
|
+
restore_out_image(outpath, store_image_dir)
|
84
|
+
else
|
85
|
+
srcpath = File.join(@basedir, imagedir)
|
86
|
+
image_ext = @config['image_ext']
|
87
|
+
srcroot = Pathname.new(srcpath)
|
88
|
+
image_ext.each { |ext|
|
89
|
+
Dir.glob(File.join(srcpath, "**/*.#{ext}")).each { |srcimg|
|
90
|
+
outimg = File.join(outpath, Pathname.new(srcimg).relative_path_from(srcroot))
|
91
|
+
FileUtils.makedirs(File.dirname(outimg))
|
92
|
+
FileUtils.cp(srcimg, outimg)
|
93
|
+
}
|
61
94
|
}
|
62
|
-
|
95
|
+
end
|
63
96
|
@configs.rewrite_yml('imagedir', outimagedir)
|
64
97
|
end
|
65
98
|
|
@@ -67,10 +100,24 @@ module ReVIEW
|
|
67
100
|
@configs.rewrite_yml('contentdir', '.')
|
68
101
|
@configs.rewrite_yml('hook_beforetexcompile', 'null')
|
69
102
|
@configs.rewrite_yml('texstyle', '["reviewmacro"]')
|
103
|
+
pagesize = @config['starter']['pagesize'].downcase
|
104
|
+
@configs.rewrite_yml_array('texdocumentclass', "[\"review-jsbook\", \"media=print,paper=#{pagesize}\"]")
|
105
|
+
@config['retrovert'].each{ |k,v|
|
106
|
+
unless v..is_a?(Hash)
|
107
|
+
@configs.commentout_root_yml(k)
|
108
|
+
end
|
109
|
+
}
|
110
|
+
if @ird
|
111
|
+
@configs.rewrite_yml('chapterlink', 'null')
|
112
|
+
end
|
70
113
|
end
|
71
114
|
|
72
115
|
def replace_compatible_block_command_outline(content, command, new_command, option_count)
|
73
|
-
|
116
|
+
if option_count > 0
|
117
|
+
content.gsub!(/^\/\/#{command}(?<option>(\[[^\r\n]*?\]){0,#{option_count}})(\[[^\r\n]*\])*{(?<inner>.*?)\/\/}/m, "//#{new_command}\\k<option>{\\k<inner>//}")
|
118
|
+
else
|
119
|
+
content.gsub!(/^\/\/#{command}(\[[^\r\n]*\])*{(?<inner>.*?)\/\/}/m, "//#{new_command}{\\k<inner>//}")
|
120
|
+
end
|
74
121
|
end
|
75
122
|
|
76
123
|
def replace_compatible_block_command_to_outside(content, command, new_command, option_count, add_options="", new_body="")
|
@@ -105,22 +152,29 @@ module ReVIEW
|
|
105
152
|
content.gsub!(/@<#{command}>/, "@<#{new_command}>")
|
106
153
|
end
|
107
154
|
|
108
|
-
def
|
155
|
+
def replace_block_command_nested_boxed_article_i(content, box, depth)
|
109
156
|
found = false
|
110
157
|
content.dup.scan(/(^\/\/#{box})(\[[^\r\n]*?\])*(?:(\$)|(?:({)|(\|)))(.*?)(^\/\/)(?(3)(\$)|(?(4)(})|(\|)).*?[\r\n]+)/m) { |m|
|
111
158
|
matched = m[0..-1].join
|
112
159
|
inner = m[5]
|
160
|
+
# info depth
|
113
161
|
im = inner.match(/^\/\/(\w+)((\[.*?\])*)([$|{])/)
|
114
162
|
unless im.nil?
|
115
163
|
inner_cmd = im[1]
|
116
164
|
inner_open = im[4]
|
117
165
|
inner_opts = im[2]
|
118
|
-
|
166
|
+
first_opt_m = inner_opts.match(/^\[(.*?)\]/)
|
167
|
+
first_opt = ""
|
119
168
|
|
169
|
+
# is_commentout = false
|
120
170
|
is_commentout = true
|
121
|
-
|
122
|
-
|
123
|
-
|
171
|
+
if first_opt_m
|
172
|
+
first_opt_v = first_opt_m[1]
|
173
|
+
unless first_opt_v.empty?
|
174
|
+
if inner.match(/@<.*?>[$|{]#{first_opt}/)
|
175
|
+
is_commentout = false
|
176
|
+
first_opt = "\\[#{first_opt_v}\\]"
|
177
|
+
end
|
124
178
|
end
|
125
179
|
end
|
126
180
|
cmd_begin = m[0..4].join
|
@@ -129,10 +183,10 @@ module ReVIEW
|
|
129
183
|
if inner_open == m[2..4].join
|
130
184
|
# if same fence then cmd_end == inner_end
|
131
185
|
if is_commentout
|
132
|
-
inner.gsub!(/(^\/\/(\w
|
186
|
+
inner.gsub!(/(^\/\/(\w+(\[.*?\]|))*#{inner_open})/, '#@#\1')
|
133
187
|
content.gsub!(/#{Regexp.escape(matched)}/m, "#{cmd_begin}#{inner}#@##{cmd_end}")
|
134
188
|
else
|
135
|
-
imb = inner.match(/(\R((^\/\/\w+(\[.*?\])*)\s*)
|
189
|
+
imb = inner.match(/(\R((^\/\/\w+(\[.*?\])*)\s*)*^\/\/#{inner_cmd}#{first_opt}(\[.*?\])*#{inner_open}.*)\R/m)
|
136
190
|
to_out_block = imb[1]
|
137
191
|
inner.gsub!(/#{Regexp.escape(to_out_block)}/m, '')
|
138
192
|
content.gsub!(/#{Regexp.escape(matched)}/m, "#{cmd_begin}#{inner}#{cmd_end}#{to_out_block}")
|
@@ -140,10 +194,10 @@ module ReVIEW
|
|
140
194
|
else
|
141
195
|
close = inner_open == '{' ? '}' : inner_open
|
142
196
|
if is_commentout
|
143
|
-
inner.gsub!(/(^\/\/(\w
|
197
|
+
inner.gsub!(/(^\/\/(\w+(\[.*?\]|))*#{inner_open})(.*?)(^\/\/#{close})/m, '#@#\1\2#@#\3')
|
144
198
|
content.gsub!(/#{Regexp.escape(matched)}/m, "#{cmd_begin}#{inner}#{cmd_end}")
|
145
199
|
else
|
146
|
-
imb = inner.match(/\R((^\/\/\w+(\[.*?\])*)\s*)*^\/\/(
|
200
|
+
imb = inner.match(/\R((^\/\/\w+(\[.*?\])*)\s*)*^\/\/(#{inner_cmd})#{first_opt}(\[[^\r\n]*?\])*(?:(\$)|(?:({)|(\|)))(.*?)(^\/\/)(?(3)(\$)|(?(4)(})|(\|)))/m)
|
147
201
|
to_out_block = imb[0]
|
148
202
|
inner.gsub!(/#{Regexp.escape(to_out_block)}/m, '')
|
149
203
|
content.gsub!(/#{Regexp.escape(matched)}/m, "#{cmd_begin}#{inner}#{cmd_end}#{to_out_block}")
|
@@ -153,22 +207,38 @@ module ReVIEW
|
|
153
207
|
end
|
154
208
|
}
|
155
209
|
if found
|
156
|
-
|
210
|
+
replace_block_command_nested_boxed_article_i(content, box, depth+1)
|
157
211
|
end
|
158
212
|
end
|
159
213
|
|
214
|
+
def replace_block_command_nested_boxed_article(content, box)
|
215
|
+
replace_block_command_nested_boxed_article_i(content, box, 0)
|
216
|
+
end
|
217
|
+
|
160
218
|
def replace_block_command_nested_boxed_articles(content)
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
219
|
+
unless Gem::Version.new(ReVIEW::VERSION) >= Gem::Version.new('5.0.0')
|
220
|
+
replace_block_command_nested_boxed_article(content, 'note')
|
221
|
+
replace_block_command_nested_boxed_article(content, 'memo')
|
222
|
+
replace_block_command_nested_boxed_article(content, 'tip')
|
223
|
+
replace_block_command_nested_boxed_article(content, 'info')
|
224
|
+
replace_block_command_nested_boxed_article(content, 'warning')
|
225
|
+
replace_block_command_nested_boxed_article(content, 'important')
|
226
|
+
replace_block_command_nested_boxed_article(content, 'caution')
|
227
|
+
replace_block_command_nested_boxed_article(content, 'notice')
|
228
|
+
end
|
169
229
|
end
|
170
230
|
|
171
231
|
def replace_block_commentout(content)
|
232
|
+
d = content.dup
|
233
|
+
d.scan(/(^#@)(\++)(.*?)(^#@)(-+)/m) { |m|
|
234
|
+
matched = m[0..-1].join
|
235
|
+
inner = m[2]
|
236
|
+
inner.gsub!(/(^.)/, '#@#\1')
|
237
|
+
content.gsub!(/#{Regexp.escape(matched)}/m, "#@##{m[1]}#{inner}#@##{m[4]}")
|
238
|
+
}
|
239
|
+
end
|
240
|
+
|
241
|
+
def replace_block_commentout_without_sampleout(content)
|
172
242
|
d = content.dup
|
173
243
|
d.gsub!(/(^\/\/sampleoutputbegin\[)(.*?)(\])(.*?)(^\/\/sampleoutputend)/m, '')
|
174
244
|
d.scan(/(^#@)(\++)(.*?)(^#@)(-+)/m) { |m|
|
@@ -180,7 +250,7 @@ module ReVIEW
|
|
180
250
|
end
|
181
251
|
|
182
252
|
def replace_sampleoutput(content)
|
183
|
-
|
253
|
+
# replace_block_commentout_without_sampleout(content)
|
184
254
|
content.dup.scan(/(^\/\/sampleoutputbegin\[)(.*?)(\].*?\R)(.*?)(^\/\/sampleoutputend)/m) { |m|
|
185
255
|
matched = m[0..-1].join
|
186
256
|
sampleoutputbegin = m[0..2].join
|
@@ -201,6 +271,12 @@ module ReVIEW
|
|
201
271
|
end
|
202
272
|
end
|
203
273
|
|
274
|
+
def fix_deprecated_list(content)
|
275
|
+
if Gem::Version.new(ReVIEW::VERSION) >= Gem::Version.new('4.0.0')
|
276
|
+
content.gsub!(/^: (.*)/, ' : \1')
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
204
280
|
def remove_starter_refid(content)
|
205
281
|
# note - noteref
|
206
282
|
content.dup.scan(/(@<noteref>)(?:(\$)|(?:({)|(\|)))(.*?)(?(2)(\$)|(?(3)(})|(\|)))/) { |m|
|
@@ -258,16 +334,49 @@ module ReVIEW
|
|
258
334
|
outpath = File.join(File.absolute_path(outdir), filepath)
|
259
335
|
FileUtils.mkdir_p(File.dirname(outpath))
|
260
336
|
FileUtils.cp(srcpath, outpath)
|
337
|
+
@embeded_contents.push(filepath[0])
|
261
338
|
update_content(outpath, outpath)
|
262
339
|
end
|
263
340
|
end
|
264
341
|
end
|
265
342
|
|
343
|
+
def make_id_label(name)
|
344
|
+
name.gsub(/[^A-Za-z0-9]/, '_')
|
345
|
+
end
|
346
|
+
|
347
|
+
def add_linkurl_footnote(content, filename)
|
348
|
+
urls = {}
|
349
|
+
content.dup.scan(/(^.*)(@<href>{)(.*?)(,)(.*?)(})(.*)$/) { |m|
|
350
|
+
unless m[0].match(/^#@#/)
|
351
|
+
matched = m.join
|
352
|
+
prev = m[0]
|
353
|
+
url = m[2]
|
354
|
+
text = m[4]
|
355
|
+
post = m[6]
|
356
|
+
id = "#{make_id_label(filename)}_link_auto_footnote#{urls.length}"
|
357
|
+
urls[id] = url
|
358
|
+
content.sub!(/#{Regexp.escape(matched)}$/, "#{prev}@<href>{#{url},#{text}} @<fn>{#{id}} #{post}")
|
359
|
+
end
|
360
|
+
}
|
361
|
+
|
362
|
+
urls.each { |k,v|
|
363
|
+
content.sub!(/(@<href>{#{v},.*?} @<fn>{#{k}}.*?\R\R)/m, "\\1//footnote[#{k}][#{v}]\n")
|
364
|
+
}
|
365
|
+
|
366
|
+
urls.each { |k,v|
|
367
|
+
unless content.match(/\/\/footnote\[#{k}\]\[#{v}\]/)
|
368
|
+
content << "//footnote[#{k}][#{v}]\n"
|
369
|
+
end
|
370
|
+
}
|
371
|
+
end
|
372
|
+
|
266
373
|
def update_content(outdir, contentfile)
|
267
374
|
info contentfile
|
375
|
+
filename = File.basename(contentfile, '.*')
|
268
376
|
content = File.read(contentfile)
|
269
377
|
content.gsub!(/@<href>{(.*?)#.*?,(.*?)}/, '@<href>{\1,\2}')
|
270
378
|
content.gsub!(/@<href>{(.*?)#.*?}/, '@<href>{\1}')
|
379
|
+
linkurl_footnote = @config['starter']['linkurl_footnote']
|
271
380
|
# table 内の @ コマンドは不安定らしい
|
272
381
|
while !content.gsub!(/(\/\/table.*)@<br>{}(.*?\/\/})/m, "\\1#{@table_br_replace}\\2").nil? do
|
273
382
|
end
|
@@ -276,15 +385,20 @@ module ReVIEW
|
|
276
385
|
end
|
277
386
|
# Re:VIEW Starter commands
|
278
387
|
replace_compatible_block_command_outline(content, 'terminal', 'cmd', 1)
|
388
|
+
replace_compatible_block_command_outline(content, 'cmd', 'cmd', 0)
|
279
389
|
replace_compatible_block_command_to_outside(content, 'sideimage', 'image', 1, '[]')
|
280
390
|
replace_block_command_outline(content, 'abstract', 'lead', true)
|
281
391
|
delete_block_command(content, 'needvspace')
|
282
392
|
delete_block_command(content, 'clearpage')
|
283
393
|
delete_block_command(content, 'flushright')
|
284
394
|
delete_block_command(content, 'centering')
|
285
|
-
delete_block_command(content, 'noindent')
|
286
395
|
delete_block_command(content, 'paragraphend')
|
287
396
|
|
397
|
+
# delete IRD unsupported commands
|
398
|
+
if @ird
|
399
|
+
delete_block_command(content, 'noindent')
|
400
|
+
end
|
401
|
+
|
288
402
|
replace_inline_command(content, 'secref', 'hd')
|
289
403
|
replace_inline_command(content, 'file', 'kw')
|
290
404
|
replace_inline_command(content, 'hlink', 'href')
|
@@ -302,10 +416,21 @@ module ReVIEW
|
|
302
416
|
|
303
417
|
# fixed lack of options
|
304
418
|
content.gsub!(/^\/\/list{/, '//list[][]{')
|
419
|
+
# empty br line to blankline
|
420
|
+
content.gsub!(/^\s*@<br>{}\s*$/, '//blankline')
|
421
|
+
|
422
|
+
if Gem::Version.new(ReVIEW::VERSION) >= Gem::Version.new('4.0.0')
|
423
|
+
# empty caption is not allow
|
424
|
+
content.gsub!(/^\/\/image\[(.*)\]\[\]{/, '//image[\1][ ]{')
|
425
|
+
end
|
305
426
|
|
306
427
|
# special command
|
307
428
|
replace_sampleoutput(content)
|
308
429
|
|
430
|
+
if linkurl_footnote
|
431
|
+
add_linkurl_footnote(content, filename)
|
432
|
+
end
|
433
|
+
|
309
434
|
# nested command
|
310
435
|
replace_block_command_nested_boxed_articles(content)
|
311
436
|
|
@@ -317,6 +442,9 @@ module ReVIEW
|
|
317
442
|
remove_starter_refid(content)
|
318
443
|
remove_starter_options(content)
|
319
444
|
|
445
|
+
# replace block comment
|
446
|
+
replace_block_commentout(content)
|
447
|
+
|
320
448
|
# special charactor
|
321
449
|
content.gsub!('@<LaTeX>{}', 'LaTeX')
|
322
450
|
content.gsub!('@<TeX>{}', 'TeX')
|
@@ -330,6 +458,15 @@ module ReVIEW
|
|
330
458
|
# expand nested inline command
|
331
459
|
expand_nested_inline_command(content)
|
332
460
|
|
461
|
+
# fix deprecated
|
462
|
+
fix_deprecated_list(content)
|
463
|
+
|
464
|
+
if @ird
|
465
|
+
# br to blankline
|
466
|
+
content.gsub!(/(.*)@<br>{}$/, "\\1\n\n")
|
467
|
+
content.gsub!(/(.*)@<br>{}(.*)$/, "\\1\n\n\\2")
|
468
|
+
end
|
469
|
+
|
333
470
|
File.write(contentfile, content)
|
334
471
|
copy_embedded_contents(outdir, content)
|
335
472
|
end
|
@@ -338,8 +475,13 @@ module ReVIEW
|
|
338
475
|
files = contentfiles.is_a?(String) ? contentfiles.split(/\R/) : contentfiles
|
339
476
|
files.each do |content|
|
340
477
|
contentpath = File.join(contentdir, content)
|
478
|
+
srccontentpath = File.join(@srccontentsdir, content)
|
479
|
+
if @embeded_contents.include?(srccontentpath)
|
480
|
+
info "skip copy maped file #{contentpath}"
|
481
|
+
next
|
482
|
+
end
|
341
483
|
unless File.exist?(contentpath)
|
342
|
-
srcpath = File.join(
|
484
|
+
srcpath = File.join(@basedir, srccontentpath)
|
343
485
|
# info srcpath
|
344
486
|
if File.exist?(srcpath)
|
345
487
|
FileUtils.cp(srcpath, contentdir)
|
@@ -355,16 +497,48 @@ module ReVIEW
|
|
355
497
|
contentdir = abspath
|
356
498
|
info 'replace starter block command'
|
357
499
|
info 'replace starter inline command'
|
500
|
+
catalog = ReVIEW::Catalog.new(File.open(File.join(abspath, yamlfile)))
|
501
|
+
update_content_files(outdir, contentdir, @catalog_contents)
|
502
|
+
unless options['strict']
|
503
|
+
all_contentsfiles = Pathname.glob(File.join(File.join(@basedir, @srccontentsdir), '*.re')).map(&:basename)
|
504
|
+
contentsfiles = all_contentsfiles.select{ |path| ! @catalog_contents.include?(path.to_s) }
|
505
|
+
update_content_files(outdir, contentdir, contentsfiles)
|
506
|
+
end
|
507
|
+
end
|
508
|
+
|
509
|
+
def preproc_content_files(outdir, pp, contentdir, contentfiles)
|
510
|
+
files = contentfiles.is_a?(String) ? contentfiles.split(/\R/) : contentfiles
|
511
|
+
files.each do |content|
|
512
|
+
contentpath = File.join(contentdir, content)
|
513
|
+
if File.exist?(contentpath)
|
514
|
+
info "preproc #{contentpath}"
|
515
|
+
buf = StringIO.new
|
516
|
+
pwd = Dir.pwd
|
517
|
+
Dir.chdir(outdir)
|
518
|
+
File.open(contentpath) { |f| pp.process(f, buf) }
|
519
|
+
Dir.chdir(pwd)
|
520
|
+
content = buf.string
|
521
|
+
content.gsub!(/^#[@]map.*$/, '')
|
522
|
+
content.gsub!(/^#[@]end$/, '')
|
523
|
+
File.write(contentpath, content)
|
524
|
+
end
|
525
|
+
end
|
526
|
+
end
|
527
|
+
|
528
|
+
def preproc_contents(outdir, options)
|
529
|
+
yamlfile = @config['catalogfile']
|
530
|
+
abspath = File.absolute_path(outdir)
|
531
|
+
contentdir = abspath
|
532
|
+
param = {}
|
533
|
+
param['tabwidth'] = options['tabwidth'].to_i
|
534
|
+
pp = ReVIEW::Preprocessor.new(ReVIEW::Repository.new(param), param)
|
535
|
+
|
358
536
|
if options['strict']
|
359
537
|
catalog = ReVIEW::Catalog.new(File.open(File.join(abspath, yamlfile)))
|
360
|
-
|
361
|
-
update_content_files(outdir, contentdir, catalog.chaps())
|
362
|
-
update_content_files(outdir, contentdir, catalog.appendix())
|
363
|
-
update_content_files(outdir, contentdir, catalog.postdef())
|
538
|
+
preproc_content_files(outdir, pp, contentdir, @catalog_contents)
|
364
539
|
else
|
365
|
-
# copy_contents(outdir)
|
366
540
|
contentsfiles = Pathname.glob(File.join(File.join(@basedir, @srccontentsdir), '*.re')).map(&:basename)
|
367
|
-
|
541
|
+
preproc_content_files(outdir, pp, contentdir, contentsfiles)
|
368
542
|
end
|
369
543
|
end
|
370
544
|
|
@@ -375,11 +549,22 @@ module ReVIEW
|
|
375
549
|
FileUtils.rm(Dir.glob(File.join(outdir, '*.re')))
|
376
550
|
end
|
377
551
|
|
552
|
+
def add_catalog_contents(contentfiles)
|
553
|
+
files = contentfiles.is_a?(String) ? contentfiles.split(/\R/) : contentfiles
|
554
|
+
@catalog_contents.concat(files)
|
555
|
+
end
|
556
|
+
|
378
557
|
def load_config(yamlfile)
|
379
558
|
@configs.open(yamlfile)
|
380
559
|
@config = @configs.config
|
381
560
|
@basedir = @configs.basedir
|
382
561
|
@srccontentsdir = @config['contentdir']
|
562
|
+
|
563
|
+
catalog = ReVIEW::Catalog.new(File.open(@configs.catalogfile()))
|
564
|
+
add_catalog_contents(catalog.predef())
|
565
|
+
add_catalog_contents(catalog.chaps())
|
566
|
+
add_catalog_contents(catalog.appendix())
|
567
|
+
add_catalog_contents(catalog.postdef())
|
383
568
|
end
|
384
569
|
|
385
570
|
def create_initial_project(outdir, options)
|
@@ -391,12 +576,14 @@ module ReVIEW
|
|
391
576
|
def execute(yamlfile, outdir, options)
|
392
577
|
@table_br_replace = options['table-br-replace']
|
393
578
|
@table_empty_replace = options['table-empty-replace']
|
579
|
+
@ird = options['ird']
|
394
580
|
load_config(yamlfile)
|
581
|
+
store_image_dir = store_out_image(outdir) if options['no-image']
|
395
582
|
create_initial_project(outdir, options)
|
396
583
|
|
397
584
|
copy_config(outdir)
|
398
585
|
copy_catalog(outdir)
|
399
|
-
copy_images(outdir)
|
586
|
+
copy_images(outdir, store_image_dir)
|
400
587
|
update_config(outdir)
|
401
588
|
update_contents(outdir, options)
|
402
589
|
|
@@ -405,8 +592,16 @@ module ReVIEW
|
|
405
592
|
updater = ReVIEW::Update.new
|
406
593
|
updater.force = true
|
407
594
|
# updater.backup = false
|
408
|
-
|
595
|
+
begin
|
596
|
+
updater.execute()
|
597
|
+
rescue
|
598
|
+
end
|
409
599
|
Dir.chdir(pwd)
|
600
|
+
|
601
|
+
if options['preproc']
|
602
|
+
info 'preproc'
|
603
|
+
preproc_contents(outdir, options)
|
604
|
+
end
|
410
605
|
end
|
411
606
|
|
412
607
|
def self.execute(yamlfile, outdir, options)
|
@@ -87,9 +87,19 @@ module ReVIEW
|
|
87
87
|
rewrite_retrovert_yml()
|
88
88
|
end
|
89
89
|
|
90
|
+
def commentout(yamlfile, key)
|
91
|
+
content = File.read(yamlfile)
|
92
|
+
content.gsub!(/^(\s*)#{key}:(.*)$/, "#\\1#{key}:\\2")
|
93
|
+
File.write(yamlfile, content)
|
94
|
+
end
|
95
|
+
|
96
|
+
def commentout_root_yml(key)
|
97
|
+
commentout(File.join(@basedir, @basename), key)
|
98
|
+
end
|
99
|
+
|
90
100
|
def rewrite_yml_(yamlfile, key, val)
|
91
101
|
content = File.read(yamlfile)
|
92
|
-
content.gsub!(/^(\s*)#{key}:.*$/,
|
102
|
+
content.gsub!(/^(\s*)#{key}:.*$/, "\\1#{key}: #{val}")
|
93
103
|
File.write(yamlfile, content)
|
94
104
|
end
|
95
105
|
|
@@ -99,6 +109,18 @@ module ReVIEW
|
|
99
109
|
}
|
100
110
|
end
|
101
111
|
|
112
|
+
def rewrite_yml_array_(yamlfile, key, val)
|
113
|
+
content = File.read(yamlfile)
|
114
|
+
content.gsub!(/^(\s*)#{key}:\s*\[.*?\]/m, '\1' + "#{key}: #{val}")
|
115
|
+
File.write(yamlfile, content)
|
116
|
+
end
|
117
|
+
|
118
|
+
def rewrite_yml_array(key, val)
|
119
|
+
config_files.each { |current_file|
|
120
|
+
rewrite_yml_array_(File.join(@basedir, current_file), key, val)
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
102
124
|
def rewrite_retrovert_yml()
|
103
125
|
@retrovert_configs.each { |current_file|
|
104
126
|
yamlfile = File.expand_path(current_file, @basedir)
|
@@ -109,6 +131,7 @@ module ReVIEW
|
|
109
131
|
# YAML.dump(yaml, File.open(yamlfile, "w"))
|
110
132
|
content = Psych.dump(yaml)
|
111
133
|
content.gsub!('---','')
|
134
|
+
content.gsub!(/^(.*):\s*$/, '\1: null')
|
112
135
|
File.write(yamlfile, content)
|
113
136
|
}
|
114
137
|
end
|
@@ -125,6 +148,14 @@ module ReVIEW
|
|
125
148
|
return yaml
|
126
149
|
end
|
127
150
|
|
151
|
+
def path()
|
152
|
+
File.join(@basedir, @basename)
|
153
|
+
end
|
154
|
+
|
155
|
+
def catalogfile()
|
156
|
+
File.join(@basedir, @config['catalogfile'])
|
157
|
+
end
|
158
|
+
|
128
159
|
end
|
129
160
|
end
|
130
|
-
end
|
161
|
+
end
|
data/review-retrovert.gemspec
CHANGED
data/testdata/mybook/catalog.yml
CHANGED
data/testdata/mybook/config.yml
CHANGED
@@ -15,7 +15,7 @@ review_version: 2.0
|
|
15
15
|
# その値がB.ymlよりも優先される。
|
16
16
|
# 同様にA.yml、B.yml内でさらにinherit:パラメータを使うこともできる。
|
17
17
|
# inherit: ["A.yml", "B.yml"]
|
18
|
-
inherit: ["config-starter.yml"]
|
18
|
+
inherit: ["config-starter.yml", "config-retrovert.yml"]
|
19
19
|
|
20
20
|
# ブック名(ファイル名になるもの。ASCII範囲の文字を使用)
|
21
21
|
bookname: mybook
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: review-retrovert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- srz_zumix
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -44,20 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.
|
48
|
-
- - "<"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '4.0'
|
47
|
+
version: 3.0.0
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
52
|
- - ">="
|
56
53
|
- !ruby/object:Gem::Version
|
57
|
-
version: 3.
|
58
|
-
- - "<"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '4.0'
|
54
|
+
version: 3.0.0
|
61
55
|
description: Re:VIEW Starter to Re:VIEW
|
62
56
|
email:
|
63
57
|
- zumix.cpp@gmail.com
|
@@ -74,7 +68,6 @@ files:
|
|
74
68
|
- ".gitignore"
|
75
69
|
- ".rspec"
|
76
70
|
- ".ruby-version"
|
77
|
-
- ".travis.yml"
|
78
71
|
- CHANGELOG.md
|
79
72
|
- Dockerfile
|
80
73
|
- Gemfile
|
@@ -97,6 +90,7 @@ files:
|
|
97
90
|
- testdata/mybook/README.md
|
98
91
|
- testdata/mybook/Rakefile
|
99
92
|
- testdata/mybook/catalog.yml
|
93
|
+
- testdata/mybook/config-retrovert.yml
|
100
94
|
- testdata/mybook/config-starter.yml
|
101
95
|
- testdata/mybook/config.yml
|
102
96
|
- testdata/mybook/contents/00-preface.re
|
@@ -110,6 +104,8 @@ files:
|
|
110
104
|
- testdata/mybook/contents/92-filelist.re
|
111
105
|
- testdata/mybook/contents/93-background.re
|
112
106
|
- testdata/mybook/contents/99-postface.re
|
107
|
+
- testdata/mybook/contents/r0-inner.re
|
108
|
+
- testdata/mybook/contents/r0-root.re
|
113
109
|
- testdata/mybook/css/normalize.css
|
114
110
|
- testdata/mybook/css/webstyle.css
|
115
111
|
- testdata/mybook/images/03-syntax/favicon-16x16.png
|
@@ -196,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
192
|
- !ruby/object:Gem::Version
|
197
193
|
version: '0'
|
198
194
|
requirements: []
|
199
|
-
rubygems_version: 3.1.
|
195
|
+
rubygems_version: 3.1.4
|
200
196
|
signing_key:
|
201
197
|
specification_version: 4
|
202
198
|
summary: Re:VIEW Starter to Re:VIEW
|