bookie 0.0.8 → 0.0.9
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/CHANGELOG.md +4 -0
- data/bin/bookie +6 -0
- data/lib/bookie/application.rb +30 -0
- data/lib/bookie/version.rb +1 -1
- metadata +5 -3
data/CHANGELOG.md
CHANGED
|
@@ -43,3 +43,7 @@ DejaVu font sets. Make PDF output look pretty, but the source code look ugly.
|
|
|
43
43
|
Basic support for unordered lists. The ePUB output has not been tested yet,
|
|
44
44
|
because most desktop based ePUB readers suck and I don't have an iPad. Will ask
|
|
45
45
|
friends to test soon.
|
|
46
|
+
|
|
47
|
+
## 0.0.9 (2011.04.28)
|
|
48
|
+
|
|
49
|
+
Add barely useful command line app
|
data/bin/bookie
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require "optparse"
|
|
2
|
+
|
|
3
|
+
module Bookie
|
|
4
|
+
module Application
|
|
5
|
+
extend self
|
|
6
|
+
|
|
7
|
+
def run(*args)
|
|
8
|
+
options = {}
|
|
9
|
+
|
|
10
|
+
input = OptionParser.new do |opts|
|
|
11
|
+
opts.on("-n", "--name NAME", "Document name") do |v|
|
|
12
|
+
options[:header] = v
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
opts.on("-t", "--title TITLE", "Document title") do |v|
|
|
16
|
+
options[:title] = v
|
|
17
|
+
end
|
|
18
|
+
end.parse!(args).first
|
|
19
|
+
|
|
20
|
+
basename = File.basename(input, ".md")
|
|
21
|
+
|
|
22
|
+
Bookie::Document.new(input, Bookie::Emitters::PDF.new(options))
|
|
23
|
+
.render(file: "#{basename}.pdf")
|
|
24
|
+
Bookie::Document.new(input, Bookie::Emitters::MOBI.new)
|
|
25
|
+
.render({file: "#{basename}.mobi"}.merge(options))
|
|
26
|
+
Bookie::Document.new(input, Bookie::Emitters::EPUB.new)
|
|
27
|
+
.render({file: "#{basename}.mobi"}.merge(options))
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
data/lib/bookie/version.rb
CHANGED
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: bookie
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.9
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Gregory Brown
|
|
@@ -38,13 +38,15 @@ dependencies:
|
|
|
38
38
|
description: Eventually this may be a markdown to PDF, ePUB, MOBI processor. For now it's just something I'm playing around with, so use at your own risk
|
|
39
39
|
email:
|
|
40
40
|
- gregory.t.brown@gmail.com
|
|
41
|
-
executables:
|
|
42
|
-
|
|
41
|
+
executables:
|
|
42
|
+
- bookie
|
|
43
43
|
extensions: []
|
|
44
44
|
|
|
45
45
|
extra_rdoc_files: []
|
|
46
46
|
|
|
47
47
|
files:
|
|
48
|
+
- bin/bookie
|
|
49
|
+
- lib/bookie/application.rb
|
|
48
50
|
- lib/bookie/document.rb
|
|
49
51
|
- lib/bookie/emitters.rb
|
|
50
52
|
- lib/bookie/parser.rb
|