1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-09-30 04:51:21 +02:00
Commit Graph

316 Commits

Author SHA1 Message Date
Elisabeth Henry
aa16e1f623 Update ChangeLog 2016-03-09 01:54:23 +01:00
Elisabeth Henry
7c6b36fe4d Add support for local images inclusion in standalone HTML
Using base64.
2016-03-09 01:52:23 +01:00
Elisabeth Henry
330398b2b2 Fix ResourceHandler mapping image path for files w/o extensions 2016-03-09 01:02:30 +01:00
Elisabeth Henry
682d93d1e4 Use Base64 library to include menu.svg in standalone HTML
(Instead of hardcoding it in the template.)
2016-03-09 00:57:17 +01:00
Elisabeth Henry
120dfbeed2 Fix CSS: set max-width of li, not ul/ol 2016-03-07 23:28:34 +01:00
Elisabeth Henry
eed7530f04 Add support for embedding files in html_dir output 2016-03-07 23:26:57 +01:00
Elisabeth Henry
56f397372e Make multiple files HTML use menu.svg as a file instead of base64 2016-03-07 19:40:22 +01:00
Elisabeth Henry
fd2f6c7382 Work on HTML/CSS alignment 2016-03-07 19:33:49 +01:00
Élisabeth Henry
5d18cdf376 Merge pull request #9 from taophp/master
Improving readability for the HTML output format
2016-03-07 18:08:52 +01:00
Stéphane Mourey
8491a42ad9 Improving readability for the HTML output 2016-03-07 15:19:09 +01:00
Stéphane Mourey
f302daaa41 Merge pull request #1 from lise-henry/master
Update book_example/config.md
2016-03-07 14:49:54 +01:00
Elisabeth Henry
42ef79876a Update book_example/config.md 2016-03-07 01:56:38 +01:00
Elisabeth Henry
c5ed1ab8d7 Add output.html_dir in config.book 2016-03-06 02:50:04 +01:00
Elisabeth Henry
6def2e40f4 Update ChangeLog 2016-03-06 02:48:53 +01:00
Elisabeth Henry
f42ace238c Add html.script option to specify javascript file to use
Also, various templates use this value instead of hard-coding the
javascript code (and duplicating it three times).
2016-03-06 02:35:11 +01:00
Elisabeth Henry
ee44d57de1 Update Changelog 2016-03-05 23:15:59 +01:00
Elisabeth Henry
40c35b39c7 Add links to previous and next chapter in HtmlDirRenderer 2016-03-05 23:10:06 +01:00
Elisabeth Henry
f381f7159e Update .gitignore 2016-03-05 22:34:41 +01:00
Elisabeth Henry
a145d78cf5 Add image support for HtmlDirRenderer 2016-03-05 22:33:30 +01:00
Elisabeth Henry
21ec13a79a Add (not yet complete) HtmlDirRenderer
For rendering a multiple-files HTML in a directory, in `output.html_dir`.
2016-03-05 22:02:27 +01:00
Elisabeth Henry
fd31be67d7 Add templates for html_dir output 2016-03-05 20:35:11 +01:00
Elisabeth Henry
4f33cbf381 Update ChangeLog 2016-03-05 18:36:08 +01:00
Elisabeth Henry
11919333ae Make EPUB renderer read resources.base_path.files when writing embedded files 2016-03-05 18:34:53 +01:00
Elisabeth Henry
af734beb1a Fix displaying of book options to not crash anymore
Displaying should be worked on, though.
2016-03-05 18:14:05 +01:00
Elisabeth Henry
fae0aef7d4 Fix Epub renderer which still used resources.path 2016-03-05 18:09:25 +01:00
Elisabeth Henry
5676b5ad43 Update ChangeLog 2016-03-05 18:05:33 +01:00
Elisabeth Henry
2aa1139baf Rename book options base_path* to resources.base_path*
This is to ensure a bit more consistency in the ways options are named
and grouped.

Also added a (not very satisfying) way to warn that an option that is
being used is deprecated and should be replaced with the new one.
2016-03-05 18:02:45 +01:00
Elisabeth Henry
3e818d1a2e Make Zipper check that a path is in temporary dir before writing the file 2016-03-05 15:35:41 +01:00
Elisabeth Henry
f382c92ed9 Make code a bit more rustic applying clippy's advices 2016-03-05 14:53:41 +01:00
Elisabeth Henry
e28dc05087 Update program documentation 2016-03-05 03:15:42 +01:00
Elisabeth Henry
e14dccd04d Update dependencies versions 2016-03-05 00:36:48 +01:00
Elisabeth Henry
8ec49959b1 State in Changelog.md that it depends on rustc>=1.7.0 2016-03-05 00:36:37 +01:00
Elisabeth Henry
1b3c398267 Require Rust 1.7.0 in appveyor.yml 2016-03-05 00:26:27 +01:00
Elisabeth Henry
1e7557398b Allow resources.files to specify directories
Use walkdir crate to walk in all files.
2016-03-04 22:22:01 +01:00
Elisabeth Henry
9980739ed4 Make Error::Render contain a String instead of a &'static str
Also, more errors that should theoretically not happened have been
turned to panic!s
2016-03-04 19:26:23 +01:00
Elisabeth Henry
14f659e4bb Add support for embedding additional files in EPUB document
This is done with the `resources.files` options. These files will be
placed in the `resources.path` directory in the EPUB.

Solves #6
2016-03-04 18:30:34 +01:00
Elisabeth Henry
7c2bb73bb1 Add resources.path and resources.files options 2016-03-04 18:04:52 +01:00
Elisabeth Henry
3229af9a8f Remove unused import in epub.rs 2016-03-04 18:03:09 +01:00
Elisabeth Henry
39cebebd5c Use mime_guess library to guess mime types from extension
EPUB renderer needs to specify a mime type for each file in the
manifest. For images, it previously used a simple function which only
worked currently on png, jpg and gif extensions. Using this library
should be more reliable.

It is also a first step in adressing #6.
2016-03-04 17:41:24 +01:00
Elisabeth Henry
568fe89511 Fix a typo in lib.rs documentation 2016-03-03 21:19:02 +01:00
Elisabeth Henry
6109570ccf Deny missing docs 2016-03-03 21:14:32 +01:00
Elisabeth Henry
54ca041d5a Clean Book constructors API
- Book::new takes an additional `options` parameter.
- Book::new_from_file_with_options becomes `new_from_file`, which got
  deleted.

This way, each constructor takes an `options` parameter (which can
be set to `&[]` for default options), allowing derived constructors to
not replicate the setting options code.
2016-03-03 20:56:28 +01:00
Elisabeth Henry
e197b82add Remove Bugs.md file 2016-03-03 18:26:07 +01:00
Elisabeth Henry
cc7747f20f Fix typos in ChangeLog.md 2016-03-03 18:23:28 +01:00
Elisabeth Henry
d0a491c332 Use github's issue tracker instead of maintaining a Bugs.md file 2016-03-03 18:13:23 +01:00
Elisabeth Henry
b58b73eb02 Render CSS differently according to lang
This is currently only used to display "–" for list items if lang is
set to "fr", and to default bullets otherwise, but it is now possible
to add more variations.
2016-03-03 17:57:38 +01:00
Elisabeth Henry
7b93cb4479 Bump preventively version to 0.5.0-unreleased for semantic versioning 2016-03-03 17:40:38 +01:00
Elisabeth Henry
4b22f9a339 Add enable_yaml_mode option
This option activates or disables the parsing of YAML block. If
disabled, YAML blocks will be ignored and won't be used to try to set
Crowbook's options.

enable_yaml_mode is false by defaut, but set to true when crowbook is
called with `--single`.
2016-03-02 20:38:35 +01:00
Elisabeth Henry
f561cf855d Add babel correspondences to more languages codes 2016-03-02 18:37:45 +01:00
Elisabeth Henry
981a8fab07 Fix typo in helpers.rs 2016-03-02 16:54:10 +01:00