bookie 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
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,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative "../lib/bookie"
4
+ require_relative "../lib/bookie/application"
5
+
6
+ Bookie::Application.run(*ARGV)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Bookie
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: bookie
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.8
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