bookshop 0.1.5 → 0.1.6
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/README.rdoc +2 -1
- data/lib/bookshop/commands/application.rb +1 -1
- data/lib/bookshop/commands/build.rb +21 -6
- data/lib/bookshop/generators/bookshop/app/templates/README.rdoc +2 -1
- data/lib/bookshop/generators/bookshop/app/templates/book/epub/OEBPS/content.opf.erb +3 -0
- data/lib/bookshop/version.rb +1 -1
- metadata +17 -17
data/README.rdoc
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
http://blueheadpublishing.com/assets/bookshop_hero.jpg
|
|
2
|
+
|
|
2
3
|
Bookshop is a an open-source agile book development and publishing framework for authors, editors, publishers and coders in today's publishing industry. Bookshop provides best-practices for developing your books in HTML/CSS/JS, allowing them to be transformed into potentially any book format (Print-PDF, Online-PDF, mobi, ePub, etc.).
|
|
3
4
|
|
|
4
5
|
A conceptual overview of bookshop: http://blueheadblog.blogspot.com/2012/03/announcing-bookshop-html-to-pdf-ebook.html
|
|
@@ -114,12 +114,12 @@ module Bookshop
|
|
|
114
114
|
builds/mobi/OEBPS/assets/css/stylesheet.html.css
|
|
115
115
|
builds/mobi/OEBPS/assets/css/stylesheet.epub.css )
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
puts "Zipping up into epub"
|
|
118
|
+
if RUBY_PLATFORM =~ /linux|darwin|cygwin/
|
|
119
119
|
cmd = system("cd builds/mobi/ && zip -X0 'book.epub' mimetype && zip -rDX9 'book.epub' * -x '*.DS_Store' -x mimetype")
|
|
120
|
-
|
|
120
|
+
elsif RUBY_PLATFORM =~ /mingw|mswin32/
|
|
121
121
|
cmd = system("cd builds/mobi/ & ..\..\script\zip\zip.exe -X0 'book.epub' mimetype & ..\..\script\zip\zip.exe -rDX9 'book.epub' * -x mimetype")
|
|
122
|
-
|
|
122
|
+
end
|
|
123
123
|
|
|
124
124
|
puts "Validating with epubcheck"
|
|
125
125
|
|
|
@@ -199,16 +199,30 @@ module Bookshop
|
|
|
199
199
|
# book/book.html.erb source file
|
|
200
200
|
# @output variable is set to "html" for access as a conditional
|
|
201
201
|
# in the source erb's
|
|
202
|
-
build_html
|
|
202
|
+
build_html
|
|
203
|
+
|
|
204
|
+
# 'build epub' generates an epub version of the book from the builds/epub/book.epub
|
|
205
|
+
# which is generated from the book/book.html.erb source file
|
|
203
206
|
when 'epub'
|
|
204
207
|
build_epub
|
|
208
|
+
|
|
209
|
+
# 'build mobi' generates an mobi version of the book from the builds/mobi/book.epub
|
|
210
|
+
# which is generated from the book/book.html.erb source file
|
|
205
211
|
when 'mobi'
|
|
206
212
|
build_mobi
|
|
213
|
+
|
|
207
214
|
# 'build pdf' generates a pdf version of the book from the builds/html/book.html
|
|
208
215
|
# which is generated from the book/book.html.erb source file
|
|
209
216
|
when 'pdf'
|
|
210
217
|
build_pdf
|
|
211
|
-
|
|
218
|
+
|
|
219
|
+
# 'build all' generates all builds to all build folders
|
|
220
|
+
when 'all'
|
|
221
|
+
build_html
|
|
222
|
+
build_epub
|
|
223
|
+
build_mobi
|
|
224
|
+
build_pdf
|
|
225
|
+
|
|
212
226
|
else
|
|
213
227
|
puts "Error: Command not recognized" unless %w(-h --help).include?(build)
|
|
214
228
|
puts <<-EOT
|
|
@@ -219,6 +233,7 @@ module Bookshop
|
|
|
219
233
|
html Builds a new html at /builds/html/book.html
|
|
220
234
|
epub Builds a new epub at /builds/epub/book.epub
|
|
221
235
|
mobi Builds a new mobi at /builds/mobi/book.mobi
|
|
236
|
+
all Builds all formats above
|
|
222
237
|
|
|
223
238
|
All commands can be run with -h for more information.
|
|
224
239
|
EOT
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
http://blueheadpublishing.com/assets/bookshop_hero.jpg
|
|
2
|
+
|
|
2
3
|
Bookshop is a an open-source agile book development and publishing framework for authors, editors, publishers and coders in today's publishing industry. Bookshop provides best-practices for developing your books in HTML/CSS/JS, allowing them to be transformed into potentially any book format (Print-PDF, Online-PDF, mobi, ePub, etc.).
|
|
3
4
|
|
|
4
5
|
A conceptual overview of bookshop: http://blueheadblog.blogspot.com/2012/03/announcing-bookshop-html-to-pdf-ebook.html
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
<!-- Main Meta Items -->
|
|
18
18
|
<item media-type="text/css" href="assets/css/stylesheet.<%= @output %>.css" id="ebook-css" />
|
|
19
19
|
<item media-type="application/vnd.adobe-page-template+xml" href="assets/css/page-template.xpgt" id="pt" />
|
|
20
|
+
|
|
21
|
+
<!-- Kindlegen does not like a separate cover.html and will complain -->
|
|
20
22
|
<% if @output != :mobi %><item media-type="application/xhtml+xml" href="cover.html" id="cover" /><% end %>
|
|
23
|
+
|
|
21
24
|
<item media-type="image/png" href="assets/images/cover.png" id="cover-image" />
|
|
22
25
|
<item media-type="application/xhtml+xml" href="toc.html" id="toc" />
|
|
23
26
|
<item media-type="application/x-dtbncx+xml" href="toc.ncx" id="ncx" />
|
data/lib/bookshop/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bookshop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-05-
|
|
12
|
+
date: 2012-05-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: thor
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &70169033292740 !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ! '>='
|
|
@@ -21,10 +21,10 @@ dependencies:
|
|
|
21
21
|
version: 0.14.6
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *70169033292740
|
|
25
25
|
- !ruby/object:Gem::Dependency
|
|
26
26
|
name: bundler
|
|
27
|
-
requirement: &
|
|
27
|
+
requirement: &70169033291760 !ruby/object:Gem::Requirement
|
|
28
28
|
none: false
|
|
29
29
|
requirements:
|
|
30
30
|
- - ! '>='
|
|
@@ -32,10 +32,10 @@ dependencies:
|
|
|
32
32
|
version: 1.0.0
|
|
33
33
|
type: :development
|
|
34
34
|
prerelease: false
|
|
35
|
-
version_requirements: *
|
|
35
|
+
version_requirements: *70169033291760
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rake
|
|
38
|
-
requirement: &
|
|
38
|
+
requirement: &70169033290500 !ruby/object:Gem::Requirement
|
|
39
39
|
none: false
|
|
40
40
|
requirements:
|
|
41
41
|
- - ! '>='
|
|
@@ -43,10 +43,10 @@ dependencies:
|
|
|
43
43
|
version: '0'
|
|
44
44
|
type: :development
|
|
45
45
|
prerelease: false
|
|
46
|
-
version_requirements: *
|
|
46
|
+
version_requirements: *70169033290500
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: minitest
|
|
49
|
-
requirement: &
|
|
49
|
+
requirement: &70169033289560 !ruby/object:Gem::Requirement
|
|
50
50
|
none: false
|
|
51
51
|
requirements:
|
|
52
52
|
- - ! '>='
|
|
@@ -54,10 +54,10 @@ dependencies:
|
|
|
54
54
|
version: '0'
|
|
55
55
|
type: :development
|
|
56
56
|
prerelease: false
|
|
57
|
-
version_requirements: *
|
|
57
|
+
version_requirements: *70169033289560
|
|
58
58
|
- !ruby/object:Gem::Dependency
|
|
59
59
|
name: aruba
|
|
60
|
-
requirement: &
|
|
60
|
+
requirement: &70169033288840 !ruby/object:Gem::Requirement
|
|
61
61
|
none: false
|
|
62
62
|
requirements:
|
|
63
63
|
- - ! '>='
|
|
@@ -65,10 +65,10 @@ dependencies:
|
|
|
65
65
|
version: '0'
|
|
66
66
|
type: :development
|
|
67
67
|
prerelease: false
|
|
68
|
-
version_requirements: *
|
|
68
|
+
version_requirements: *70169033288840
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rdoc
|
|
71
|
-
requirement: &
|
|
71
|
+
requirement: &70169033288100 !ruby/object:Gem::Requirement
|
|
72
72
|
none: false
|
|
73
73
|
requirements:
|
|
74
74
|
- - ! '>='
|
|
@@ -76,10 +76,10 @@ dependencies:
|
|
|
76
76
|
version: '0'
|
|
77
77
|
type: :development
|
|
78
78
|
prerelease: false
|
|
79
|
-
version_requirements: *
|
|
79
|
+
version_requirements: *70169033288100
|
|
80
80
|
- !ruby/object:Gem::Dependency
|
|
81
81
|
name: mocha
|
|
82
|
-
requirement: &
|
|
82
|
+
requirement: &70169033283160 !ruby/object:Gem::Requirement
|
|
83
83
|
none: false
|
|
84
84
|
requirements:
|
|
85
85
|
- - ! '>='
|
|
@@ -87,7 +87,7 @@ dependencies:
|
|
|
87
87
|
version: '0'
|
|
88
88
|
type: :development
|
|
89
89
|
prerelease: false
|
|
90
|
-
version_requirements: *
|
|
90
|
+
version_requirements: *70169033283160
|
|
91
91
|
description: ! "bookshop is an agile book publishing framework for building pdf/(e)books
|
|
92
92
|
based on HTML5,\n CSS, and JavaScript. The framework is optimized
|
|
93
93
|
to help publishers, editors, and authors\n quickly ramp-up, allowing
|
|
@@ -182,7 +182,7 @@ files:
|
|
|
182
182
|
- lib/bookshop/generators/bookshop/app/templates/builds/mobi/.empty_directory
|
|
183
183
|
- lib/bookshop/generators/bookshop/app/templates/builds/pdf/.empty_directory
|
|
184
184
|
- lib/bookshop/generators/bookshop/app/templates/script/kindlegen/.empty_directory
|
|
185
|
-
homepage: http://blueheadpublishing.
|
|
185
|
+
homepage: http://blueheadpublishing.com/products/bookshop/
|
|
186
186
|
licenses:
|
|
187
187
|
- MIT
|
|
188
188
|
post_install_message: ! "\n ******************************************************************\n\n\n
|