markdown_doctor 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,25 +1,30 @@
1
1
  # Markdown Doctor
2
2
 
3
- An absurdly simple script that ganks github styles for your markdown.
3
+ An absurdly simple script that renders your markdown to html.
4
+
5
+ ### Installation
6
+
7
+ Markdown Doctor uses pygments for syntax highlighting code blocks.
8
+
9
+ $ pip install pygments
10
+ $ gem install markdown_doctor
11
+
12
+ ### Usage
4
13
 
5
14
  To output to stdout:
6
15
 
7
- $ markdown_doctor.rb <filename>
16
+ $ markdown_doctor <filename>
8
17
 
9
18
  To read from from stdin and output to stdout:
10
19
 
11
- $ cat "this is a test" | markdown_doctor.rb
20
+ $ cat "this is a test" | markdown_doctor
12
21
 
13
22
  To display in a browser:
14
23
 
15
- $ sudo gem install bcat
24
+ $ gem install bcat
16
25
  $ markdown_doctor.rb <filename> | bcat
17
26
 
18
27
  Try putting this in your `.vimrc`:
19
28
 
20
29
  " Quickly display a markdown preview of the current buffer
21
30
  :map <leader>m :%w ! markdown_doctor \| bcat<CR><CR>
22
-
23
- Installation:
24
-
25
- $ gem install markdown_doctor
@@ -6,18 +6,238 @@ require "nokogiri"
6
6
  require "pygments.rb"
7
7
 
8
8
  HEADER = <<EOF
9
- <link href="http://assets.github.com/stylesheets/bundles/github-92243db0daab07aa944d353c1ba062b9581bd321.css"
10
- type="text/css" rel="stylesheet" />
11
- <link href="http://assets.github.com/stylesheets/bundles/github2-b4eff0bfa63304403db18c61e84e5af78b005dab.css"
12
- type="text/css" rel="stylesheet" />
13
9
  <style type="text/css">
14
- #main-wrapper {
15
- width: 920px;
16
- margin: 0 auto;
10
+ a {
11
+ color: #4183C4;
12
+ text-decoration: none;
13
+ }
14
+ a:hover {
15
+ text-decoration: underline;
16
+ }
17
+ h1 {
18
+ border-bottom: 3px solid #ccc;
19
+ padding-bottom: 10px;
20
+ }
21
+ body {
22
+ font: 14px / 20px "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
23
+ }
24
+ pre, code {
25
+ font-family: "Ubuntu Mono", Courier, monospace;
26
+ background-color: #F0EEEA;
27
+ padding: 2px;
28
+ }
29
+ .highlight pre {
30
+ padding-left: 6px;
31
+ }
32
+ #wrapper {
33
+ width: 900px;
34
+ margin: 50px auto;
35
+ border: 3px solid #ccc;
36
+ padding: 0px 15px;
37
+ }
38
+ pre .hll {
39
+ background-color: #ffffcc;
40
+ }
41
+ pre .c {
42
+ color: #408080;
43
+ font-style: italic;
44
+ }
45
+ pre .k {
46
+ color: #5d2846;
47
+ font-weight: bold;
48
+ }
49
+ pre .o {
50
+ color: #666666;
51
+ }
52
+ pre .cm {
53
+ color: #408080;
54
+ font-style: italic;
55
+ }
56
+ pre .cp {
57
+ color: #bc7a00;
58
+ }
59
+ pre .c1 {
60
+ color: #408080;
61
+ font-style: italic;
62
+ }
63
+ pre .cs {
64
+ color: #408080;
65
+ font-style: italic;
66
+ }
67
+ pre .gd {
68
+ color: #a00000;
69
+ }
70
+ pre .ge {
71
+ font-style: italic;
72
+ }
73
+ pre .gr {
74
+ color: #ff0000;
75
+ }
76
+ pre .gh {
77
+ color: #000080;
78
+ font-weight: bold;
79
+ }
80
+ pre .gi {
81
+ color: #00a000;
82
+ }
83
+ pre .go {
84
+ color: #808080;
85
+ }
86
+ pre .gp {
87
+ color: #000080;
88
+ font-weight: bold;
89
+ }
90
+ pre .gs {
91
+ font-weight: bold;
92
+ }
93
+ pre .gu {
94
+ color: #800080;
95
+ font-weight: bold;
96
+ }
97
+ pre .gt {
98
+ color: #0040d0;
99
+ }
100
+ pre .kc {
101
+ color: #5d2846;
102
+ font-weight: bold;
103
+ }
104
+ pre .kd {
105
+ color: #5d2846;
106
+ font-weight: bold;
107
+ }
108
+ pre .kn {
109
+ color: #5d2846;
110
+ font-weight: bold;
111
+ }
112
+ pre .kp {
113
+ color: #5d2846;
114
+ }
115
+ pre .kr {
116
+ color: #5d2846;
117
+ font-weight: bold;
118
+ }
119
+ pre .kt {
120
+ color: #b00040;
121
+ }
122
+ pre .m {
123
+ color: #666666;
124
+ }
125
+ pre .s {
126
+ color: #4eb25a;
127
+ }
128
+ pre .na {
129
+ color: #7d9029;
130
+ }
131
+ pre .nb {
132
+ color: #5d2846;
133
+ }
134
+ pre .nc {
135
+ color: #3333a0;
136
+ font-weight: bold;
137
+ }
138
+ pre .no {
139
+ color: #28732c;
140
+ }
141
+ pre .nd {
142
+ color: #aa22ff;
143
+ }
144
+ pre .ni {
145
+ color: #999999;
146
+ font-weight: bold;
147
+ }
148
+ pre .ne {
149
+ color: #d2413a;
150
+ font-weight: bold;
151
+ }
152
+ pre .nf {
153
+ color: #3333a0;
154
+ }
155
+ pre .nl {
156
+ color: #a0a000;
157
+ }
158
+ pre .nn {
159
+ color: #3333a0;
160
+ font-weight: bold;
161
+ }
162
+ pre .nt {
163
+ color: #5d2846;
164
+ font-weight: bold;
165
+ }
166
+ pre .nv {
167
+ color: #353c92;
168
+ }
169
+ pre .ow {
170
+ color: #aa22ff;
171
+ font-weight: bold;
172
+ }
173
+ pre .w {
174
+ color: #bbbbbb;
175
+ }
176
+ pre .mf {
177
+ color: #666666;
178
+ }
179
+ pre .mh {
180
+ color: #666666;
181
+ }
182
+ pre .mi {
183
+ color: #666666;
184
+ }
185
+ pre .mo {
186
+ color: #666666;
187
+ }
188
+ pre .sb {
189
+ color: #4eb25a;
190
+ }
191
+ pre .sc {
192
+ color: #4eb25a;
193
+ }
194
+ pre .sd {
195
+ color: #4eb25a;
196
+ font-style: italic;
197
+ }
198
+ pre .s2 {
199
+ color: #4eb25a;
200
+ }
201
+ pre .se {
202
+ color: #bb6622;
203
+ font-weight: bold;
204
+ }
205
+ pre .sh {
206
+ color: #4eb25a;
207
+ }
208
+ pre .si {
209
+ color: #bb6688;
210
+ font-weight: bold;
211
+ }
212
+ pre .sx {
213
+ color: #5d2846;
214
+ }
215
+ pre .sr {
216
+ color: #bb6688;
217
+ }
218
+ pre .s1 {
219
+ color: #4eb25a;
220
+ }
221
+ pre .ss {
222
+ color: #353c92;
223
+ }
224
+ pre .bp {
225
+ color: #5d2846;
226
+ }
227
+ pre .vc {
228
+ color: #353c92;
229
+ }
230
+ pre .vg {
231
+ color: #353c92;
232
+ }
233
+ pre .vi {
234
+ color: #353c92;
235
+ }
236
+ pre .il {
237
+ color: #666666;
17
238
  }
18
239
  </style>
19
- <div id="main-wrapper">
20
- <div class="markdown-body">
240
+ <div id="wrapper">
21
241
  EOF
22
242
 
23
243
  FOOTER = <<EOF
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "markdown_doctor"
3
- s.version = "0.3.0"
3
+ s.version = "0.4.0"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">=0") if s.respond_to? :required_rubygems_version=
6
6
  s.specification_version = 2 if s.respond_to? :specification_version=
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_doctor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-02-12 00:00:00.000000000Z
13
+ date: 2012-02-23 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
17
- requirement: &2169151320 !ruby/object:Gem::Requirement
17
+ requirement: &2156997560 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.5.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2169151320
25
+ version_requirements: *2156997560
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: pygments.rb
28
- requirement: &2169150860 !ruby/object:Gem::Requirement
28
+ requirement: &2156997100 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.2.4
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2169150860
36
+ version_requirements: *2156997100
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: redcarpet
39
- requirement: &2169150400 !ruby/object:Gem::Requirement
39
+ requirement: &2156996640 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 2.1.0
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2169150400
47
+ version_requirements: *2156996640
48
48
  description: An absurdly simple script for rendering markdown with github styles.
49
49
  email:
50
50
  - dmacdougall@gmail.com