asciibook 0.0.5 → 0.1.0.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e561b902bdbeba9e4d2d4031bcbd0fec7f666e68fe0a2bc58a4ea3a11664411e
4
- data.tar.gz: 12c0feb2787ef840f7971f21ba7bb661de43d5aec1b5031a5550b3723728478c
3
+ metadata.gz: 8b07fb3fa60753fd80a3856b4f6bb8fd5015b195511b5cb619de9b1bc9fa4714
4
+ data.tar.gz: 7c0e8160d3bfa813422878c3355954443c287496e676681853cd35d93c5d5a2e
5
5
  SHA512:
6
- metadata.gz: 343136908ff91ccf947ff08abbabb3cae77432266e74929c154dd35089997c6ea6b4427b1ff23fe471cb464aa72322d4a5ea39e62824fa60199b9472f441541a
7
- data.tar.gz: ae4077c7403915eac598f120c5ec6fbcca50f70efa719f9f41c7c97d26316c2c03b15b266f01e5f08be7bb740d47ecc72efe36288dff3337bbb5a28caac880cc
6
+ metadata.gz: 4322ee85e1049cda3e4400886deba30ead2c7882ab5d3636f49a3a362ea26d71cbce58e5316f9b89fc23cc3228368620365efe66ae95956c052b954b6762de5f
7
+ data.tar.gz: b947adeb15ea25dc9168e245cd98e16dd5ff93b861cef4091071784b503bb9a2be2d9a7018e39cac868720351897fe45e2d4826b25438e84dc7c0505ab297f7c
data/README.adoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = Asciibook
2
2
  :toc:
3
3
 
4
- Asciibook is an Ebook generator for converting AsciiDoc to HTML, PDF, EPUB and MOBI.
4
+ Asciibook is an Ebook generator for converting AsciiDoc to HTML, PDF and EPUB.
5
5
 
6
6
  == Installation
7
7
 
@@ -41,8 +41,7 @@ Or generate partial formats:
41
41
 
42
42
  [source, console]
43
43
  ----
44
- /asciibook # asciibook build mybook.adoc --format html
45
- /asciibook # asciibook build mybook.adoc --format pdf,mobi
44
+ /asciibook # asciibook build mybook.adoc --format html,pdf,epub
46
45
  ----
47
46
 
48
47
  If you don't want to type the parameters repeatedly, you can create a configuration file for the document:
@@ -4,7 +4,6 @@ source: book.adoc
4
4
  # - html
5
5
  # - pdf
6
6
  # - epub
7
- # - mobi
8
7
  #
9
8
  # theme_dir:
10
9
  # template_dir:
@@ -9,7 +9,7 @@ module Asciibook
9
9
  @base_dir = options[:base_dir] || '.'
10
10
  @dest_dir = options[:dest_dir] || File.join(@base_dir, 'build')
11
11
  @theme_dir = options[:theme_dir] || File.expand_path('../../../theme', __FILE__)
12
- @formats = options[:formats] || %w(html pdf epub mobi)
12
+ @formats = options[:formats] || %w(html pdf epub)
13
13
  @template_dir = options[:template_dir]
14
14
 
15
15
  @page_level = @options[:page_level] || 1
@@ -98,10 +98,6 @@ module Asciibook
98
98
  if @formats.include?('epub')
99
99
  Builders::EpubBuilder.new(self).build
100
100
  end
101
-
102
- if @formats.include?('mobi')
103
- Builders::MobiBuilder.new(self).build
104
- end
105
101
  end
106
102
 
107
103
  def process_pages
@@ -115,6 +115,7 @@ module Asciibook
115
115
  if @book.cover_image_path
116
116
  prepare_cover
117
117
  command << 'cover' << 'cover.html'
118
+ command << '--allow' << File.expand_path(@tmp_dir)
118
119
  end
119
120
 
120
121
  @book.pages.each do |page|
@@ -7,7 +7,7 @@ module Asciibook
7
7
  p = Mercenary::Program.new(:asciibook)
8
8
 
9
9
  p.version Asciibook::VERSION
10
- p.description 'Asciibook is a ebook generator from Asciidoc to html/pdf/epub/mobi'
10
+ p.description 'Asciibook is a ebook generator from Asciidoc to html/pdf/epub'
11
11
  p.syntax 'asciibook <command> [options]'
12
12
 
13
13
  p.command(:new) do |c|
@@ -43,7 +43,6 @@ module Asciibook
43
43
  # - html
44
44
  # - pdf
45
45
  # - epub
46
- # - mobi
47
46
  #
48
47
  # theme_dir:
49
48
  # template_dir:
@@ -62,7 +61,7 @@ module Asciibook
62
61
  p.command(:build) do |c|
63
62
  c.description 'Build book'
64
63
  c.syntax 'build [FILE|DIR]'
65
- c.option :formats, '--format FORMAT1[,FORMAT2[,FORMAT3...]]', Array, 'Formats you want to build, allow: html,pdf,epub,mobi, default is all.'
64
+ c.option :formats, '--format FORMAT1[,FORMAT2[,FORMAT3...]]', Array, 'Formats you want to build, allow: html,pdf,epub, default is all.'
66
65
  c.option :theme_dir, '--theme-dir DIR', 'Theme dir.'
67
66
  c.option :template_dir, '--template-dir DIR', 'Template dir.'
68
67
  c.option :dest_dir, '--dest-dir DIR', 'Destination dir.'
@@ -1,3 +1,3 @@
1
1
  module Asciibook
2
- VERSION = "0.0.5"
2
+ VERSION = "0.1.0-beta"
3
3
  end
data/lib/asciibook.rb CHANGED
@@ -18,7 +18,6 @@ require "asciibook/builders/base_builder"
18
18
  require "asciibook/builders/html_builder"
19
19
  require "asciibook/builders/pdf_builder"
20
20
  require "asciibook/builders/epub_builder"
21
- require "asciibook/builders/mobi_builder"
22
21
 
23
22
  module Asciibook
24
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciibook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-18 00:00:00.000000000 Z
11
+ date: 2023-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.0'
89
+ version: '4.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.0'
96
+ version: '4.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: nokogiri
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -143,7 +143,6 @@ files:
143
143
  - lib/asciibook/builders/base_builder.rb
144
144
  - lib/asciibook/builders/epub_builder.rb
145
145
  - lib/asciibook/builders/html_builder.rb
146
- - lib/asciibook/builders/mobi_builder.rb
147
146
  - lib/asciibook/builders/pdf_builder.rb
148
147
  - lib/asciibook/command.rb
149
148
  - lib/asciibook/converter.rb
@@ -188,9 +187,6 @@ files:
188
187
  - theme/html/html.js
189
188
  - theme/html/icon.png
190
189
  - theme/html/layout.html
191
- - theme/mobi/fontawesome/solid.css
192
- - theme/mobi/layout.html
193
- - theme/mobi/mobi.css
194
190
  - theme/pdf/config.yml
195
191
  - theme/pdf/footer.html
196
192
  - theme/pdf/header.html
@@ -215,11 +211,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
215
211
  version: '0'
216
212
  required_rubygems_version: !ruby/object:Gem::Requirement
217
213
  requirements:
218
- - - ">="
214
+ - - ">"
219
215
  - !ruby/object:Gem::Version
220
- version: '0'
216
+ version: 1.3.1
221
217
  requirements: []
222
- rubygems_version: 3.1.6
218
+ rubygems_version: 3.4.1
223
219
  signing_key:
224
220
  specification_version: 4
225
221
  summary: ''
@@ -1,21 +0,0 @@
1
- module Asciibook
2
- module Builders
3
- class MobiBuilder < EpubBuilder
4
- def initialize(book)
5
- super
6
-
7
- @dest_dir = File.join(@book.dest_dir, 'mobi')
8
- @theme_dir = File.join(@book.theme_dir, 'mobi')
9
- end
10
-
11
- def build
12
- super
13
-
14
- epub_file = File.join(@dest_dir, "#{@book.basename}.epub")
15
- system 'kindlegen', epub_file
16
-
17
- FileUtils.rm epub_file
18
- end
19
- end
20
- end
21
- end
@@ -1,13 +0,0 @@
1
- /* overwrite src value that mobi not support */
2
-
3
- @font-face {
4
- font-family: 'Font Awesome 5 Free';
5
- font-style: normal;
6
- font-weight: 900;
7
- font-display: auto;
8
- src: url("fa-solid-900.ttf") format("truetype"); }
9
-
10
- .fa,
11
- .fas {
12
- font-family: 'Font Awesome 5 Free';
13
- font-weight: 900; }
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
3
- <head>
4
- <meta http-equiv="Content-Type" content="application/xml+xhtml; charset=UTF-8"/>
5
- <title>{{ page.title }} - {{ book.title }}</title>
6
- <link rel="stylesheet" type="text/css" href="default.css" />
7
- <link rel="stylesheet" type="text/css" href="highlight.css" />
8
- <link rel="stylesheet" type="text/css" href="mobi.css" />
9
- </head>
10
- <body>
11
- {{ page.content }}
12
- </body>
13
- </html>
data/theme/mobi/mobi.css DELETED
@@ -1,2 +0,0 @@
1
- body {
2
- }