09-18-2008, 03:20 AM | #1 |
creator of calibre
Posts: 44,557
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
EPUB output
The long awaited support for epub as an output format is finally here; as of calibre version 0.4.86. In the GUI just select EPUB as your output format in the config dialog. Then all conversion/news fetching operations will result in EPUB files. The command line interface is in the commands: any2epub, comic2epub and feeds2epub.
To see usage information, run the commands without any arguments. I've tested them on a number of ebooks and feeds in avarious different input formats, and they should be ready for more general testing now. So throw your ebooks at them and report any bugs here. For e.g. Code:
any2epub file.lit Technical note: For those of you that run epubcheck on the output files, you may get warnings/errors for files in the content/ subdirectory. This is because html2epub doesn't fully convert input files into valid XHTML 1.1 (doing so would likely lead to information loss and is uneccessary because any epub reading software that insists on valid XHTML 1.1 is going to be a miserable failure). However, if you feed html2epub valid XHTML 1.1, then it should output valid XHTML as well. Last edited by kovidgoyal; 09-23-2008 at 11:58 PM. |
09-18-2008, 12:26 PM | #2 |
Guru
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
|
Congratulations on this milestone!
Code:
html2epub dead_until_dark.html Building file list... Parsing jeff/southern_vampire/dead_until_dark.html Traceback (most recent call last): File "/usr/bin/html2epub", line 8, in <module> load_entry_point('calibre==0.4.84b3', 'console_scripts', 'html2epub')() File "/home/jeff/calibre/src/calibre/ebooks/epub/from_html.py", line 96, in main convert(args[1], opts) File "/home/jeff/calibre/src/calibre/ebooks/epub/from_html.py", line 78, in convert resource_map = parse_content(filelist, opts) File "/home/jeff/calibre/src/calibre/ebooks/epub/from_html.py", line 66, in parse_content resource_map, filelist) File "/home/jeff/calibre/src/calibre/ebooks/epub/from_html.py", line 21, in __init__ self.extract_css() File "/home/jeff/calibre/src/calibre/ebooks/html.py", line 447, in extract_css css.append('#%s {%s}'%(id, 'page-break-before:always')) UnboundLocalError: local variable 'id' referenced before assignment |
Advert | |
|
09-18-2008, 01:21 PM | #3 | |
creator of calibre
Posts: 44,557
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
09-19-2008, 02:20 AM | #4 |
creator of calibre
Posts: 44,557
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
version 0.4.84 (to be released in a few hours) has a working any2epub. Enjoy.
|
09-19-2008, 06:19 AM | #5 |
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
So now to add support for other formats such as RB or IMP, one would just need to implement epub2rb and epub2imp, right?
|
Advert | |
|
09-19-2008, 11:10 AM | #6 | |
Guru
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
|
Quote:
These epubs can be read with FBReader. Last edited by JeffElkins; 09-19-2008 at 11:28 AM. |
|
09-19-2008, 11:31 AM | #7 |
Addict
Posts: 384
Karma: 1567
Join Date: Jul 2008
Location: UK
Device: Sony:505, 600, 350, 650, Kindle 3 & PW, Kobo Mini & Aura HD
|
Okay, I've probably done something really silly, any ideas what's happening?
Have been using Calibre for a few months now, with no issues. I have updated to the new version. It asked me where my books were stored so I gave it the path, it loaded them in great....now my usual way of doing things, is to add the book to Calibre and convert (or add a lrf and not convert), then save to my HD using Calibre as this gives me all my books sorted by author in one place on my HD. The I import into the Sony eLibrary and then to my reader. All has been great, until the update today..... When I went to import a new book from Calibre I noticed there were now 2 files for each book. I had the author/title folders but now had another titled the same but with numbers in brackets next to it (database number?). This has happened on all my existing books too, effectively doubling my entire library.........I really don't want 2 copies of all my books (obviously) so how to resolve? What am I doing wrong for Calibre to make 2 copies of all books? I noticed that if I delete books from Calibre then the numbered folder goes leaving the usual title folder, it's only when I store them in Calibre that I see the 2 folders for each title......any way to stop this as it doubles my library when I use Calibre to list my books as well. Short of entering all books, saving, then removing them from Calibre, is there a way round it? I hope someone can help |
09-19-2008, 11:39 AM | #8 |
Guru
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
|
|
09-19-2008, 11:41 AM | #9 |
Addict
Posts: 384
Karma: 1567
Join Date: Jul 2008
Location: UK
Device: Sony:505, 600, 350, 650, Kindle 3 & PW, Kobo Mini & Aura HD
|
terribly sorry, wasn't my intention. I thought it was valid as it was relevant only to this updated version...........
Im just gonna uninstall it anyway and go back to the older one, so no worries. once again, my apologies Last edited by babyd; 09-19-2008 at 11:44 AM. |
09-19-2008, 11:44 AM | #10 |
creator of calibre
Posts: 44,557
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
09-19-2008, 11:46 AM | #11 |
creator of calibre
Posts: 44,557
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's probably because you've hit the 300K file size limit for constituent parts of an epub. At the moment, the code to automatically split large files into smaller parts is not implemented. As for the metadata, not sure why that's not being read, I'll look into it.
|
09-19-2008, 11:47 AM | #12 | |
creator of calibre
Posts: 44,557
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
09-19-2008, 12:00 PM | #13 | |
Guru
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
|
Quote:
|
|
09-19-2008, 12:14 PM | #14 |
Resident Curmudgeon
Posts: 76,458
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But would it not be possible to have any2epub split at the chapter marks and/or manual page breaks?
|
09-19-2008, 12:24 PM | #15 |
Feedbooks.com Co-Founder
Posts: 2,263
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Epub Output: Line Height | greenapple | Conversion | 20 | 01-27-2013 10:27 AM |
EPUB output justification | toki08 | Calibre | 10 | 01-08-2011 05:14 PM |
Calibre epub output details and Nook | squidward | Calibre | 6 | 11-24-2010 04:21 PM |
epub output metadata | troymc | Calibre | 5 | 05-22-2010 01:23 AM |
Problem with epub output in Cybook Gen3 | fjf | Calibre | 3 | 02-03-2010 03:23 AM |