Idan Dor
d3e603a028
Added image embedding support for epub
...
Specifically, added image_selector for arbitrary sites that allows
selecting img tags from chapters, downloading them
and embedding them within the resulting epub.
In the case of Pale, this means that the character banners and
extra materials do not require an internet connection to view.
Also made the two pale.json's more consistent (pale.json now correctly
includes the title of the chapters).
2022-11-04 16:04:18 +02:00
David Lynch
7eae5dee07
When downloading covers errors don't incorrectly concat a string
...
Refs #77
2022-02-22 12:24:50 -06:00
David Lynch
7eb48c872d
Clean up epub file list generation
2022-02-13 12:25:01 -06:00
David Lynch
bb9491cb96
Config option: output_dir
...
Can be provided on the command line as `--output-dir`, or in leech.json
as `output_dir` (also in the `site_options` in leech.json).
Refs #67
2021-09-04 15:46:16 -05:00
David Lynch
25312736d4
Use namedtuple in the epub generator so it's easier to understand
2021-07-21 10:32:55 -05:00
David Lynch
9b80a112d0
Output summary and tags in the Front Matter
2021-05-01 16:36:08 -05:00
David Lynch
0d0bdf470e
Escape chapter titles when building templates
...
Unescaped ampersands cause validation errors...
TODO: should move away from string substitution to build XHTML
Refs #56
2021-03-02 02:30:05 -06:00
David Lynch
533c14f0d7
Normalize fancy unicode characters by default
...
Kindle can't display the "𝖙𝖍𝖚𝖌 𝖑𝖎𝖋𝖊" mathematical bold fraktur codepoints
so NFKC normalize them (and anything else) into its plain equivalent.
Can be disabled by running with `--no-normalize` if needed.
2021-02-05 01:59:20 -06:00
David Lynch
6cc1620fb3
Spec-compliance: metadata shouldn't be compressed
2019-10-17 22:28:46 -05:00
David Lynch
7208cfdaaf
Minor readability improvement: use f-strings
2019-10-15 11:14:27 -05:00
David Lynch
c584988994
Update dependencies
2019-10-14 00:40:34 -05:00
David Lynch
ac3ba8db77
Fix sparse object passed for cover options
2019-10-14 00:29:40 -05:00
David Lynch
d3d2e23335
Stick a generator metadata into epubs
2019-01-16 22:57:08 -06:00
David Lynch
482c1ab26e
Reset cover bytesteam after checking its format
...
Caused issues writing the file later, as the internal pointer moved past the
first few bytes when checking whether it was a PNG.
Fixes #19
2018-10-08 09:02:15 -05:00
David Lynch
61f3bb1a6e
Filter down the cover options to valid ones
2018-10-01 15:00:53 -05:00
David Lynch
02bd6ae0c6
Merge pull request #16 from AlexRaubach/covers
...
Download cover art from RR and arbitrary sites
2018-10-01 12:18:39 -05:00
David Lynch
8f8d7b1edd
Better fallback for no-title case on chapters
2018-10-01 11:12:52 -05:00
Alex Raubach
60084534a8
Create empty dict when leech.json not present
2018-09-15 11:03:52 -04:00
Alex Raubach
1f57305e11
Download cover image if cover_url is in json
2018-09-10 23:13:26 -04:00
Alex Raubach
f2fc2c11db
Capture cover options from leech.json and pass them to generate_epub()
2018-09-10 23:03:08 -04:00
Alex Raubach
cc29936d92
Fix whitespace
2018-09-02 22:31:10 -04:00
Alex Raubach
d357bd17e2
Clean up cover downloading and add logging
2018-09-02 22:08:36 -04:00
Alex Raubach
53a3cde16d
Convert other cover image types to PNG
2018-09-02 22:08:36 -04:00
Alex Raubach
ea60ac5122
Download cover images for RoyalRoad Stories
2018-09-02 22:08:36 -04:00
David Lynch
8ac1aa8bb0
Add cover config to leech.json
2017-10-12 11:20:45 -05:00
David Lynch
619a013bcb
Cover font fallbacks
2017-10-12 10:39:13 -05:00
Will Oursler
1c577b6f67
Fix lint errors
2017-10-12 10:07:22 -04:00
Will Oursler
5bd07a5b90
Splits out ebook generation logic into a seperate module, in anticipation of maybe supporting multiple output formats.
2017-10-12 09:49:32 -04:00