madowu 0.0.7 → 0.0.8
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 +4 -4
- data/CHANGES +10 -0
- data/Gemfile +1 -0
- data/VERSION +1 -1
- data/bin/dirmap +5 -1
- data/bin/figchange +56 -0
- data/bin/isbninfo +24 -10
- data/bin/tex2image +1 -1
- data/example/Rakefile +70 -58
- data/example/doc/.gitignore +2 -0
- data/example/doc/Rakefile +121 -0
- data/example/doc/gnuplot_with_dat.dat +20 -0
- data/example/doc/gnuplot_with_dat.plt +10 -0
- data/example/doc/gnuplot_without_dat.plt +20 -0
- data/example/doc/graphviz.dot +6 -0
- data/example/doc/index.md +20 -0
- data/example/doc/madowu.css +183 -0
- data/example/doc/povray.pov +15 -0
- data/example/doc/ruby_with_dat.dat +431 -0
- data/example/doc/ruby_with_dat.rb +60 -0
- data/example/doc/ruby_without_dat.rb +36 -0
- data/example/doc/svg.svg +6703 -0
- data/example/doc/tex.tex +7 -0
- data/lib/madowu.rb +3 -1
- data/lib/madowu/bookinfo.rb +99 -0
- data/lib/madowu/directorymapper.rb +13 -7
- data/lib/madowu/htmlgenerator.rb +1 -1
- data/madowu.gemspec +26 -6
- data/test/directorymapper/dir3/dir/foo.md +0 -0
- data/test/test_bookinfo.rb +69 -0
- data/test/test_directorymapper.rb +29 -3
- metadata +36 -4
- data/lib/madowu/isbn.rb +0 -74
- data/test/test_isbn.rb +0 -56
data/example/doc/tex.tex
ADDED
data/lib/madowu.rb
CHANGED
@@ -0,0 +1,99 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
# coding: utf-8
|
3
|
+
|
4
|
+
require 'pp'
|
5
|
+
#Amazon::Ecs.debug = true
|
6
|
+
|
7
|
+
#/home/ippei/.gem/ruby/2.3.0/gems/amazon-ecs-2.4.0/lib/amazon/ecs.rb:141:in `send_request': HTTP Response: 503 Service Unavailable (Amazon::RequestError)
|
8
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/gems/amazon-ecs-2.4.0/lib/amazon/ecs.rb:102:in `item_search'
|
9
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/gems/madowu-0.0.8/lib/madowu/isbn.rb:37:in `initialize'
|
10
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/gems/madowu-0.0.8/bin/isbninfo:9:in `new'
|
11
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/gems/madowu-0.0.8/bin/isbninfo:9:in `block in <top (required)>'
|
12
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/gems/madowu-0.0.8/bin/isbninfo:8:in `each_line'
|
13
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/gems/madowu-0.0.8/bin/isbninfo:8:in `each'
|
14
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/gems/madowu-0.0.8/bin/isbninfo:8:in `<top (required)>'
|
15
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/bin/isbninfo:22:in `load'
|
16
|
+
#>---from /home/ippei/.gem/ruby/2.3.0/bin/isbninfo:22:in `<main>'
|
17
|
+
|
18
|
+
#
|
19
|
+
#
|
20
|
+
#
|
21
|
+
class Madowu::BookInfo
|
22
|
+
|
23
|
+
ROOT_KEY_FILE = ENV['HOME'] + '/.aws/rootkey.csv'
|
24
|
+
ASSOCIATEID_FILE = ENV['HOME'] + '/.aws/associateid'
|
25
|
+
|
26
|
+
attr_reader :title, :author, :isbn, :publisher, :publication_date,
|
27
|
+
:url, :img_url
|
28
|
+
|
29
|
+
class AccountFileError < StandardError; end
|
30
|
+
|
31
|
+
def initialize(title: '',
|
32
|
+
author: '',
|
33
|
+
isbn: '',
|
34
|
+
publisher: '',
|
35
|
+
publication_date: '',
|
36
|
+
url: '',
|
37
|
+
img_url: '')
|
38
|
+
@title = title
|
39
|
+
@author = author
|
40
|
+
@isbn = isbn
|
41
|
+
@publisher = publisher
|
42
|
+
@publication_date = publication_date
|
43
|
+
@url = url
|
44
|
+
@img_url = img_url
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.load_isbn(isbn)
|
48
|
+
[ROOT_KEY_FILE, ASSOCIATEID_FILE].each do |file|
|
49
|
+
raise AccountFileError, "Not found #{file}" unless File.exist? file
|
50
|
+
end
|
51
|
+
|
52
|
+
hash = {}
|
53
|
+
hash[:associate_tag] = File.open(ASSOCIATEID_FILE, 'r').gets.chomp
|
54
|
+
File.open(ROOT_KEY_FILE, 'r').readlines.each do |i|
|
55
|
+
/(.*)=(.*)/ =~ i
|
56
|
+
key, val = $1, $2
|
57
|
+
hash[:AWS_access_key_id] = val.chomp if key == 'AWSAccessKeyId'
|
58
|
+
hash[:AWS_secret_key] = val.chomp if key == 'AWSSecretKey'
|
59
|
+
end
|
60
|
+
Amazon::Ecs.options = hash
|
61
|
+
|
62
|
+
info = nil
|
63
|
+
3.times do |i|
|
64
|
+
begin
|
65
|
+
info = Amazon::Ecs.item_search(
|
66
|
+
isbn,
|
67
|
+
{:search_index => 'Books',
|
68
|
+
:response_group => 'Medium',
|
69
|
+
:country => 'jp'
|
70
|
+
}
|
71
|
+
)
|
72
|
+
#pp i
|
73
|
+
#pp info
|
74
|
+
rescue Amazon::RequestError
|
75
|
+
sleep 1
|
76
|
+
end
|
77
|
+
break if info
|
78
|
+
end
|
79
|
+
|
80
|
+
unless info
|
81
|
+
raise Amazon::RequestError
|
82
|
+
end
|
83
|
+
|
84
|
+
properties = {}
|
85
|
+
info.items.each do |item|
|
86
|
+
properties[:title ] = item.get('ItemAttributes/Title')
|
87
|
+
properties[:author ] = item.get('ItemAttributes/Author')
|
88
|
+
properties[:isbn ] = item.get('ItemAttributes/ISBN')
|
89
|
+
properties[:publisher ] = item.get('ItemAttributes/Publisher')
|
90
|
+
properties[:publication_date] = item.get('ItemAttributes/PublicationDate')
|
91
|
+
properties[:url ] = item.get('DetailPageURL')
|
92
|
+
properties[:img_url ] = item.get('SmallImage/URL')
|
93
|
+
end
|
94
|
+
self.new(properties)
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
end
|
99
|
+
|
@@ -8,9 +8,11 @@ class Madowu::DirectoryMapper
|
|
8
8
|
#
|
9
9
|
#def initialize()
|
10
10
|
#end
|
11
|
-
|
11
|
+
# if index: is given as true, generate link to foo/index.html
|
12
|
+
# even when the file did not exist.
|
13
|
+
def self.dirmap(path: dir, kakasi: false, index: false)
|
12
14
|
results = []
|
13
|
-
md_dir = Pathname.new(
|
15
|
+
md_dir = Pathname.new(path)
|
14
16
|
|
15
17
|
results << "Parent directory:"
|
16
18
|
results << ""
|
@@ -23,7 +25,7 @@ class Madowu::DirectoryMapper
|
|
23
25
|
|
24
26
|
results << "Current directory:"
|
25
27
|
results << ""
|
26
|
-
current_entries = []
|
28
|
+
#current_entries = []
|
27
29
|
cur_dir_entries = Dir.entries(md_dir).sort.delete_if{|i| i =~ /^\./}
|
28
30
|
|
29
31
|
links = []
|
@@ -37,6 +39,9 @@ class Madowu::DirectoryMapper
|
|
37
39
|
elsif FileTest.exist?(path + "index.html")
|
38
40
|
link_path = path + "index.html"
|
39
41
|
title = self.get_title((path + "index.html").to_s)
|
42
|
+
elsif index
|
43
|
+
link_path = path + "index.html"
|
44
|
+
title = "#{path.basename}/"
|
40
45
|
else
|
41
46
|
link_path = path
|
42
47
|
title = nil
|
@@ -62,15 +67,16 @@ class Madowu::DirectoryMapper
|
|
62
67
|
links << [link_path, title]
|
63
68
|
end
|
64
69
|
|
65
|
-
links = links.sort_by do |
|
66
|
-
if
|
70
|
+
links = links.sort_by do |file, title|
|
71
|
+
if kakasi
|
72
|
+
title = title.escape_zsh
|
67
73
|
`echo #{title} | nkf -e | kakasi -JH |nkf -w`
|
68
74
|
else
|
69
75
|
title
|
70
76
|
end
|
71
77
|
end
|
72
|
-
links.each do |
|
73
|
-
results << "* [#{title}](#{
|
78
|
+
links.each do |file, title|
|
79
|
+
results << "* [#{title}](#{file})"
|
74
80
|
end
|
75
81
|
#results << "</ul>"
|
76
82
|
results
|
data/lib/madowu/htmlgenerator.rb
CHANGED
data/madowu.gemspec
CHANGED
@@ -2,19 +2,19 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: madowu 0.0.
|
5
|
+
# stub: madowu 0.0.8 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "madowu"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.8"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["ippei94da"]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2017-04-11"
|
15
15
|
s.description = "Markdown to HTML with table of contents, sidebar to neighboring directories."
|
16
16
|
s.email = "ippei94da@gmail.com"
|
17
|
-
s.executables = ["dirmap", "isbninfo", "madowu", "tex2image", "urltitle"]
|
17
|
+
s.executables = ["dirmap", "figchange", "isbninfo", "madowu", "tex2image", "urltitle"]
|
18
18
|
s.extra_rdoc_files = [
|
19
19
|
"LICENSE.txt",
|
20
20
|
"README.rdoc"
|
@@ -28,12 +28,28 @@ Gem::Specification.new do |s|
|
|
28
28
|
"Rakefile",
|
29
29
|
"VERSION",
|
30
30
|
"bin/dirmap",
|
31
|
+
"bin/figchange",
|
31
32
|
"bin/isbninfo",
|
32
33
|
"bin/madowu",
|
33
34
|
"bin/tex2image",
|
34
35
|
"bin/urltitle",
|
35
36
|
"example/.gitignore",
|
36
37
|
"example/Rakefile",
|
38
|
+
"example/doc/.gitignore",
|
39
|
+
"example/doc/Rakefile",
|
40
|
+
"example/doc/gnuplot_with_dat.dat",
|
41
|
+
"example/doc/gnuplot_with_dat.plt",
|
42
|
+
"example/doc/gnuplot_without_dat.plt",
|
43
|
+
"example/doc/graphviz.dot",
|
44
|
+
"example/doc/independent_eps.eps",
|
45
|
+
"example/doc/index.md",
|
46
|
+
"example/doc/madowu.css",
|
47
|
+
"example/doc/povray.pov",
|
48
|
+
"example/doc/ruby_with_dat.dat",
|
49
|
+
"example/doc/ruby_with_dat.rb",
|
50
|
+
"example/doc/ruby_without_dat.rb",
|
51
|
+
"example/doc/svg.svg",
|
52
|
+
"example/doc/tex.tex",
|
37
53
|
"example/dot.aws/associateid",
|
38
54
|
"example/dot.aws/rootkey.csv",
|
39
55
|
"example/enum.md",
|
@@ -60,9 +76,9 @@ Gem::Specification.new do |s|
|
|
60
76
|
"example/urltitle/madowu.css",
|
61
77
|
"example/urltitle/url.dat",
|
62
78
|
"lib/madowu.rb",
|
79
|
+
"lib/madowu/bookinfo.rb",
|
63
80
|
"lib/madowu/directorymapper.rb",
|
64
81
|
"lib/madowu/htmlgenerator.rb",
|
65
|
-
"lib/madowu/isbn.rb",
|
66
82
|
"madowu.gemspec",
|
67
83
|
"test/directorymapper/.gitignore",
|
68
84
|
"test/directorymapper/dir1/foo.md",
|
@@ -70,6 +86,7 @@ Gem::Specification.new do |s|
|
|
70
86
|
"test/directorymapper/dir2/dir/index.md",
|
71
87
|
"test/directorymapper/dir2/foo.md",
|
72
88
|
"test/directorymapper/dir2/index.html",
|
89
|
+
"test/directorymapper/dir3/dir/foo.md",
|
73
90
|
"test/directorymapper/empty.md",
|
74
91
|
"test/directorymapper/file1.md",
|
75
92
|
"test/directorymapper/head.md",
|
@@ -87,9 +104,9 @@ Gem::Specification.new do |s|
|
|
87
104
|
"test/helper.rb",
|
88
105
|
"test/subdir/empty.md",
|
89
106
|
"test/test.css",
|
107
|
+
"test/test_bookinfo.rb",
|
90
108
|
"test/test_directorymapper.rb",
|
91
109
|
"test/test_htmlgenerator.rb",
|
92
|
-
"test/test_isbn.rb",
|
93
110
|
"test/test_madowu.rb"
|
94
111
|
]
|
95
112
|
s.homepage = "http://github.com/ippei94da/madowu"
|
@@ -108,6 +125,7 @@ Gem::Specification.new do |s|
|
|
108
125
|
s.add_development_dependency(%q<simplecov>, ["~> 0.11"])
|
109
126
|
s.add_development_dependency(%q<amazon-ecs>, ["~> 2.4"])
|
110
127
|
s.add_development_dependency(%q<tefil>, ["~> 0.1"])
|
128
|
+
s.add_development_dependency(%q<builtinextension>, ["~> 0.1"])
|
111
129
|
else
|
112
130
|
s.add_dependency(%q<test-unit>, ["~> 3.2"])
|
113
131
|
s.add_dependency(%q<rdoc>, ["~> 4.2"])
|
@@ -116,6 +134,7 @@ Gem::Specification.new do |s|
|
|
116
134
|
s.add_dependency(%q<simplecov>, ["~> 0.11"])
|
117
135
|
s.add_dependency(%q<amazon-ecs>, ["~> 2.4"])
|
118
136
|
s.add_dependency(%q<tefil>, ["~> 0.1"])
|
137
|
+
s.add_dependency(%q<builtinextension>, ["~> 0.1"])
|
119
138
|
end
|
120
139
|
else
|
121
140
|
s.add_dependency(%q<test-unit>, ["~> 3.2"])
|
@@ -125,6 +144,7 @@ Gem::Specification.new do |s|
|
|
125
144
|
s.add_dependency(%q<simplecov>, ["~> 0.11"])
|
126
145
|
s.add_dependency(%q<amazon-ecs>, ["~> 2.4"])
|
127
146
|
s.add_dependency(%q<tefil>, ["~> 0.1"])
|
147
|
+
s.add_dependency(%q<builtinextension>, ["~> 0.1"])
|
128
148
|
end
|
129
149
|
end
|
130
150
|
|
File without changes
|
@@ -0,0 +1,69 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
# coding: utf-8
|
3
|
+
|
4
|
+
## This test depends on Amazon Web Service...
|
5
|
+
|
6
|
+
require "pp"
|
7
|
+
require "helper"
|
8
|
+
#require "test/unit"
|
9
|
+
#require "pkg/klass.rb"
|
10
|
+
|
11
|
+
|
12
|
+
class Madowu::BookInfo
|
13
|
+
attr_accessor :info
|
14
|
+
end
|
15
|
+
|
16
|
+
#I00 = Madowu::BookInfo.new('479803925X')
|
17
|
+
|
18
|
+
class TC_BookInfo < Test::Unit::TestCase
|
19
|
+
def setup
|
20
|
+
#@i00 = Madowu::BookInfo.new('', 'test/isbn/479803925X.xml')
|
21
|
+
@i00 = Madowu::BookInfo.new(
|
22
|
+
title: 'プログラムはこうして作られるプログラマの頭の中をのぞいてみよう',
|
23
|
+
author: '平山 尚(株式会社セガ)',
|
24
|
+
isbn: '479803925X',
|
25
|
+
publisher: '秀和システム',
|
26
|
+
publication_date: '2013-09-25',
|
27
|
+
url: "http://www.amazon.co.jp/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AF%E3%81%93%E3%81%86%E3%81%97%E3%81%A6%E4%BD%9C%E3%82%89%E3%82%8C%E3%82%8B%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9E%E3%81%AE%E9%A0%AD%E3%81%AE%E4%B8%AD%E3%82%92%E3%81%AE%E3%81%9E%E3%81%84%E3%81%A6%E3%81%BF%E3%82%88%E3%81%86-%E5%B9%B3%E5%B1%B1-%E5%B0%9A-%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%82%BB%E3%82%AC/dp/479803925X%3FSubscriptionId%3DAKIAIRDYXYLFLVKUASUQ%26tag%3Dippei94da-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D479803925X",
|
28
|
+
img_url: "http://ecx.images-amazon.com/images/I/41td-P03xmL._SL75_.jpg"
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_load_isbn
|
33
|
+
#@i00 = Madowu::BookInfo.new('', 'test/isbn/479803925X.xml')
|
34
|
+
#i00 = Madowu::BookInfo.load_isbn('479803925X')
|
35
|
+
#pp i00
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_title
|
39
|
+
assert_equal('プログラムはこうして作られるプログラマの頭の中をのぞいてみよう',
|
40
|
+
@i00.title)
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_author
|
44
|
+
assert_equal('平山 尚(株式会社セガ)', @i00.author)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_isbn
|
48
|
+
assert_equal('479803925X', @i00.isbn)
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_publisher
|
52
|
+
assert_equal('秀和システム', @i00.publisher)
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_publicationDate
|
56
|
+
assert_equal('2013-09-25', @i00.publication_date)
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_url
|
60
|
+
assert_equal("http://www.amazon.co.jp/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AF%E3%81%93%E3%81%86%E3%81%97%E3%81%A6%E4%BD%9C%E3%82%89%E3%82%8C%E3%82%8B%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9E%E3%81%AE%E9%A0%AD%E3%81%AE%E4%B8%AD%E3%82%92%E3%81%AE%E3%81%9E%E3%81%84%E3%81%A6%E3%81%BF%E3%82%88%E3%81%86-%E5%B9%B3%E5%B1%B1-%E5%B0%9A-%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%82%BB%E3%82%AC/dp/479803925X%3FSubscriptionId%3DAKIAIRDYXYLFLVKUASUQ%26tag%3Dippei94da-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D479803925X", @i00.url)
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_img_url
|
64
|
+
assert_equal("http://ecx.images-amazon.com/images/I/41td-P03xmL._SL75_.jpg",
|
65
|
+
@i00.img_url)
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
@@ -25,7 +25,33 @@ class TC_Klass < Test::Unit::TestCase
|
|
25
25
|
#correct << "* [dir/](dir/index.html) (dir index md)"
|
26
26
|
#correct << "* [foo.html](foo.html) (foo md)"
|
27
27
|
#correct << "* [index.html](index.html) (title index.html)"
|
28
|
-
assert_equal(correct, Madowu::DirectoryMapper.dirmap("test/directorymapper/dir2"))
|
28
|
+
assert_equal(correct, Madowu::DirectoryMapper.dirmap(path: "test/directorymapper/dir2"))
|
29
|
+
|
30
|
+
correct = []
|
31
|
+
correct << "Parent directory:"
|
32
|
+
correct << ""
|
33
|
+
correct << "* [../](../)"
|
34
|
+
correct << ""
|
35
|
+
correct << "Current directory:"
|
36
|
+
correct << ""
|
37
|
+
correct << "* [ (dir/)](dir)"
|
38
|
+
#correct << "* [dir/](dir/index.html) (dir index md)"
|
39
|
+
#correct << "* [foo.html](foo.html) (foo md)"
|
40
|
+
#correct << "* [index.html](index.html) (title index.html)"
|
41
|
+
assert_equal(correct, Madowu::DirectoryMapper.dirmap(path: "test/directorymapper/dir3"))
|
42
|
+
|
43
|
+
correct = []
|
44
|
+
correct << "Parent directory:"
|
45
|
+
correct << ""
|
46
|
+
correct << "* [../](../)"
|
47
|
+
correct << ""
|
48
|
+
correct << "Current directory:"
|
49
|
+
correct << ""
|
50
|
+
correct << "* [dir/](dir/index.html)"
|
51
|
+
#correct << "* [dir/](dir/index.html) (dir index md)"
|
52
|
+
#correct << "* [foo.html](foo.html) (foo md)"
|
53
|
+
#correct << "* [index.html](index.html) (title index.html)"
|
54
|
+
assert_equal(correct, Madowu::DirectoryMapper.dirmap(path: "test/directorymapper/dir3", index: true))
|
29
55
|
|
30
56
|
correct = []
|
31
57
|
correct << "Parent directory:"
|
@@ -40,7 +66,7 @@ class TC_Klass < Test::Unit::TestCase
|
|
40
66
|
correct << "* [生命、せいめい](seimei.html)"
|
41
67
|
correct << "* [生涯、しょうがい](shougai.html)"
|
42
68
|
correct << "* [生糸、きいと](kiito.html)"
|
43
|
-
assert_equal(correct, Madowu::DirectoryMapper.dirmap("test/directorymapper/japanese"))
|
69
|
+
assert_equal(correct, Madowu::DirectoryMapper.dirmap(path: "test/directorymapper/japanese"))
|
44
70
|
|
45
71
|
correct = []
|
46
72
|
correct << "Parent directory:"
|
@@ -55,7 +81,7 @@ class TC_Klass < Test::Unit::TestCase
|
|
55
81
|
correct << "* [生命、せいめい](seimei.html)"
|
56
82
|
correct << "* [生、なま](nama.html)"
|
57
83
|
correct << "* [生やす、はやす](hayasu.html)"
|
58
|
-
assert_equal(correct, Madowu::DirectoryMapper.dirmap("test/directorymapper/japanese", true))
|
84
|
+
assert_equal(correct, Madowu::DirectoryMapper.dirmap(path: "test/directorymapper/japanese", kakasi: true))
|
59
85
|
end
|
60
86
|
|
61
87
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: madowu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ippei94da
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -108,10 +108,25 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.1'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: builtinextension
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.1'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.1'
|
111
125
|
description: Markdown to HTML with table of contents, sidebar to neighboring directories.
|
112
126
|
email: ippei94da@gmail.com
|
113
127
|
executables:
|
114
128
|
- dirmap
|
129
|
+
- figchange
|
115
130
|
- isbninfo
|
116
131
|
- madowu
|
117
132
|
- tex2image
|
@@ -129,12 +144,28 @@ files:
|
|
129
144
|
- Rakefile
|
130
145
|
- VERSION
|
131
146
|
- bin/dirmap
|
147
|
+
- bin/figchange
|
132
148
|
- bin/isbninfo
|
133
149
|
- bin/madowu
|
134
150
|
- bin/tex2image
|
135
151
|
- bin/urltitle
|
136
152
|
- example/.gitignore
|
137
153
|
- example/Rakefile
|
154
|
+
- example/doc/.gitignore
|
155
|
+
- example/doc/Rakefile
|
156
|
+
- example/doc/gnuplot_with_dat.dat
|
157
|
+
- example/doc/gnuplot_with_dat.plt
|
158
|
+
- example/doc/gnuplot_without_dat.plt
|
159
|
+
- example/doc/graphviz.dot
|
160
|
+
- example/doc/independent_eps.eps
|
161
|
+
- example/doc/index.md
|
162
|
+
- example/doc/madowu.css
|
163
|
+
- example/doc/povray.pov
|
164
|
+
- example/doc/ruby_with_dat.dat
|
165
|
+
- example/doc/ruby_with_dat.rb
|
166
|
+
- example/doc/ruby_without_dat.rb
|
167
|
+
- example/doc/svg.svg
|
168
|
+
- example/doc/tex.tex
|
138
169
|
- example/dot.aws/associateid
|
139
170
|
- example/dot.aws/rootkey.csv
|
140
171
|
- example/enum.md
|
@@ -161,9 +192,9 @@ files:
|
|
161
192
|
- example/urltitle/madowu.css
|
162
193
|
- example/urltitle/url.dat
|
163
194
|
- lib/madowu.rb
|
195
|
+
- lib/madowu/bookinfo.rb
|
164
196
|
- lib/madowu/directorymapper.rb
|
165
197
|
- lib/madowu/htmlgenerator.rb
|
166
|
-
- lib/madowu/isbn.rb
|
167
198
|
- madowu.gemspec
|
168
199
|
- test/directorymapper/.gitignore
|
169
200
|
- test/directorymapper/dir1/foo.md
|
@@ -171,6 +202,7 @@ files:
|
|
171
202
|
- test/directorymapper/dir2/dir/index.md
|
172
203
|
- test/directorymapper/dir2/foo.md
|
173
204
|
- test/directorymapper/dir2/index.html
|
205
|
+
- test/directorymapper/dir3/dir/foo.md
|
174
206
|
- test/directorymapper/empty.md
|
175
207
|
- test/directorymapper/file1.md
|
176
208
|
- test/directorymapper/head.md
|
@@ -188,9 +220,9 @@ files:
|
|
188
220
|
- test/helper.rb
|
189
221
|
- test/subdir/empty.md
|
190
222
|
- test/test.css
|
223
|
+
- test/test_bookinfo.rb
|
191
224
|
- test/test_directorymapper.rb
|
192
225
|
- test/test_htmlgenerator.rb
|
193
|
-
- test/test_isbn.rb
|
194
226
|
- test/test_madowu.rb
|
195
227
|
homepage: http://github.com/ippei94da/madowu
|
196
228
|
licenses:
|