Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate
AsciiDoc eBook Boilerplate for CJK
https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate
asciidoc ebook-generation epub-generation mobi-generation pdf-generation
Last synced: about 1 month ago
JSON representation
AsciiDoc eBook Boilerplate for CJK
- Host: GitHub
- URL: https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate
- Owner: opensourcedoc
- License: mit
- Created: 2023-07-16T11:22:32.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-11T02:26:54.000Z (9 months ago)
- Last Synced: 2024-04-11T04:12:30.490Z (9 months ago)
- Topics: asciidoc, ebook-generation, epub-generation, mobi-generation, pdf-generation
- Language: Shell
- Homepage:
- Size: 19 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= AsciiDoc eBook Boilerplate for CJK
== Synopsis
Boilerplate project to generate eBook with AsciiDoctor toolchain.
== System Requirements
* A recent link:https://www.ruby-lang.org/[Ruby]
* link:https://asciidoctor.org/[AsciiDoctor]
* link:https://github.com/asciidoctor/asciidoctor-pdf[AsciiDoctor PDF]
* link:https://github.com/asciidoctor/asciidoctor-epub3[AsciiDoctor EPUB3]
* link:https://github.com/tdtds/kindlegen[kindlegen] gem== Usage
=== Windows
Clone the project locally and change your working directory accordingly:
[,shell]
----
> git clone https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate.git my-ebook
> cd my-ebook
----Migrate the project:
[,shell]
----
> migrate.bat
----Several files are generated. Keep the template files _as is_.
Modify _parameters.yml_ as needed. Migrate the parameters of the ebook in the project:
[,shell]
----
> ruby migrate.rb
----To compile an EPUB ebook:
[,shell]
----
> epub.bat
----To compile a MOBI ebook:
[,shell]
----
> mobi.bat
----An intermediate EPUB ebook is compiled as well.
To compile a PDF ebook:
[,shell]
----
> pdf.bat
----To compile a PDF ebook for print:
[,shell]
----
> print.bat
----Clean all ebooks:
[,shell]
----
> clean.bat
----=== Unix
Clone the project locally and change your working directory accordingly:
[,shell]
----
$ git clone https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate.git my-ebook
$ cd my-ebook
----Migrate the project:
[,shell]
----
$ ./migrate
----Several files are generated. Keep the template files _as is_.
Modify _parameters.yml_ as needed. Migrate the parameters of the ebook in the project:
[,shell]
----
$ ruby migrate.rb
----To compile an EPUB ebook:
[,shell]
----
$ ./epub
----To compile a MOBI ebook:
[,shell]
----
$ ./mobi
----An intermediate EPUB ebook is compiled as well.
To compile a PDF ebook:
[,shell]
----
----To compile a PDF ebook for print:
[,shell]
----
----Clean all ebooks:
[,shell]
----
$ ./clean
----== eBooks with Mixed Chinese and English Text
Sarasa gothic TC font doesn't support ebooks with mixed Chinese and English text well. Ebooks with sarasa font will be rendered with incorrect line wrapping sometimes.
If you are writing an ebook with mixed Chinese and English, use WenQuanYi Zen Hei instead.
Migrate the CJK theme:
```shell
$ cp cjk-wqy-theme.yml cjk-theme.yml
```Ebooks with sarasa font look better. Hence, we keep both. It is up to you to choose a font that suits your ebook.
== Note
You have to edit _epub.adoc_, _pdf.adoc_ and _print.adoc_ separately to generate ebooks of different file formats, which is the limitation imposed by AsciiDoctor toolchain currently.
== Copyright
The boilerplate project itself is licensed under MIT.
You keep your own ebooks compiled with the boilerplate in any license you prefer.