mdpress 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/mdpress +16 -0
- data/lib/impress_renderer.rb +32 -0
- metadata +81 -0
data/bin/mdpress
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'redcarpet'
|
4
|
+
require 'impress_renderer'
|
5
|
+
|
6
|
+
include Redcarpet
|
7
|
+
m = Markdown.new(ImpressRenderer, :autolink => true)
|
8
|
+
|
9
|
+
def help
|
10
|
+
puts "USAGE: mdpress [filename.md]"
|
11
|
+
exit
|
12
|
+
end
|
13
|
+
|
14
|
+
help if ARGV.size == 0 || ["-h", "--help"].include?(ARGV[0])
|
15
|
+
|
16
|
+
puts m.render(File.open(ARGV[0]).read)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'redcarpet'
|
2
|
+
class ImpressRenderer < Redcarpet::Render::HTML
|
3
|
+
def hrule
|
4
|
+
%{</div>
|
5
|
+
<div class="step">
|
6
|
+
}
|
7
|
+
end
|
8
|
+
|
9
|
+
def doc_header
|
10
|
+
%{
|
11
|
+
<html>
|
12
|
+
<head>
|
13
|
+
<link href="style.css" rel="stylesheet" />
|
14
|
+
</head>
|
15
|
+
|
16
|
+
<body>
|
17
|
+
<div id="impress">
|
18
|
+
<div class="step">
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
def doc_footer
|
23
|
+
%{
|
24
|
+
</div>
|
25
|
+
<script src="impress.js"></script>
|
26
|
+
<script>impress();</script>
|
27
|
+
</body>
|
28
|
+
</html>
|
29
|
+
}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mdpress
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Aditya Bhargava
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-03-05 00:00:00 -08:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: redcarpet
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
description: Build impress.js presentations from markdown files.
|
36
|
+
email: bluemangroupie@gmail.com
|
37
|
+
executables:
|
38
|
+
- mdpress
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files: []
|
42
|
+
|
43
|
+
files:
|
44
|
+
- lib/impress_renderer.rb
|
45
|
+
- bin/mdpress
|
46
|
+
has_rdoc: true
|
47
|
+
homepage: https://github.com/egonSchiele/mdpress
|
48
|
+
licenses: []
|
49
|
+
|
50
|
+
post_install_message:
|
51
|
+
rdoc_options: []
|
52
|
+
|
53
|
+
require_paths:
|
54
|
+
- lib
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 3
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
version: "0"
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
hash: 3
|
70
|
+
segments:
|
71
|
+
- 0
|
72
|
+
version: "0"
|
73
|
+
requirements: []
|
74
|
+
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 1.3.7
|
77
|
+
signing_key:
|
78
|
+
specification_version: 3
|
79
|
+
summary: Build impress.js presentations from markdown files.
|
80
|
+
test_files: []
|
81
|
+
|