mdoc 0.0.3 → 0.0.5
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.
- data/.rubocop.yml +2 -0
- data/README.md +134 -47
- data/bin/mdoc +11 -32
- data/lib/mdoc/document/kramdown.rb +25 -0
- data/lib/mdoc/document.rb +87 -0
- data/lib/mdoc/meta.rb +14 -0
- data/lib/mdoc/options.rb +104 -0
- data/lib/mdoc/pipeline.rb +59 -0
- data/lib/mdoc/processor/add_title.rb +15 -0
- data/lib/mdoc/processor/add_toc.rb +11 -0
- data/lib/mdoc/processor/smart_code_block.rb +37 -0
- data/lib/mdoc/processor.rb +21 -0
- data/lib/mdoc/version.rb +3 -4
- data/lib/mdoc/writer.rb +18 -0
- data/lib/mdoc.rb +143 -2
- data/mdoc.gemspec +19 -19
- data/spec/add_title_spec.rb +10 -0
- data/spec/add_toc_spec.rb +12 -0
- data/spec/document_spec.rb +34 -0
- data/spec/execute_spec.rb +12 -0
- data/spec/find_doc_type_spec.rb +14 -0
- data/spec/fixtures/README.md +135 -0
- data/spec/fixtures/config/mdoc_a.cnf +1 -0
- data/spec/fixtures/config/mdoc_b.cnf +1 -0
- data/spec/fixtures/executes/a +0 -0
- data/spec/fixtures/executes/b +0 -0
- data/spec/fixtures/executes/c +0 -0
- data/spec/fixtures/general.txt +10 -0
- data/spec/fixtures/multikeys.html +18 -0
- data/{examples → spec/fixtures}/multikeys.md +10 -8
- data/{examples → spec/fixtures}/original.md +10 -10
- data/{examples → spec/fixtures}/pandoc.md +7 -7
- data/spec/fixtures/process.test.md +11 -0
- data/spec/fixtures/templates/default.html.erb +0 -0
- data/spec/fixtures/templates/pandoc.html.erb +0 -0
- data/spec/get_class_spec.rb +35 -0
- data/spec/kramdown_spec.rb +10 -0
- data/spec/meta_spec.rb +6 -0
- data/spec/options_spec.rb +66 -0
- data/spec/pipeline_spec.rb +95 -0
- data/spec/smart_code_block_spec.rb +10 -0
- data/spec/spec_helper.rb +40 -7
- data/spec/tpl_out_spec.rb +19 -0
- data/templates/default.html.erb +17 -0
- metadata +63 -25
- data/ROADMAP +0 -24
- data/config/members.yml +0 -16
- data/docs/css/jsgantt.css +0 -53
- data/docs/gantt.html +0 -237
- data/docs/js/jsgantt.js +0 -1681
- data/lib/mdoc/convert.rb +0 -92
- data/lib/mdoc/parser.rb +0 -80
- data/spec/parser_spec.rb +0 -32
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Mdoc
|
4
|
+
class Processor
|
5
|
+
class ProcA < Processor; end
|
6
|
+
class ProcB < Processor; end
|
7
|
+
|
8
|
+
class ProcC < Processor
|
9
|
+
def process!(doc)
|
10
|
+
doc.body = 'c'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class ProcD < Processor
|
15
|
+
def process!(doc)
|
16
|
+
doc.body = 'd'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class ProcR < Processor
|
21
|
+
def repeatable?
|
22
|
+
true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class ProcWrap < Processor
|
27
|
+
def pre_processors
|
28
|
+
[ProcA, 'proc_b']
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class Writer
|
34
|
+
class NilWriter < Writer
|
35
|
+
def process!(doc); end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe Mdoc::Pipeline do
|
41
|
+
context 'pre_processor' do
|
42
|
+
subject(:doc) do
|
43
|
+
Mdoc.convert!('spec/fixtures/multikeys.md') do |pl|
|
44
|
+
pl.insert('proc_wrap')
|
45
|
+
pl.writer = Mdoc::Writer::NilWriter
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'perform 3 processors' do
|
50
|
+
doc.performed.size.should eq(3 + Mdoc.default_processors.size)
|
51
|
+
doc.performed[Mdoc::Processor::ProcB].should eq(1)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context 'insert' do
|
56
|
+
subject(:doc) do
|
57
|
+
Mdoc.convert!('spec/fixtures/multikeys.md') do |pl|
|
58
|
+
pl.append('proc_wrap')
|
59
|
+
pl.append('proc_c')
|
60
|
+
pl.insert('proc_d', { before: 'proc_c' })
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'perform 5 processors' do
|
65
|
+
doc.is_a?(Mdoc::Document::Kramdown).should be_true
|
66
|
+
doc.performed.size.should eq(5 + Mdoc.default_processors.size)
|
67
|
+
doc.performed[Mdoc::Processor::ProcD].should eq(1)
|
68
|
+
doc.performed[Mdoc::Processor::ProcC].should eq(1)
|
69
|
+
doc.body.should eq('c') # d insert before c
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'repeatable' do
|
74
|
+
subject(:doc) do
|
75
|
+
Mdoc.convert!('spec/fixtures/general.txt') do |pl|
|
76
|
+
pl.insert('proc_a')
|
77
|
+
pl.insert('proc_a')
|
78
|
+
pl.append('proc_r')
|
79
|
+
pl.append('proc_r')
|
80
|
+
pl.append('proc_b')
|
81
|
+
pl.insert('proc_d', { after: 'proc_b' })
|
82
|
+
pl.remove(['proc_b'])
|
83
|
+
pl.writer = Mdoc::Writer::NilWriter
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
it 'repeat only for proc_r' do
|
88
|
+
doc.is_a?(Mdoc::Document).should be_true
|
89
|
+
doc.performed[Mdoc::Processor::ProcA].should eq(1)
|
90
|
+
doc.performed[Mdoc::Processor::ProcR].should eq(2)
|
91
|
+
doc.body.should eq('d')
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Mdoc::Processor::SmartCodeBlock do
|
4
|
+
it 'delete extra blank lines' do
|
5
|
+
doc = Mdoc::Document::Kramdown.new('spec/fixtures/README.md')
|
6
|
+
doc.body.should match(/~{3,}\s*ruby\s*\n\n+/)
|
7
|
+
doc.apply!('smart_code_block')
|
8
|
+
doc.body.should_not match(/~{3,}\s*ruby\s*\n\n+/)
|
9
|
+
end
|
10
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,40 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start do
|
3
|
+
add_group 'Libraries', 'lib'
|
4
|
+
add_group 'Specs', 'spec'
|
5
|
+
coverage_dir 'docs/coverage'
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'rspec'
|
9
|
+
require 'mdoc'
|
10
|
+
|
11
|
+
def capture_stdout(&block)
|
12
|
+
original_stdout = $stdout
|
13
|
+
$stdout = fake = StringIO.new
|
14
|
+
begin
|
15
|
+
yield
|
16
|
+
rescue SystemExit
|
17
|
+
$stdout = original_stdout # fake rubocop
|
18
|
+
ensure
|
19
|
+
$stdout = original_stdout
|
20
|
+
end
|
21
|
+
fake.string
|
22
|
+
end
|
23
|
+
|
24
|
+
def capture_stderr(&block)
|
25
|
+
original_stdout = $stderr
|
26
|
+
$stderr = fake = StringIO.new
|
27
|
+
begin
|
28
|
+
yield
|
29
|
+
rescue SystemExit
|
30
|
+
$stdout = original_stdout # fake rubocop
|
31
|
+
ensure
|
32
|
+
$stderr = original_stdout
|
33
|
+
end
|
34
|
+
fake.string
|
35
|
+
end
|
36
|
+
|
37
|
+
RSpec.configure do |config|
|
38
|
+
config.color_enabled = true
|
39
|
+
config.formatter = 'documentation'
|
40
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Mdoc do
|
4
|
+
it 'find pandoc.html' do
|
5
|
+
Mdoc.load_defaults
|
6
|
+
Mdoc.load_cli_options %w[-t pandoc.html -d spec/fixtures/templates]
|
7
|
+
tpl = Mdoc.find_tpl_file
|
8
|
+
tpl.should match(%r|spec/fixtures/templates/pandoc\.html\.erb$|)
|
9
|
+
Mdoc.find_out_file('ff.md').should eq('ff.html')
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'find default.html' do
|
13
|
+
Mdoc.load_defaults
|
14
|
+
Mdoc.load_cli_options %w[-t html -d spec/fixtures/templates]
|
15
|
+
tpl = Mdoc.find_tpl_file
|
16
|
+
tpl.should match(%r|spec/fixtures/templates/default\.html\.erb$|)
|
17
|
+
Mdoc.find_out_file('ff.md').should eq('ff.html')
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset='utf-8'>
|
5
|
+
<title><% if title %><%= title %><% else %>Preview<% end %></title>
|
6
|
+
<!--this style include the test_md/css screen.css(first) and base.css -->
|
7
|
+
<style type="text/css">
|
8
|
+
pre code{display:block;background:#fff;color:#4d4d4c;font-family:Menlo, Monaco, Consolas, monospace;font-size:12px;line-height:1.5;border:1px solid #ccc;padding:10px}html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,code,del,dfn,em,img,q,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}table{border-collapse:separate;border-spacing:0}caption,th,td{text-align:left;font-weight:normal}table,td,th{vertical-align:middle}blockquote:before,blockquote:after,q:before,q:after{content:""}blockquote,q{quotes:"" ""}a img{border:none}body{margin:10px}html{height:100%}body{padding:0;margin:0;font:14px/22px "adelle", Georgia, sans-serif;font-size-adjust:none;font-style:normal;font-variant:normal;font-weight:normal;background:#f4f6ec}a{color:#369}#markdown-toc{float:left;width:230px;margin-right:30px;margin-top:40px}#markdown-toc a{display:block;font-weight:bold;text-decoration:none}#markdown-toc #sections{list-style-type:none;border-bottom:3px solid rgba(0,0,0,0.1);padding-bottom:10px;margin-bottom:10px}#markdown-toc #sections>li>a{padding:5px 0;color:#444;font-size:16px}#markdown-toc #sections ul{margin-bottom:15px}#markdown-toc #sections ul li{list-style-type:none}#markdown-toc #sections ul li a{padding:1px 15px;font-size:13px;font-weight:normal}#markdown-toc .extra{padding:5px 0;min-height:1.4em}#markdown-toc .extra a{color:#555;font-size:14px}#markdown-toc #travis img{margin-top:10px;display:block}#markdown-toc>*:last-child{margin-bottom:20px}#content{padding:30px 30px 20px 30px;min-height:100px;width:600px;background:#fff;float:left;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;margin-top:15px}#content #loader{color:#888;width:300px;height:24px;line-height:24px;position:absolute;top:30px;left:30px;background:url("data:image/gif;base64,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") no-repeat center left;padding-left:32px;font-size:18px}#content>p{zoom:1}#content>p:before,#content>p:after{content:"";display:table}#content>p:after{clear:both}#content p{padding:0 0 0.8125em 0;color:#444}#content p img{float:left;margin:0.5em 0.8125em 0.8125em 0;padding:0}#content img{max-width:100%}#content h1,#content h2,#content h3,#content h4,#content h5,#content h6{font-weight:bold;line-height:1.2em}#content h1{font-size:2.125em;margin-bottom:0.4em}#content h2{font-size:1.7em;margin:0.855em 0 0.4em;color:#cc333f}#content h3{font-size:1.3em;margin:0.956em 0 0.4em}#content h4{font-size:1.1em;margin:1.161em 0 0.4em}#content h5,#content h6{font-size:1em;font-weight:bold;margin:1.238em 0 0.4em}#content>h1,#content>h2{margin-top:0}#content ul{list-style-position:outside}#content li ul,#content li ol{margin:0 1.625em}#content ul,#content ol{margin:0 0 1.625em 1.25em}#content dl{margin:0 0 1.625em 0}#content dl dt{font-weight:bold}#content dl dd{margin-left:1.625em}#content a{text-decoration:none}#content a:hover{text-decoration:underline}#content table{margin-bottom:1.625em;border-collapse:collapse}#content th{font-weight:bold}#content tr,#content th,#content td{margin:0;padding:0 1.625em 0 1em;height:26px}#content tfoot{font-style:italic}#content caption{text-align:center;font-family:Georgia, serif}#content abbr,#content acronym{border-bottom:1px dotted #000}#content address{margin-top:1.625em;font-style:italic}#content del{color:#000}#content blockquote{padding:1em 1em 1.625em 1em;font-family:georgia, serif;font-style:italic}#content blockquote:before{content:"\201C";font-size:3em;margin-left:-0.625em;font-family:georgia, serif;color:#aaa;line-height:0}#content blockquote>p{padding:0;margin:0}#content strong{font-weight:bold}#content em,#content dfn{font-style:italic}#content dfn{font-weight:bold}#content pre,#content code{margin:0 0 1.625em;white-space:pre}#content pre,#content code,#content tt{font-size:1em;font-family:Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;line-height:1.5}#content code{background:#f7f8f1;padding:1px 2px;border:1px solid #ccc}#content pre code{padding:10px 12px;word-wrap:normal;overflow-y:auto}#content tt{display:block;margin:1.625em 0}#content hr{margin-bottom:1.625em}#content table{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;width:100%}#content th,#content td{padding:5px 10px;border:1px solid #ccc}#content th{background:#eee;padding:7px 10px}#content td{font-size:0.9em;border-color:#ddd}#content tbody tr:nth-child(2n){background:#f5f5f5}@media only screen and (max-width: 480px){#container{width:100%}#markdown-toc{width:100%;margin-top:10px;float:none}#markdown-toc #sections,#markdown-toc #header,#markdown-toc .extra{padding-left:30px;padding-right:30px}#content{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;border-width:1px;float:none;margin:0;width:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}@media only screen and (min-device-pixel-ratio: 1.5), only screen and (min-resolution: 1.5dppx){#github-ribbon img{width:100px}}*{margin:0;padding:0}body{margin-left:40px}#markdown-toc{float:right !important;position:fixed;left:745px;height:90%;overflow:auto}#content{float:left !important;filter:progid:DXImageTransform.Microsoft.Shadow(color=#909090,direction=120,strength=4);-moz-box-shadow:2px 2px 10px #909090;-webkit-box-shadow:2px 2px 10px #909090;box-shadow:2px 2px 10px #909090}#markdown-toc{width:auto;max-width:300px !important;top:40px}#markdown-toc>li>ul>li>a{color:#cc333f;margin-top:10px}#markdown-toc>li>ul>li>ul>li>a,h3{color:#009999}#markdown-toc>li>ul>li>ul>li>ul>li>a,h4{color:#669999}#markdown-toc>li>a{margin-bottom:20px;padding-bottom:20px;border-bottom:3px solid rgba(0,0,0,0.1);font-size:20px;color:#000000}#content code{border-radius:3px}
|
9
|
+
</style>
|
10
|
+
</head>
|
11
|
+
|
12
|
+
<body>
|
13
|
+
<div id="content">
|
14
|
+
<%= body_html %>
|
15
|
+
</div>
|
16
|
+
</body>
|
17
|
+
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: kramdown
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: tilt
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
@@ -44,23 +44,23 @@ dependencies:
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: rspec
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
54
|
-
type: :
|
53
|
+
version: '2.5'
|
54
|
+
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '2.5'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
63
|
+
name: simplecov
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
@@ -75,31 +75,58 @@ dependencies:
|
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '2.5'
|
78
|
-
description:
|
78
|
+
description: A tool for convert document between several different formats.
|
79
79
|
email: huangw@pe-po.com
|
80
80
|
executables:
|
81
81
|
- mdoc
|
82
82
|
extensions: []
|
83
83
|
extra_rdoc_files: []
|
84
84
|
files:
|
85
|
+
- .rubocop.yml
|
85
86
|
- README.md
|
86
|
-
- ROADMAP
|
87
87
|
- bin/mdoc
|
88
|
-
- config/members.yml
|
89
|
-
- docs/css/jsgantt.css
|
90
|
-
- docs/gantt.html
|
91
|
-
- docs/js/jsgantt.js
|
92
|
-
- examples/multikeys.md
|
93
|
-
- examples/original.md
|
94
|
-
- examples/pandoc.md
|
95
88
|
- lib/mdoc.rb
|
96
|
-
- lib/mdoc/
|
97
|
-
- lib/mdoc/
|
89
|
+
- lib/mdoc/document.rb
|
90
|
+
- lib/mdoc/document/kramdown.rb
|
91
|
+
- lib/mdoc/meta.rb
|
92
|
+
- lib/mdoc/options.rb
|
93
|
+
- lib/mdoc/pipeline.rb
|
94
|
+
- lib/mdoc/processor.rb
|
95
|
+
- lib/mdoc/processor/add_title.rb
|
96
|
+
- lib/mdoc/processor/add_toc.rb
|
97
|
+
- lib/mdoc/processor/smart_code_block.rb
|
98
98
|
- lib/mdoc/version.rb
|
99
|
+
- lib/mdoc/writer.rb
|
99
100
|
- mdoc.gemspec
|
100
|
-
- spec/
|
101
|
+
- spec/add_title_spec.rb
|
102
|
+
- spec/add_toc_spec.rb
|
103
|
+
- spec/document_spec.rb
|
104
|
+
- spec/execute_spec.rb
|
105
|
+
- spec/find_doc_type_spec.rb
|
106
|
+
- spec/fixtures/README.md
|
107
|
+
- spec/fixtures/config/mdoc_a.cnf
|
108
|
+
- spec/fixtures/config/mdoc_b.cnf
|
109
|
+
- spec/fixtures/executes/a
|
110
|
+
- spec/fixtures/executes/b
|
111
|
+
- spec/fixtures/executes/c
|
112
|
+
- spec/fixtures/general.txt
|
113
|
+
- spec/fixtures/multikeys.html
|
114
|
+
- spec/fixtures/multikeys.md
|
115
|
+
- spec/fixtures/original.md
|
116
|
+
- spec/fixtures/pandoc.md
|
117
|
+
- spec/fixtures/process.test.md
|
118
|
+
- spec/fixtures/templates/default.html.erb
|
119
|
+
- spec/fixtures/templates/pandoc.html.erb
|
120
|
+
- spec/get_class_spec.rb
|
121
|
+
- spec/kramdown_spec.rb
|
122
|
+
- spec/meta_spec.rb
|
123
|
+
- spec/options_spec.rb
|
124
|
+
- spec/pipeline_spec.rb
|
125
|
+
- spec/smart_code_block_spec.rb
|
101
126
|
- spec/spec_helper.rb
|
102
|
-
|
127
|
+
- spec/tpl_out_spec.rb
|
128
|
+
- templates/default.html.erb
|
129
|
+
homepage: https://github.com/7lime/mdoc-gem
|
103
130
|
licenses: []
|
104
131
|
post_install_message:
|
105
132
|
rdoc_options: []
|
@@ -122,7 +149,18 @@ rubyforge_project:
|
|
122
149
|
rubygems_version: 1.8.25
|
123
150
|
signing_key:
|
124
151
|
specification_version: 3
|
125
|
-
summary:
|
152
|
+
summary: Convert markdown/reStructure/... of documents to html/docx/pdf/... formats.
|
126
153
|
test_files:
|
127
|
-
- spec/
|
154
|
+
- spec/add_title_spec.rb
|
155
|
+
- spec/add_toc_spec.rb
|
156
|
+
- spec/document_spec.rb
|
157
|
+
- spec/execute_spec.rb
|
158
|
+
- spec/find_doc_type_spec.rb
|
159
|
+
- spec/get_class_spec.rb
|
160
|
+
- spec/kramdown_spec.rb
|
161
|
+
- spec/meta_spec.rb
|
162
|
+
- spec/options_spec.rb
|
163
|
+
- spec/pipeline_spec.rb
|
164
|
+
- spec/smart_code_block_spec.rb
|
128
165
|
- spec/spec_helper.rb
|
166
|
+
- spec/tpl_out_spec.rb
|
data/ROADMAP
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
% ----
|
2
|
-
title: Markdown Document Converting Tools
|
3
|
-
status: producing
|
4
|
-
leader: huangw
|
5
|
-
moderator: lixf
|
6
|
-
team: [xuyc sunyr songcy]
|
7
|
-
year: 2013
|
8
|
-
% ----
|
9
|
-
|
10
|
-
[+] design: design api document in readme 06/12 @huangw:06/12
|
11
|
-
|
12
|
-
[+] parser: write a document parser using yaml and kramdown 06/12 @huangw:06/12
|
13
|
-
|
14
|
-
[+] converters: write converters for varies format 06/12 @huangw
|
15
|
-
[++] docx: convert to docx with pandoc 06/12 @huangw:06/13
|
16
|
-
[++] docup: convert to html use document-up 06/12 @huangw:06/13
|
17
|
-
[++] pdf: convert to pdf use xelatex 06/12 @huangw
|
18
|
-
|
19
|
-
[+] server: a server that can receive html for review 06/12 @huangw:50
|
20
|
-
|
21
|
-
[+] release_v0.1.0: first public release 06/13 @huangw:06/13
|
22
|
-
|
23
|
-
[+] release_v0.1.4: updated version 06/13 @huangw:06/13
|
24
|
-
[++] epub: add epub3 support via pandoc 06/13 @huangw:06/13
|
data/config/members.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
members:
|
2
|
-
huangw: ['黄巍', 'huangw@pe-po.com']
|
3
|
-
xuyc: ['徐以臣', 'xuyc@pe-po.com']
|
4
|
-
sunyr: ['孙云蕊', 'sunyr@pe-po.com']
|
5
|
-
lizh: ['李中华', 'lizh@pe-po.com']
|
6
|
-
songcy: ['宋春月', 'songcy@pe-po.com']
|
7
|
-
du: ['杜丽玲', 'du@pe-po.com']
|
8
|
-
zhaogl: ['赵桂兰', 'zhaogl@pe-po.com']
|
9
|
-
wangh: ['王浩', 'wangh@pe-po.com']
|
10
|
-
liudx: ['刘东旭', 'liudx@pe-po.com']
|
11
|
-
zhangy: ['张祎', 'zhangy@pe-po.com']
|
12
|
-
wangqh: ['王清华', 'wangqh@pe-po.com']
|
13
|
-
cuibg: ['崔保国', 'cuibg@pe-po.com']
|
14
|
-
lixf: ['李现凤', 'lixf@pe-po.com']
|
15
|
-
zhaoxx: ['赵秀秀', 'zhaoxx@pe-po.com']
|
16
|
-
|
data/docs/css/jsgantt.css
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
|
2
|
-
// These are the class/styles used by various objects in GanttChart. However, Firefox has problems deciphering class style when DIVs are embedded in other DIVs.
|
3
|
-
|
4
|
-
// GanttChart makes heavy use of embedded DIVS, thus the style are often embedded directly in the objects html. If this could be resolved with Firefox, it would
|
5
|
-
|
6
|
-
// make alot of the code look simpleer/cleaner without all the embedded styles
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
..gantt { font-family:tahoma, arial, verdana; font-size:10px;}
|
11
|
-
|
12
|
-
..gdatehead { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; HEIGHT: 18px }
|
13
|
-
|
14
|
-
..ghead { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 24px; HEIGHT: 20px }
|
15
|
-
|
16
|
-
..gname { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; WIDTH: 18px; HEIGHT: 18px }
|
17
|
-
|
18
|
-
..ghead A { FONT-SIZE: 10px; COLOR: #000000; TEXT-DECORATION: none }
|
19
|
-
|
20
|
-
..gheadwkend A { FONT-SIZE: 10px; COLOR: #000000; TEXT-DECORATION: none }
|
21
|
-
|
22
|
-
..gheadwkend { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 24px; HEIGHT: 20px; background-color: #cfcfcf }
|
23
|
-
|
24
|
-
..gfiller { BORDER-TOP: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px }
|
25
|
-
|
26
|
-
..gfillerwkend { BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px; BACKGROUND-COLOR: #cfcfcf }
|
27
|
-
|
28
|
-
..gitem { BORDER-TOP: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px }
|
29
|
-
|
30
|
-
..gitemwkend { BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px }
|
31
|
-
|
32
|
-
..gmilestone { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 14px; OVERFLOW: hidden; BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px}
|
33
|
-
|
34
|
-
..gmilestonewkend { BORDER-TOP: #efefef 1px solid; BORDER-LEFT: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px}
|
35
|
-
|
36
|
-
..btn { BORDER-RIGHT: #ffffff; BORDER-TOP: #ffffff; FONT-WEIGHT: bold; FONT-SIZE: 10px; BORDER-LEFT: #ffffff; WIDTH: 12px; COLOR: #cccccc; BORDER-BOTTOM: #ffffff; BACKGROUND-COLOR: #ffffff }
|
37
|
-
|
38
|
-
..hrcomplete { BORDER-RIGHT: #000000 2px solid; PADDING-RIGHT: 0px; BORDER-TOP: #000000 2px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: #000000 2px solid; WIDTH: 20px; COLOR: #000000; PADDING-TOP: 0px; BORDER-BOTTOM: #000000 2px solid; HEIGHT: 4px }
|
39
|
-
|
40
|
-
..hrhalfcomplete { BORDER-RIGHT: #000000 2px solid; BORDER-TOP: #000000 2px solid; BORDER-LEFT: #000000 2px solid; WIDTH: 9px; COLOR: #000000; BORDER-BOTTOM: #000000 2px solid; HEIGHT: 4px }
|
41
|
-
|
42
|
-
..gweekend { font-family:tahoma, arial, verdana; font-size:11px; background-color:#EEEEEE; text-align:center; }
|
43
|
-
|
44
|
-
..gtask { font-family:tahoma, arial, verdana; font-size:11px; background-color:#00FF00; text-align:center; }
|
45
|
-
|
46
|
-
..gday { font-family:tahoma, arial, verdana; font-size:11px; text-align:center; }
|
47
|
-
|
48
|
-
..gcomplete { background-color:black; height:5px; overflow: auto; margin-top:4px; }
|
49
|
-
|
50
|
-
DIV.scroll { BORDER-RIGHT: #efefef 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #efefef 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; BORDER-LEFT: #efefef 1px solid; WIDTH: 420px; PADDING-TOP: 0px; BORDER-BOTTOM: #efefef 1px solid; BACKGROUND-COLOR: #ffffff }
|
51
|
-
|
52
|
-
DIV.scroll2 { position:relative; PADDING-RIGHT: 0px; overflow:auto ;overflow-x:scroll;overflow-y:hidden; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; WIDTH: 482px; PADDING-TOP: 0px; BACKGROUND-COLOR: #ffffff }
|
53
|
-
|