Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-10-2014, 11:33 PM   #1
Ecaz
Member
Ecaz began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2012
Device: Kindle Paperwhite
Convert .XML to .ePub (Or: What am I doing wrong? A little boys primer on conversion)

Hello and thank you in any case!

http://www.folgerdigitaltexts.org/download.html

First, the PDF from Folgers website looks like crap on the Kindle Paperwhite, and converts even worse, so that's not a viable option for me.

The entire library is available via XML.

The xml files render fine in Firefox, but I can't get Calibre to open the xml or to convert them to epub.

I imagine I am simply doing something wrong.

I would like to import or simply convert the .xml files into epub. I don't know if Calibre will generate the TOC or will respect the formatting of the .xml files that Folgers provides.

Running linux, so happy to run any tools from the command line to create what needs to be done.

Thanks!

Note:

When I add the .xml file (which isn't a default file type in Calibre) It gets the title right, but then fails to convert:

calibre, version 2.6.0
WARNING: Could not convert some books: Could not convert 1 of 1 books, because no supported source formats were found.

Henry IV, Part I - No supported formats (Available formats: xml)

Last edited by Ecaz; 11-10-2014 at 11:55 PM. Reason: Tried to change to the Conversion subforum
Ecaz is offline   Reply With Quote
Old 11-10-2014, 11:54 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
calibre does not support XML as source input. You may be able to find something useful with the tools here: https://www.mobileread.com/forums/sho...d.php?t=232413

I just know you will need to find some way of getting it into a more presentable (X)HTML format. For that, some sort of XSLT processor will be needed, unfortunately I know very little about the matter.
eschwartz is offline   Reply With Quote
Advert
Old 11-10-2014, 11:56 PM   #3
Ecaz
Member
Ecaz began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2012
Device: Kindle Paperwhite
Thank you so much!

I have xsltproc on my linux box, but I don't know how to use it correctly.

I find it odd that Firefox will render the xml file, so this must be possible, just need to find the right order of things.

Thanks again!
Ecaz is offline   Reply With Quote
Old 11-11-2014, 12:22 AM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Firefox probably has builtin code to display XSLT.

You still need something to convert it to XHTML. Perhaps you can do that from Firefox, using the processed html (using the inspector, right-click and select "Edit as HTML").
eschwartz is offline   Reply With Quote
Old 11-11-2014, 09:05 AM   #5
Ecaz
Member
Ecaz began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2012
Device: Kindle Paperwhite
Well that puts me a lot closer.

When I export the HTML to .xhtml Calibre and Ebook Reader are unable to process the file.

When I open the exported file in Firefox, I get the following:

XML Parsing Error: not well-formed Location: file:///home/icecream/Downloads/Shakespeare1/1mac.xhtml Line Number 17, Column 52: for (var i = 0, len = sel.rangeCount; i < len; ++i) { ---------------------------------------------------^

In any case, it doesn't seem to export in the correct way :-(
Ecaz is offline   Reply With Quote
Advert
Old 11-11-2014, 09:58 AM   #6
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,185
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by Ecaz View Post
Hello and thank you in any case!

http://www.folgerdigitaltexts.org/download.html

First, the PDF from Folgers website looks like crap on the Kindle Paperwhite, and converts even worse, so that's not a viable option for me.

The entire library is available via XML.

The xml files render fine in Firefox, but I can't get Calibre to open the xml or to convert them to epub.

I imagine I am simply doing something wrong.

I would like to import or simply convert the .xml files into epub. I don't know if Calibre will generate the TOC or will respect the formatting of the .xml files that Folgers provides.

Running linux, so happy to run any tools from the command line to create what needs to be done.

Thanks!

Note:

When I add the .xml file (which isn't a default file type in Calibre) It gets the title right, but then fails to convert:

calibre, version 2.6.0
WARNING: Could not convert some books: Could not convert 1 of 1 books, because no supported source formats were found.

Henry IV, Part I - No supported formats (Available formats: xml)
Might I suggest that you look here Mobileread and Goodreads for William Shakespeare, already in ebook formats.

Link for Henry V. in epub.

bernie
gbm is offline   Reply With Quote
Old 11-11-2014, 02:49 PM   #7
Ecaz
Member
Ecaz began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2012
Device: Kindle Paperwhite
Quote:
Originally Posted by gbm View Post
Might I suggest that you look here Mobileread and Goodreads for William Shakespeare, already in ebook formats.

Link for Henry V. in epub.

bernie
Thank you for the suggestion!

My challenge is that most online documents lack annotations for Shakespeare, so I was specifically targeting the Folger because they are available online (XML) and because they contain annotations. Arden epubs will be released in early 2015, though not free.

The copies from Mobiread and GoodReads lack annotations, so while the do contain the complete texts, it's more the annotations that I'm interested in.
Ecaz is offline   Reply With Quote
Old 11-11-2014, 02:55 PM   #8
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,510
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I believe that Folgers uses TEI for their XML. Take a look at http://tei.oucs.ox.ac.uk/Projects/TEItoePub/

Also see https://code.google.com/p/epub-tools/

Last edited by PeterT; 11-11-2014 at 03:00 PM.
PeterT is offline   Reply With Quote
Old 11-11-2014, 03:30 PM   #9
Ecaz
Member
Ecaz began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2012
Device: Kindle Paperwhite
Quote:
Originally Posted by PeterT View Post
I believe that Folgers uses TEI for their XML. Take a look at http://tei.oucs.ox.ac.uk/Projects/TEItoePub/

Also see https://code.google.com/p/epub-tools/
This feels like traction... thank you!
Ecaz is offline   Reply With Quote
Old 11-11-2014, 03:54 PM   #10
Ecaz
Member
Ecaz began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2012
Device: Kindle Paperwhite
The following works well when selecting TIE P4/P5 option:

http://oxgarage.oucs.ox.ac.uk:8080/ege-webclient/#

I'm also going to try the tie2epub BSD tool when I get home tonight, but ultimately I have my answer, and I have gained a tremendous amount of information about TIE, ePub, and XML in general.

Thank you to everyone that contributed/replied.
Ecaz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre won't recognize an xml file for conversion to EPUB ittiandro Conversion 0 08-19-2014 03:23 PM
PDF Conversion to XML citizen994 Other formats 1 02-03-2012 12:46 AM
How to convert PDF to XML? Ambar Other formats 3 01-12-2012 12:48 PM
Calibre getting page numbers wrong in conversion to epub. WendyH Conversion 9 09-04-2011 05:29 AM
Can't convert MOBI to EPUB.. conversion FAILS wallace.webmail Calibre 5 07-16-2010 12:45 AM


All times are GMT -4. The time now is 09:26 PM.


MobileRead.com is a privately owned, operated and funded community.