Sha256: 4e1effe029f458a81a6b31b99d6a17f09abca023bc34ceb0637a66fa37352c33

Contents?: true

Size: 1.63 KB

Versions: 6

Compression:

Stored size: 1.63 KB

Contents

## Exporting Files

You can generate files as you go. Just execute `kitabu export` from your book's root directory.

```
$ kitabu export
** e-book has been exported
```

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.

```
$ tree output
output
├── images
│   ├── kitabu.png
│   └── kitabu.svg
├── kitabu.epub
├── kitabu.html
├── kitabu.mobi
├── kitabu.pdf
├── kitabu.print.pdf
├── kitabu.txt
└── styles
    ├── epub.css
    ├── html.css
    ├── pdf.css
    └── print.css
```

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.

```
$ kitabu export --only pdf
```

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`.

```
$ bundle exec guard
20:38:10 - INFO - Guard is now watching at '/Users/fnando/Projects/kitabu/examples/kitabu'
** e-book has been exported
```

### Exporting PDF with DocRaptor

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>.

[^1]: Depend on Prince, html2text and KindleGen being available on your `$PATH`.

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kitabu-2.1.0 templates/text/05_Exporting_Files.md
kitabu-2.0.4 templates/text/05_Exporting_Files.md
kitabu-2.0.3 templates/text/05_Exporting_Files.md
kitabu-2.0.2 templates/text/05_Exporting_Files.md
kitabu-2.0.1 templates/text/05_Exporting_Files.md
kitabu-2.0.0 templates/text/05_Exporting_Files.md