kitabu 1.0.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -3
- data/.travis.yml +18 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +67 -50
- data/README.md +235 -0
- data/attachments/browser-version.png +0 -0
- data/attachments/cover.png +0 -0
- data/attachments/kitabu.epub +0 -0
- data/attachments/kitabu.mobi +0 -0
- data/attachments/kitabu.pdf +0 -0
- data/{spec/support/mybook/output → examples/kitabu/output/epub/images}/.gitkeep +0 -0
- data/examples/kitabu/output/epub/images/kitabu-icon.png +0 -0
- data/examples/kitabu/output/epub/images/kitabu-icon.svg +19 -0
- data/examples/kitabu/output/epub/images/kitabu-word.png +0 -0
- data/examples/kitabu/output/epub/images/kitabu-word.svg +14 -0
- data/examples/kitabu/output/epub/images/kitabu.png +0 -0
- data/examples/kitabu/output/epub/images/kitabu.svg +20 -0
- data/examples/kitabu/output/epub/section_0.html +266 -0
- data/examples/kitabu/output/epub/section_1.html +246 -0
- data/examples/kitabu/output/epub/section_2.html +520 -0
- data/examples/kitabu/output/epub/section_3.html +282 -0
- data/examples/kitabu/output/epub/section_4.html +276 -0
- data/examples/kitabu/output/epub/styles/epub.css +437 -0
- data/examples/kitabu/output/epub/styles/html.css +712 -0
- data/examples/kitabu/output/epub/styles/pdf.css +840 -0
- data/examples/kitabu/output/epub/styles/print.css +1278 -0
- data/examples/kitabu/output/epub/toc.html +37 -0
- data/{spec/support/mybook/templates/epub/style.css → examples/kitabu/output/images/.gitkeep} +0 -0
- data/examples/kitabu/output/images/kitabu-icon.png +0 -0
- data/examples/kitabu/output/images/kitabu-icon.svg +19 -0
- data/examples/kitabu/output/images/kitabu-word.png +0 -0
- data/examples/kitabu/output/images/kitabu-word.svg +14 -0
- data/examples/kitabu/output/images/kitabu.png +0 -0
- data/examples/kitabu/output/images/kitabu.svg +20 -0
- data/examples/kitabu/output/kitabu.epub +0 -0
- data/examples/kitabu/output/kitabu.html +513 -0
- data/examples/kitabu/output/kitabu.mobi +0 -0
- data/examples/kitabu/output/kitabu.pdf +0 -0
- data/examples/kitabu/output/kitabu.pdf.html +729 -0
- data/examples/kitabu/output/kitabu.print.html +729 -0
- data/examples/kitabu/output/kitabu.print.pdf +0 -0
- data/examples/kitabu/output/kitabu.txt +440 -0
- data/examples/kitabu/output/styles/epub.css +437 -0
- data/examples/kitabu/output/styles/html.css +712 -0
- data/examples/kitabu/output/styles/pdf.css +840 -0
- data/examples/kitabu/output/styles/print.css +1278 -0
- data/kitabu.gemspec +7 -5
- data/lib/kitabu.rb +10 -20
- data/lib/kitabu/cli.rb +0 -5
- data/lib/kitabu/dependency.rb +0 -4
- data/lib/kitabu/exporter.rb +2 -0
- data/lib/kitabu/extensions/rouge.rb +9 -0
- data/lib/kitabu/generator.rb +9 -21
- data/lib/kitabu/helpers.rb +47 -0
- data/lib/kitabu/markdown.rb +31 -0
- data/lib/kitabu/parser.rb +21 -3
- data/lib/kitabu/parser/epub.rb +31 -18
- data/lib/kitabu/parser/html.rb +48 -29
- data/lib/kitabu/parser/mobi.rb +1 -1
- data/lib/kitabu/parser/pdf.rb +52 -8
- data/lib/kitabu/version.rb +2 -2
- data/spec/kitabu/cli/export_spec.rb +4 -4
- data/spec/kitabu/cli/new_spec.rb +2 -2
- data/spec/kitabu/markdown_spec.rb +24 -0
- data/spec/kitabu/parser/html_spec.rb +20 -25
- data/spec/kitabu/parser/mobi_spec.rb +14 -0
- data/spec/kitabu/parser/pdf_spec.rb +18 -1
- data/spec/kitabu/parser/txt_spec.rb +14 -0
- data/spec/spec_helper.rb +10 -6
- data/spec/support/mybook/config/helper.rb +4 -29
- data/spec/support/mybook/config/kitabu.yml +0 -10
- data/spec/support/mybook/templates/epub/cover.erb +4 -3
- data/{templates → spec/support/mybook/templates/epub}/cover.png +0 -0
- data/spec/support/mybook/templates/epub/page.erb +3 -2
- data/spec/support/mybook/templates/html/layout.erb +10 -13
- data/spec/support/mybook/templates/styles/epub.scss +3 -0
- data/spec/support/mybook/templates/styles/html.scss +3 -0
- data/spec/support/mybook/templates/styles/pdf.scss +3 -0
- data/spec/support/mybook/templates/styles/print.scss +3 -0
- data/spec/support/mybook/text/{01_Markdown_Chapter.markdown → 01_Markdown_Chapter.md} +2 -3
- data/spec/support/mybook/text/02_ERB_Chapter.md.erb +7 -0
- data/spec/support/mybook/text/{04_With_Directory/Some_Chapter.mkdn → 03_With_Directory/Some_Chapter.md} +0 -0
- data/spec/support/mybook/text/{CHANGELOG.textile → CHANGELOG.md} +2 -2
- data/spec/support/mybook/text/{TOC.textile → TOC.md} +0 -0
- data/spec/support/mybook/text/{_00_Introduction.markdown → _00_Introduction.md} +0 -0
- data/spec/support/shared.rb +14 -10
- data/templates/Gemfile +3 -3
- data/templates/Guardfile +1 -5
- data/templates/config.erb +5 -5
- data/templates/cover.erb +4 -3
- data/templates/epub.erb +3 -2
- data/templates/helper.rb +28 -29
- data/templates/images/.gitkeep +0 -0
- data/templates/images/kitabu-icon.png +0 -0
- data/templates/images/kitabu-icon.svg +19 -0
- data/templates/images/kitabu-word.png +0 -0
- data/templates/images/kitabu-word.svg +14 -0
- data/templates/images/kitabu.png +0 -0
- data/templates/images/kitabu.svg +20 -0
- data/{examples/RailsGuides/templates → templates/templates/epub}/cover.erb +4 -3
- data/templates/templates/epub/cover.png +0 -0
- data/templates/templates/epub/page.erb +16 -0
- data/templates/{layout.erb → templates/html/layout.erb} +22 -11
- data/templates/templates/styles/epub.scss +1 -0
- data/templates/templates/styles/files/_normalize.scss +427 -0
- data/templates/templates/styles/html.scss +252 -0
- data/templates/templates/styles/pdf.scss +371 -0
- data/templates/templates/styles/print.scss +2 -0
- data/templates/text/01_Getting_Started.md +26 -0
- data/templates/text/02_Creating_Chapters.md +22 -0
- data/templates/text/03_Syntax_Highlighting.erb +69 -0
- data/templates/text/04_Dynamic_Content.erb +64 -0
- data/templates/text/05_Exporting_Files.md +49 -0
- metadata +143 -83
- data/README.rdoc +0 -218
- data/examples/RailsGuides/config/helper.rb +0 -29
- data/examples/RailsGuides/config/kitabu.yml +0 -44
- data/examples/RailsGuides/images/challenge.png +0 -0
- data/examples/RailsGuides/images/posts_index.png +0 -0
- data/examples/RailsGuides/images/rails_welcome.png +0 -0
- data/examples/RailsGuides/output/RailsGuides.epub +0 -0
- data/examples/RailsGuides/output/RailsGuides.html +0 -1556
- data/examples/RailsGuides/output/RailsGuides.pdf +3 -4934
- data/examples/RailsGuides/templates/layout.css +0 -352
- data/examples/RailsGuides/templates/layout.erb +0 -43
- data/examples/RailsGuides/templates/syntax.css +0 -62
- data/examples/RailsGuides/templates/user.css +0 -19
- data/examples/RailsGuides/text/01_Guide_Assumptions.mkdn +0 -13
- data/examples/RailsGuides/text/02_What_is_Rails.mkdn +0 -106
- data/examples/RailsGuides/text/03_Creating_a_new_Rails_project.mkdn +0 -200
- data/examples/RailsGuides/text/04_Hello_Rails.mkdn +0 -62
- data/examples/RailsGuides/text/05_Getting_Up_and_Running_Quickly_with_Scaffolding.mkdn +0 -4
- data/examples/RailsGuides/text/06_Creating_a_resource.mkdn +0 -503
- data/examples/RailsGuides/text/07_Adding_a_second_model.mkdn +0 -232
- data/examples/RailsGuides/text/08_Refactoring.mkdn +0 -123
- data/examples/RailsGuides/text/09_Deleting_comments.mkdn +0 -57
- data/examples/RailsGuides/text/09_Security.mkdn +0 -56
- data/examples/RailsGuides/text/10_Building_a_multi_model_form.mkdn +0 -130
- data/examples/RailsGuides/text/11_View_helpers.mkdn +0 -50
- data/examples/RailsGuides/text/12_Whats_next.mkdn +0 -14
- data/examples/RailsGuides/text/13_Configuration_gotchas.mkdn +0 -10
- data/lib/kitabu/adapters/markdown.rb +0 -34
- data/lib/kitabu/extensions/redcloth.rb +0 -69
- data/lib/kitabu/syntax.rb +0 -130
- data/spec/kitabu/extensions/redcloth_spec.rb +0 -57
- data/spec/kitabu/syntax_spec.rb +0 -106
- data/spec/support/mybook/templates/html/layout.css +0 -353
- data/spec/support/mybook/templates/html/syntax.css +0 -58
- data/spec/support/mybook/templates/html/user.css +0 -1
- data/spec/support/mybook/text/02_Textile_Chapter.textile +0 -3
- data/spec/support/mybook/text/03_HTML_Chapter.html +0 -3
- data/templates/epub.css +0 -500
- data/templates/layout.css +0 -353
- data/templates/sample.md +0 -6
- data/templates/syntax.css +0 -58
- data/templates/user.css +0 -1
@@ -0,0 +1,26 @@
|
|
1
|
+
## Getting Started
|
2
|
+
|
3
|
+
This guide is designed for beginners who want to get started with Kitabu from scratch. However, to get the most out of it, you need to have some prerequisites installed:
|
4
|
+
|
5
|
+
* The [Ruby](http://ruby-lang.org) interpreter version 2.0.0 or greater.
|
6
|
+
* The [PrinceXML](http://princexml.com) converter version 9.0 or greater.
|
7
|
+
* The [KindleGen](http://www.amazon.com/gp/feature.html?docId=1000765211) converter.
|
8
|
+
|
9
|
+
### Installing Ruby
|
10
|
+
|
11
|
+
To install Ruby, consider using [RVM](http://rvm.io) or [rbenv](http://rbenv.org), both available for Mac OSX and Linux distros. If you're running a Windows, well, I can't help you. I don't even know if Kitabu runs over Windows boxes, so if you find any bugs, make sure you [let me know](http://github.com/fnando/kitabu/issues).
|
12
|
+
|
13
|
+
### Installing PrinceXML
|
14
|
+
|
15
|
+
[PrinceXML](http://princexml.com) is the best HTML to PDF converter available. You can use advanced CSS features to style your book in any way you want. But good things don't come for free, and PrinceXML is no exception. The Professional License, which you grant you a installation on a single computer by a single user costs 495USD. If you don't like the price tag, consider using [DocRaptor](http://docraptor.com) when you're ready to publish your book.
|
16
|
+
|
17
|
+
To install PrinceXML, go to the website and download the correct version for your platform; you can choose from Mac OSX, to Linux and Windows.
|
18
|
+
|
19
|
+
### Installing KindleGen
|
20
|
+
|
21
|
+
KindleGen is the command-line tool that allows you to convert e-pubs into `.mobi` files. You can't sell these files, though.[^1] So if that's the case, consider using [Calibre](http://calibre-ebook.com/) for this task.[^2]
|
22
|
+
|
23
|
+
If you're running [Homebrew](http://brew.sh) on the Mac OSX, you can install it with `brew install kindlegen`. Go to [KindleGen's website](http://www.amazon.com/gp/feature.html?docId=1000765211) and download the appropriate installer otherwise.
|
24
|
+
|
25
|
+
[^1]: You can, but that would be a violation of Amazon's terms of use.
|
26
|
+
[^2]: Calibre is not perfect, but does a good job.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
## Creating Chapters
|
2
|
+
|
3
|
+
You can create chapters by having multiple files or directories. They're alphabetically sorted, so make sure you use a prefixed file name like `01_Introduction.md` as the file name.
|
4
|
+
|
5
|
+
If you're going to write a long book, make sure you use the directory organization. This way you can have smaller text files, which will be easier to read and change as you go. A file structure suggestion for a book about [Ruby on Rails](http://guides.rubyonrails.com) would be:
|
6
|
+
|
7
|
+
```text
|
8
|
+
getting-started-with-rails
|
9
|
+
├── text
|
10
|
+
└── 01_Guide_Assumptions.md
|
11
|
+
└── 02_Whats_Rails.md
|
12
|
+
└── 03_Creating_A_New_Project
|
13
|
+
└── 01_Installing_Rails.md
|
14
|
+
└── 02_Creating_The_Blog_Application.md
|
15
|
+
└── 04_Hello_Rails
|
16
|
+
└── 01_Starting_Up_The_Web_Server.md
|
17
|
+
└── 02_Say_Hello_Rails.md
|
18
|
+
└── 03_Setting_The_Application_Home_Page.md
|
19
|
+
└── ...
|
20
|
+
```
|
21
|
+
|
22
|
+
Notice that the file name does not need to be readable, but it will make your life easier.
|
@@ -0,0 +1,69 @@
|
|
1
|
+
## Syntax Highlighting
|
2
|
+
|
3
|
+
### What about the syntax
|
4
|
+
|
5
|
+
Kitabu uses [Route](http://rubygems.org/gems/rouge) as the syntax highlight formatter. It emits an output compatible with stylesheets designed for [pygments](https://pygments.org), the Python library used by many.
|
6
|
+
|
7
|
+
To highlight a code block, use the fenced block syntax. The following example would be formatted as Ruby.
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
class User
|
11
|
+
attr_accessor :name, :email
|
12
|
+
|
13
|
+
def initialize(name, email)
|
14
|
+
@name = name
|
15
|
+
@email = email
|
16
|
+
end
|
17
|
+
end
|
18
|
+
```
|
19
|
+
|
20
|
+
The output would be something like this:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
class User
|
24
|
+
attr_accessor :name, :email
|
25
|
+
|
26
|
+
def initialize(name, email)
|
27
|
+
@name = name
|
28
|
+
@email = email
|
29
|
+
end
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
<% note do %>
|
34
|
+
If you're using Sublime Text, make sure you install the [Markdown Extended](https://packagecontrol.io/packages/Markdown%20Extended) plugin; it enables code syntax highlighting on your Markdown files.
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
You can also provide inline options such as line numbers and inline rendering.
|
38
|
+
|
39
|
+
```ruby?line_numbers=1
|
40
|
+
class User
|
41
|
+
attr_accessor :name, :email
|
42
|
+
|
43
|
+
def initialize(name, email)
|
44
|
+
@name = name
|
45
|
+
@email = email
|
46
|
+
end
|
47
|
+
end
|
48
|
+
```
|
49
|
+
|
50
|
+
This would be rendered like this:
|
51
|
+
|
52
|
+
```ruby?line_numbers=1
|
53
|
+
class User
|
54
|
+
attr_accessor :name, :email
|
55
|
+
|
56
|
+
def initialize(name, email)
|
57
|
+
@name = name
|
58
|
+
@email = email
|
59
|
+
end
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
### Lexers
|
64
|
+
|
65
|
+
Rouge comes with dozens of lexers. Check out this list, generated dynamically when you export your e-book.
|
66
|
+
|
67
|
+
<%= lexers_list %>
|
68
|
+
|
69
|
+
And if what you want is not on this list, make you [open a ticket](https://github.com/jneen/rouge/issues) on the project.
|
@@ -0,0 +1,64 @@
|
|
1
|
+
## Dynamic Content
|
2
|
+
|
3
|
+
Sometimes you may find useful to generate content dynamically. Maybe you're going to read some configuration file, or maybe you just want to define some helpers. Kitabu has support for ERb files; all you need to do is naming your text file as `.erb`.
|
4
|
+
|
5
|
+
On the previous chapter, we listed all supported Rouge lexers. To do that, I created a helper that looks like this:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
module Kitabu
|
9
|
+
module Helpers
|
10
|
+
def lexers_list
|
11
|
+
buffer = '<ul class="lexers">'
|
12
|
+
|
13
|
+
Rouge::Lexers.constants.each do |const|
|
14
|
+
lexer = Rouge::Lexers.const_get(const)
|
15
|
+
|
16
|
+
begin
|
17
|
+
title = lexer.title
|
18
|
+
tag = lexer.tag
|
19
|
+
description = lexer.desc
|
20
|
+
rescue Exception => e
|
21
|
+
next
|
22
|
+
end
|
23
|
+
|
24
|
+
buffer << '<li>'
|
25
|
+
buffer << "<strong>#{title}</strong> "
|
26
|
+
buffer << "<code>#{tag}</code><br>"
|
27
|
+
buffer << "<span>#{description}</span>"
|
28
|
+
buffer << '</li>'
|
29
|
+
end
|
30
|
+
|
31
|
+
buffer << '</ul>'
|
32
|
+
buffer
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
To use it, I just needed to add `<%%= lexers_list %>` to my text file. This allows you to create anything you need!
|
39
|
+
|
40
|
+
Kitabu comes with some built-in helpers, such as `note`. With this helper, you can create a note that generates a HTML structure, so you can easily style it. The syntax for using the `note` helper is `note(type, &block)`.
|
41
|
+
|
42
|
+
```erb
|
43
|
+
<%% note do %>
|
44
|
+
Some text that will be parsed as Markdown.
|
45
|
+
<%% end %>
|
46
|
+
```
|
47
|
+
|
48
|
+
By default, this will generate a `<div class="note info">` tag, but you can use anything you want.
|
49
|
+
|
50
|
+
```erb
|
51
|
+
<%% note :warning do %>
|
52
|
+
Some text that will be parsed as Markdown.
|
53
|
+
<%% end %>
|
54
|
+
```
|
55
|
+
|
56
|
+
[Check out the source](https://github.com/fnando/kitabu/blob/cleanup/lib/kitabu/helpers.rb) for a sample on how to create block helpers like `note`.
|
57
|
+
|
58
|
+
### Escaping ERb code
|
59
|
+
|
60
|
+
If you want to write a book about Rails, you're likely to use lots of ERb tags. In this case, make sure you escape the `<% %>` and `<%= %>` markers as `<%% %>` and `<%%= %>`; otherwise you'll have a syntax error.
|
61
|
+
|
62
|
+
```
|
63
|
+
<%%%= Date.today %>
|
64
|
+
```
|
@@ -0,0 +1,49 @@
|
|
1
|
+
## Exporting Files
|
2
|
+
|
3
|
+
You can generate files as you go. Just execute `kitabu export` from your book's root directory.
|
4
|
+
|
5
|
+
```
|
6
|
+
$ kitabu export
|
7
|
+
** e-book has been exported
|
8
|
+
```
|
9
|
+
|
10
|
+
This command will generate all supported formats[^1]. The generated files will be placed on your `output` directory; the following output list only the relevant files.
|
11
|
+
|
12
|
+
```
|
13
|
+
$ tree output
|
14
|
+
output
|
15
|
+
├── images
|
16
|
+
│ ├── kitabu.png
|
17
|
+
│ └── kitabu.svg
|
18
|
+
├── kitabu.epub
|
19
|
+
├── kitabu.html
|
20
|
+
├── kitabu.mobi
|
21
|
+
├── kitabu.pdf
|
22
|
+
├── kitabu.print.pdf
|
23
|
+
├── kitabu.txt
|
24
|
+
└── styles
|
25
|
+
├── epub.css
|
26
|
+
├── html.css
|
27
|
+
├── pdf.css
|
28
|
+
└── print.css
|
29
|
+
```
|
30
|
+
|
31
|
+
This can take a while depending on your book size, but usually the process is pretty fast. If you want to generate a specific format faster, provide the `--only` flag.
|
32
|
+
|
33
|
+
```
|
34
|
+
$ kitabu export --only pdf
|
35
|
+
```
|
36
|
+
|
37
|
+
You can also automatically generate files when something changes. You can use [Guard](http://rubygems.org/gems/guard) for this, and Kitabu even generates a sample file for you. All you have to do is running `bundle exec guard`.
|
38
|
+
|
39
|
+
```
|
40
|
+
$ bundle exec guard
|
41
|
+
20:38:10 - INFO - Guard is now watching at '/Users/fnando/Projects/kitabu/examples/kitabu'
|
42
|
+
** e-book has been exported
|
43
|
+
```
|
44
|
+
|
45
|
+
### Exporting PDF with DocRaptor
|
46
|
+
|
47
|
+
After exporting your files (you can use `--only pdf` for this), upload files to somewhere public, possibly your [Dropbox](http://dropbox.com) account. You can even use curl; since the command is quite long, you can view it at <https://gist.github.com/fnando/de555a08e7aab14a661a>.
|
48
|
+
|
49
|
+
[^1]: Depend on Prince, html2text and KindleGen being available on your `$PATH`.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitabu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: i18n
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: redcarpet
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: eeepub-with-cover-support
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rouge
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: notifier
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: rubyzip
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: zip-zip
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
@@ -151,7 +151,21 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: sass
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: sass-globbing
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - ">="
|
@@ -206,8 +220,23 @@ dependencies:
|
|
206
220
|
- - ">="
|
207
221
|
- !ruby/object:Gem::Version
|
208
222
|
version: '0'
|
209
|
-
|
210
|
-
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: codeclimate-test-reporter
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
description: A framework for creating e-books from Markdown using Ruby. Using the
|
238
|
+
Prince PDF generator, you'll be able to get high quality PDFs. Also supports EPUB,
|
239
|
+
Mobi, Text and HTML generation.
|
211
240
|
email:
|
212
241
|
- fnando.vieira@gmail.com
|
213
242
|
executables:
|
@@ -218,48 +247,65 @@ files:
|
|
218
247
|
- ".gitignore"
|
219
248
|
- ".gitmodules"
|
220
249
|
- ".rspec"
|
250
|
+
- ".travis.yml"
|
251
|
+
- CHANGELOG.md
|
221
252
|
- Gemfile
|
222
253
|
- Gemfile.lock
|
223
|
-
- README.
|
254
|
+
- README.md
|
224
255
|
- Rakefile
|
256
|
+
- attachments/browser-version.png
|
257
|
+
- attachments/cover.png
|
258
|
+
- attachments/kitabu.epub
|
259
|
+
- attachments/kitabu.mobi
|
260
|
+
- attachments/kitabu.pdf
|
225
261
|
- bin/kitabu
|
226
|
-
- examples/
|
227
|
-
- examples/
|
228
|
-
- examples/
|
229
|
-
- examples/
|
230
|
-
- examples/
|
231
|
-
- examples/
|
232
|
-
- examples/
|
233
|
-
- examples/
|
234
|
-
- examples/
|
235
|
-
- examples/
|
236
|
-
- examples/
|
237
|
-
- examples/
|
238
|
-
- examples/
|
239
|
-
- examples/
|
240
|
-
- examples/
|
241
|
-
- examples/
|
242
|
-
- examples/
|
243
|
-
- examples/
|
244
|
-
- examples/
|
245
|
-
- examples/
|
246
|
-
- examples/
|
247
|
-
- examples/
|
248
|
-
- examples/
|
249
|
-
- examples/
|
250
|
-
- examples/
|
251
|
-
- examples/
|
252
|
-
- examples/
|
262
|
+
- examples/kitabu/output/epub/images/.gitkeep
|
263
|
+
- examples/kitabu/output/epub/images/kitabu-icon.png
|
264
|
+
- examples/kitabu/output/epub/images/kitabu-icon.svg
|
265
|
+
- examples/kitabu/output/epub/images/kitabu-word.png
|
266
|
+
- examples/kitabu/output/epub/images/kitabu-word.svg
|
267
|
+
- examples/kitabu/output/epub/images/kitabu.png
|
268
|
+
- examples/kitabu/output/epub/images/kitabu.svg
|
269
|
+
- examples/kitabu/output/epub/section_0.html
|
270
|
+
- examples/kitabu/output/epub/section_1.html
|
271
|
+
- examples/kitabu/output/epub/section_2.html
|
272
|
+
- examples/kitabu/output/epub/section_3.html
|
273
|
+
- examples/kitabu/output/epub/section_4.html
|
274
|
+
- examples/kitabu/output/epub/styles/epub.css
|
275
|
+
- examples/kitabu/output/epub/styles/html.css
|
276
|
+
- examples/kitabu/output/epub/styles/pdf.css
|
277
|
+
- examples/kitabu/output/epub/styles/print.css
|
278
|
+
- examples/kitabu/output/epub/toc.html
|
279
|
+
- examples/kitabu/output/images/.gitkeep
|
280
|
+
- examples/kitabu/output/images/kitabu-icon.png
|
281
|
+
- examples/kitabu/output/images/kitabu-icon.svg
|
282
|
+
- examples/kitabu/output/images/kitabu-word.png
|
283
|
+
- examples/kitabu/output/images/kitabu-word.svg
|
284
|
+
- examples/kitabu/output/images/kitabu.png
|
285
|
+
- examples/kitabu/output/images/kitabu.svg
|
286
|
+
- examples/kitabu/output/kitabu.epub
|
287
|
+
- examples/kitabu/output/kitabu.html
|
288
|
+
- examples/kitabu/output/kitabu.mobi
|
289
|
+
- examples/kitabu/output/kitabu.pdf
|
290
|
+
- examples/kitabu/output/kitabu.pdf.html
|
291
|
+
- examples/kitabu/output/kitabu.print.html
|
292
|
+
- examples/kitabu/output/kitabu.print.pdf
|
293
|
+
- examples/kitabu/output/kitabu.txt
|
294
|
+
- examples/kitabu/output/styles/epub.css
|
295
|
+
- examples/kitabu/output/styles/html.css
|
296
|
+
- examples/kitabu/output/styles/pdf.css
|
297
|
+
- examples/kitabu/output/styles/print.css
|
253
298
|
- kitabu.gemspec
|
254
299
|
- lib/kitabu.rb
|
255
|
-
- lib/kitabu/adapters/markdown.rb
|
256
300
|
- lib/kitabu/cli.rb
|
257
301
|
- lib/kitabu/dependency.rb
|
258
302
|
- lib/kitabu/errors.rb
|
259
303
|
- lib/kitabu/exporter.rb
|
260
|
-
- lib/kitabu/extensions/
|
304
|
+
- lib/kitabu/extensions/rouge.rb
|
261
305
|
- lib/kitabu/extensions/string.rb
|
262
306
|
- lib/kitabu/generator.rb
|
307
|
+
- lib/kitabu/helpers.rb
|
308
|
+
- lib/kitabu/markdown.rb
|
263
309
|
- lib/kitabu/parser.rb
|
264
310
|
- lib/kitabu/parser/epub.rb
|
265
311
|
- lib/kitabu/parser/html.rb
|
@@ -268,7 +314,6 @@ files:
|
|
268
314
|
- lib/kitabu/parser/txt.rb
|
269
315
|
- lib/kitabu/stats.rb
|
270
316
|
- lib/kitabu/stream.rb
|
271
|
-
- lib/kitabu/syntax.rb
|
272
317
|
- lib/kitabu/syntax/highlight.rb
|
273
318
|
- lib/kitabu/toc.rb
|
274
319
|
- lib/kitabu/toc/epub.rb
|
@@ -279,14 +324,15 @@ files:
|
|
279
324
|
- spec/kitabu/cli/permalinks_spec.rb
|
280
325
|
- spec/kitabu/cli/stats_spec.rb
|
281
326
|
- spec/kitabu/cli/version_spec.rb
|
282
|
-
- spec/kitabu/extensions/redcloth_spec.rb
|
283
327
|
- spec/kitabu/extensions/string_spec.rb
|
284
328
|
- spec/kitabu/generator_spec.rb
|
329
|
+
- spec/kitabu/markdown_spec.rb
|
285
330
|
- spec/kitabu/parser/epub_spec.rb
|
286
331
|
- spec/kitabu/parser/html_spec.rb
|
332
|
+
- spec/kitabu/parser/mobi_spec.rb
|
287
333
|
- spec/kitabu/parser/pdf_spec.rb
|
334
|
+
- spec/kitabu/parser/txt_spec.rb
|
288
335
|
- spec/kitabu/stats_spec.rb
|
289
|
-
- spec/kitabu/syntax_spec.rb
|
290
336
|
- spec/kitabu/toc/html_spec.rb
|
291
337
|
- spec/spec_helper.rb
|
292
338
|
- spec/support/exit_with_code.rb
|
@@ -299,37 +345,50 @@ files:
|
|
299
345
|
- spec/support/mybook/config/kitabu.yml
|
300
346
|
- spec/support/mybook/images/.gitkeep
|
301
347
|
- spec/support/mybook/images/logo.gif
|
302
|
-
- spec/support/mybook/output/.gitkeep
|
303
348
|
- spec/support/mybook/templates/epub/cover.erb
|
349
|
+
- spec/support/mybook/templates/epub/cover.png
|
304
350
|
- spec/support/mybook/templates/epub/page.erb
|
305
|
-
- spec/support/mybook/templates/epub/style.css
|
306
|
-
- spec/support/mybook/templates/html/layout.css
|
307
351
|
- spec/support/mybook/templates/html/layout.erb
|
308
|
-
- spec/support/mybook/templates/
|
309
|
-
- spec/support/mybook/templates/html
|
352
|
+
- spec/support/mybook/templates/styles/epub.scss
|
353
|
+
- spec/support/mybook/templates/styles/html.scss
|
354
|
+
- spec/support/mybook/templates/styles/pdf.scss
|
355
|
+
- spec/support/mybook/templates/styles/print.scss
|
310
356
|
- spec/support/mybook/text/.gitkeep
|
311
|
-
- spec/support/mybook/text/01_Markdown_Chapter.
|
312
|
-
- spec/support/mybook/text/
|
313
|
-
- spec/support/mybook/text/
|
314
|
-
- spec/support/mybook/text/
|
315
|
-
- spec/support/mybook/text/
|
316
|
-
- spec/support/mybook/text/
|
317
|
-
- spec/support/mybook/text/_00_Introduction.markdown
|
357
|
+
- spec/support/mybook/text/01_Markdown_Chapter.md
|
358
|
+
- spec/support/mybook/text/02_ERB_Chapter.md.erb
|
359
|
+
- spec/support/mybook/text/03_With_Directory/Some_Chapter.md
|
360
|
+
- spec/support/mybook/text/CHANGELOG.md
|
361
|
+
- spec/support/mybook/text/TOC.md
|
362
|
+
- spec/support/mybook/text/_00_Introduction.md
|
318
363
|
- spec/support/shared.rb
|
319
364
|
- templates/Gemfile
|
320
365
|
- templates/Guardfile
|
321
366
|
- templates/config.erb
|
322
367
|
- templates/cover.erb
|
323
|
-
- templates/cover.png
|
324
368
|
- templates/ebook.png
|
325
|
-
- templates/epub.css
|
326
369
|
- templates/epub.erb
|
327
370
|
- templates/helper.rb
|
328
|
-
- templates/
|
329
|
-
- templates/
|
330
|
-
- templates/
|
331
|
-
- templates/
|
332
|
-
- templates/
|
371
|
+
- templates/images/.gitkeep
|
372
|
+
- templates/images/kitabu-icon.png
|
373
|
+
- templates/images/kitabu-icon.svg
|
374
|
+
- templates/images/kitabu-word.png
|
375
|
+
- templates/images/kitabu-word.svg
|
376
|
+
- templates/images/kitabu.png
|
377
|
+
- templates/images/kitabu.svg
|
378
|
+
- templates/templates/epub/cover.erb
|
379
|
+
- templates/templates/epub/cover.png
|
380
|
+
- templates/templates/epub/page.erb
|
381
|
+
- templates/templates/html/layout.erb
|
382
|
+
- templates/templates/styles/epub.scss
|
383
|
+
- templates/templates/styles/files/_normalize.scss
|
384
|
+
- templates/templates/styles/html.scss
|
385
|
+
- templates/templates/styles/pdf.scss
|
386
|
+
- templates/templates/styles/print.scss
|
387
|
+
- templates/text/01_Getting_Started.md
|
388
|
+
- templates/text/02_Creating_Chapters.md
|
389
|
+
- templates/text/03_Syntax_Highlighting.erb
|
390
|
+
- templates/text/04_Dynamic_Content.erb
|
391
|
+
- templates/text/05_Exporting_Files.md
|
333
392
|
homepage: http://rubygems.org/gems/kitabu
|
334
393
|
licenses:
|
335
394
|
- MIT
|
@@ -342,7 +401,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
342
401
|
requirements:
|
343
402
|
- - ">="
|
344
403
|
- !ruby/object:Gem::Version
|
345
|
-
version: '
|
404
|
+
version: '2.0'
|
346
405
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
406
|
requirements:
|
348
407
|
- - ">="
|
@@ -350,25 +409,27 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
350
409
|
version: '0'
|
351
410
|
requirements: []
|
352
411
|
rubyforge_project:
|
353
|
-
rubygems_version: 2.
|
412
|
+
rubygems_version: 2.4.6
|
354
413
|
signing_key:
|
355
414
|
specification_version: 4
|
356
|
-
summary: A framework
|
357
|
-
|
415
|
+
summary: A framework for creating e-books from Markdown using Ruby. Using the Prince
|
416
|
+
PDF generator, you'll be able to get high quality PDFs. Also supports EPUB, Mobi,
|
417
|
+
Text and HTML generation.
|
358
418
|
test_files:
|
359
419
|
- spec/kitabu/cli/export_spec.rb
|
360
420
|
- spec/kitabu/cli/new_spec.rb
|
361
421
|
- spec/kitabu/cli/permalinks_spec.rb
|
362
422
|
- spec/kitabu/cli/stats_spec.rb
|
363
423
|
- spec/kitabu/cli/version_spec.rb
|
364
|
-
- spec/kitabu/extensions/redcloth_spec.rb
|
365
424
|
- spec/kitabu/extensions/string_spec.rb
|
366
425
|
- spec/kitabu/generator_spec.rb
|
426
|
+
- spec/kitabu/markdown_spec.rb
|
367
427
|
- spec/kitabu/parser/epub_spec.rb
|
368
428
|
- spec/kitabu/parser/html_spec.rb
|
429
|
+
- spec/kitabu/parser/mobi_spec.rb
|
369
430
|
- spec/kitabu/parser/pdf_spec.rb
|
431
|
+
- spec/kitabu/parser/txt_spec.rb
|
370
432
|
- spec/kitabu/stats_spec.rb
|
371
|
-
- spec/kitabu/syntax_spec.rb
|
372
433
|
- spec/kitabu/toc/html_spec.rb
|
373
434
|
- spec/spec_helper.rb
|
374
435
|
- spec/support/exit_with_code.rb
|
@@ -381,20 +442,19 @@ test_files:
|
|
381
442
|
- spec/support/mybook/config/kitabu.yml
|
382
443
|
- spec/support/mybook/images/.gitkeep
|
383
444
|
- spec/support/mybook/images/logo.gif
|
384
|
-
- spec/support/mybook/output/.gitkeep
|
385
445
|
- spec/support/mybook/templates/epub/cover.erb
|
446
|
+
- spec/support/mybook/templates/epub/cover.png
|
386
447
|
- spec/support/mybook/templates/epub/page.erb
|
387
|
-
- spec/support/mybook/templates/epub/style.css
|
388
|
-
- spec/support/mybook/templates/html/layout.css
|
389
448
|
- spec/support/mybook/templates/html/layout.erb
|
390
|
-
- spec/support/mybook/templates/
|
391
|
-
- spec/support/mybook/templates/html
|
449
|
+
- spec/support/mybook/templates/styles/epub.scss
|
450
|
+
- spec/support/mybook/templates/styles/html.scss
|
451
|
+
- spec/support/mybook/templates/styles/pdf.scss
|
452
|
+
- spec/support/mybook/templates/styles/print.scss
|
392
453
|
- spec/support/mybook/text/.gitkeep
|
393
|
-
- spec/support/mybook/text/01_Markdown_Chapter.
|
394
|
-
- spec/support/mybook/text/
|
395
|
-
- spec/support/mybook/text/
|
396
|
-
- spec/support/mybook/text/
|
397
|
-
- spec/support/mybook/text/
|
398
|
-
- spec/support/mybook/text/
|
399
|
-
- spec/support/mybook/text/_00_Introduction.markdown
|
454
|
+
- spec/support/mybook/text/01_Markdown_Chapter.md
|
455
|
+
- spec/support/mybook/text/02_ERB_Chapter.md.erb
|
456
|
+
- spec/support/mybook/text/03_With_Directory/Some_Chapter.md
|
457
|
+
- spec/support/mybook/text/CHANGELOG.md
|
458
|
+
- spec/support/mybook/text/TOC.md
|
459
|
+
- spec/support/mybook/text/_00_Introduction.md
|
400
460
|
- spec/support/shared.rb
|