softcover 0.9.21 → 0.9.22
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.
- checksums.yaml +4 -4
- data/README.md +3 -20
- data/lib/softcover/builders/epub.rb +18 -0
- data/lib/softcover/version.rb +1 -1
- data/spec/builders/epub_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8a8e789c3fc96f991a8963278eba04219c5622f
|
|
4
|
+
data.tar.gz: e2675c8468c9d5ae72d6d8f59389ff549c06e2c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebee4f32daf809b817697964258a453fc8c2dc15e38828ba007d40005579dfce3d1526f553065fc42d75e4b1b9bbfdb3a9dd030d7f7f0d08024ffc1fef8b3be4
|
|
7
|
+
data.tar.gz: 47682e596be850431ec2d51f05a4ebf55cdb0f19ac94fd93a4093fa9328dce18105570d27d3cda6a8411300822f45e392d4f4a37ea3cdb51959bd2ae34114554
|
data/README.md
CHANGED
|
@@ -6,35 +6,18 @@ Softcover is an ebook typesetting system for technical authors. This is the main
|
|
|
6
6
|
|
|
7
7
|
For more details about Softcover, see [*The Softcover Book*](http://manual.softcover.io/book).
|
|
8
8
|
|
|
9
|
-
<!--
|
|
10
|
-
# Softcover CLI
|
|
11
|
-
|
|
12
|
-
Command line interface for Softcover.io
|
|
13
|
-
|
|
14
9
|
## Installation
|
|
15
10
|
|
|
16
11
|
$ gem install softcover
|
|
17
12
|
|
|
18
13
|
## Usage
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## Commands:
|
|
23
|
-
|
|
24
|
-
* login
|
|
25
|
-
* logout
|
|
26
|
-
* build:html, build:pdf, build:epub, build:mobi, build:all
|
|
27
|
-
* build (aliased to build:html)
|
|
28
|
-
* publish
|
|
29
|
-
* new
|
|
15
|
+
Run
|
|
30
16
|
|
|
31
|
-
|
|
32
|
-
$ softcover config:add host=http://localhost:3000
|
|
17
|
+
$ softcover help
|
|
33
18
|
|
|
34
|
-
|
|
19
|
+
for a list of supported commands.
|
|
35
20
|
|
|
36
|
-
$ silence=false bundle exec rspec
|
|
37
|
-
-->
|
|
38
21
|
## Contributing
|
|
39
22
|
|
|
40
23
|
1. Fork it
|
|
@@ -14,6 +14,7 @@ module Softcover
|
|
|
14
14
|
create_directories
|
|
15
15
|
write_mimetype
|
|
16
16
|
write_container_xml
|
|
17
|
+
write_ibooks_xml
|
|
17
18
|
write_toc
|
|
18
19
|
write_nav
|
|
19
20
|
copy_image_files
|
|
@@ -55,6 +56,14 @@ module Softcover
|
|
|
55
56
|
File.write(path('epub/META-INF/container.xml'), container_xml)
|
|
56
57
|
end
|
|
57
58
|
|
|
59
|
+
# Writes iBooks-specific XML.
|
|
60
|
+
# This allows proper display of monospace fonts in code samples, among
|
|
61
|
+
# other things.
|
|
62
|
+
def write_ibooks_xml
|
|
63
|
+
xml_filename = 'com.apple.ibooks.display-options.xml'
|
|
64
|
+
File.write(path("epub/META-INF/#{xml_filename}"), ibooks_xml)
|
|
65
|
+
end
|
|
66
|
+
|
|
58
67
|
# Writes the content.opf file.
|
|
59
68
|
# This is required by the EPUB standard.
|
|
60
69
|
def write_contents
|
|
@@ -304,6 +313,15 @@ module Softcover
|
|
|
304
313
|
</container>)
|
|
305
314
|
end
|
|
306
315
|
|
|
316
|
+
def ibooks_xml
|
|
317
|
+
%(<?xml version="1.0" encoding="UTF-8"?>
|
|
318
|
+
<display_options>
|
|
319
|
+
<platform name="*">
|
|
320
|
+
<option name="specified-fonts">true</option>
|
|
321
|
+
</platform>
|
|
322
|
+
</display_options>)
|
|
323
|
+
end
|
|
324
|
+
|
|
307
325
|
# Returns the content configuration file.
|
|
308
326
|
def content_opf
|
|
309
327
|
title = manifest.title
|
data/lib/softcover/version.rb
CHANGED
data/spec/builders/epub_spec.rb
CHANGED
|
@@ -34,6 +34,10 @@ describe Softcover::Builders::Epub do
|
|
|
34
34
|
expect('epub/META-INF/container.xml').to exist
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
it "should have an iBooks XML file" do
|
|
38
|
+
expect('epub/META-INF/com.apple.ibooks.display-options.xml').to exist
|
|
39
|
+
end
|
|
40
|
+
|
|
37
41
|
it "should have the right contents" do
|
|
38
42
|
File.open('epub/META-INF/container.xml') do |f|
|
|
39
43
|
expect(f.read).to match(/rootfile full-path="OEBPS\/content.opf"/)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: softcover
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.22
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Hartl
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-06-
|
|
12
|
+
date: 2014-06-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: polytexnic
|