markdown_doctor 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # Markdown Doctor
2
+
3
+ An absurdly simple script that ganks github styles for your markdown.
4
+
5
+ To output to stdout:
6
+
7
+ $ markdown_doctor.rb <filename>
8
+
9
+ To read from from stdin and output to stdout:
10
+
11
+ $ cat "this is a test" | markdown_doctor.rb
12
+
13
+ To display in a browser:
14
+
15
+ $ sudo gem install bcat
16
+ $ markdown_doctor.rb <filename> | bcat
17
+
18
+ Try putting this in your `.vimrc`:
19
+
20
+ " Quickly display a markdown preview of the current buffer
21
+ :map <leader>m :%w ! markdown_doctor \| bcat<CR><CR>
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "rubygems"
4
+ require "redcarpet"
5
+
6
+ HEADER = <<EOF
7
+ <link href="https://assets0.github.com/stylesheets/bundle_common.css" type="text/css" rel="stylesheet" />
8
+ <link href="https://assets0.github.com/stylesheets/bundle_github.css" type="text/css" rel="stylesheet" />
9
+ <style type="text/css">
10
+ #readme.announce {
11
+ width: 920px;
12
+ margin: 0 auto;
13
+ }
14
+ </style>
15
+ <div id="readme" class="announce">
16
+ <div class="wikistyle">
17
+ EOF
18
+
19
+ FOOTER = <<EOF
20
+ </div>
21
+ </div>
22
+ EOF
23
+
24
+ text = ARGF.read
25
+ markdown = Redcarpet.new(text, :fenced_code)
26
+ output = HEADER + markdown.to_html + FOOTER
27
+ puts output
@@ -0,0 +1,23 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "markdown_doctor"
3
+ s.version = "0.1.0"
4
+
5
+ s.required_rubygems_version = Gem::Requirement.new(">=0") if s.respond_to? :required_rubygems_version=
6
+ s.specification_version = 2 if s.respond_to? :specification_version=
7
+
8
+ s.authors = "Daniel MacDougall", "Caleb Spare"
9
+ s.email = "dmacdougall@gmail.com", "cespare@gmail.com"
10
+
11
+ s.description = "An absurdly simple script for rendering markdown with github styles."
12
+ s.summary = "An absurdly simple script for rendering markdown with github styles."
13
+ s.homepage = "https://github.com/dmacdougall/markdown_doctor"
14
+ s.rubyforge_project = "markdown_doctor"
15
+
16
+ s.executables = %w(markdown_doctor)
17
+ s.files = %w(
18
+ README.md
19
+ markdown_doctor.gemspec
20
+ bin/markdown_doctor
21
+ )
22
+ s.add_dependency("redcarpet", ">=1.13.1")
23
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: markdown_doctor
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - Daniel MacDougall
9
+ - Caleb Spare
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+
14
+ date: 2011-05-11 00:00:00 -07:00
15
+ default_executable:
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: redcarpet
19
+ prerelease: false
20
+ requirement: &id001 !ruby/object:Gem::Requirement
21
+ none: false
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: 1.13.1
26
+ type: :runtime
27
+ version_requirements: *id001
28
+ description: An absurdly simple script for rendering markdown with github styles.
29
+ email:
30
+ - dmacdougall@gmail.com
31
+ - cespare@gmail.com
32
+ executables:
33
+ - markdown_doctor
34
+ extensions: []
35
+
36
+ extra_rdoc_files: []
37
+
38
+ files:
39
+ - README.md
40
+ - markdown_doctor.gemspec
41
+ - bin/markdown_doctor
42
+ has_rdoc: true
43
+ homepage: https://github.com/dmacdougall/markdown_doctor
44
+ licenses: []
45
+
46
+ post_install_message:
47
+ rdoc_options: []
48
+
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ requirements: []
64
+
65
+ rubyforge_project: markdown_doctor
66
+ rubygems_version: 1.6.2
67
+ signing_key:
68
+ specification_version: 2
69
+ summary: An absurdly simple script for rendering markdown with github styles.
70
+ test_files: []
71
+