Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-20-2010, 03:18 AM   #1
guguqiaqia
Junior Member
guguqiaqia began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2010
Device: alex
How can i convert HTML or txt file to EPUB file ?

hi,

I worked in vs2005 c++ (MFC,win32).

I need to work on my project to add html or txt file converted to epub formats.

I used Calibre2,but it is too large and can not support c++,so i can not modify that source code .

I do that is difficult...

How can i get some free(or not free) source code for convert html or txt file to EPUB in VS2005 (MFC ,win32) ?

thanks.
guguqiaqia is offline   Reply With Quote
Old 05-20-2010, 07:26 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Write it yourself? Transforming of basic html to a basic epub is not that hard. What is it you want to do with your project that isn't covered with Calibre or Sigil.
Toxaris is offline   Reply With Quote
Advert
Old 05-20-2010, 10:13 PM   #3
guguqiaqia
Junior Member
guguqiaqia began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2010
Device: alex
thanks your reply.

write it myself.

I just started learning EPUB.so ,I do not know what the reference data for convert html or txt file to EPUB.
In html file include:text,picture,video,audio....

You said that is not hard. How can i start this project?

thanks.
guguqiaqia is offline   Reply With Quote
Old 05-21-2010, 04:17 AM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Read a lot about the epub format and create some epub's yourself by hand (I find the jedisaber site to be of great help there). Look at some epub's.

If the html includes video and/or audio, than epub is not the format for you. That is not covered. You can use font's and pictures though.

By the way, you can call parts of Calibre from you project to convert to epub. So, you write some part and call a program of Calibre with your input. That should ease your project.
Toxaris is offline   Reply With Quote
Old 05-21-2010, 10:42 PM   #5
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
An ePub file is just a .zip file containing (x)html along with associated images, fonts, and xml files containing metadata and a table of contents. See the Step by Step guide to ePub creation for links to learning more about the spec.

I don't know much about C, but I'm sure there are ways to use it to create xml and zip files, and if it can do that, it can create epubs.
frabjous is offline   Reply With Quote
Advert
Old 05-24-2010, 04:52 PM   #6
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
If you want to see some epub code in C++, then you should take a look at Sigil, which is GPL'd and should be fine for your use.

Sigil, of course, is a large editing project. The bits you'll want to examine are in the Exporters directory, which has code showing how to construct the NCX and OPF files you need. As frabjous said, the rest is just zipping up the component files and setting the mimetype (which must not be compresssed).
charleski is offline   Reply With Quote
Old 05-27-2010, 08:49 PM   #7
Pranananda
Connoisseur
Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.
 
Pranananda's Avatar
 
Posts: 98
Karma: 122982
Join Date: Apr 2010
Location: Humboldt County, California
Device: ipad, iPod touch, JetBook Lite
Read about EPUB at wikipedia, which has links to the formal specification. You can find open source XML parsers in C++, as well as zip libraries.
Pranananda is offline   Reply With Quote
Old 05-28-2010, 09:15 PM   #8
JimMcLaren
Addict
JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.JimMcLaren ought to be getting tired of karma fortunes by now.
 
JimMcLaren's Avatar
 
Posts: 260
Karma: 1014230
Join Date: Jan 2010
Device: Onyx Boox T68, Kobo Aura HD, Pocketbook 302, Pocketbook 912, Nook HD+
You might try the Inside epub blog. It's a series of articles about various components of an epub. It helped me quite a bit.
JimMcLaren is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre convert Chinese PDF to EPUB well, but not TXT and HTML jimmyzou ePub 15 12-27-2013 04:02 PM
Convert HTML file to MOBI for Kindle IMFletch Calibre 5 04-16-2010 01:06 PM
Plucker: can't right-click on html file to convert... jplowman Reading and Management 1 08-08-2009 11:21 PM
Adding pictures to epub from a txt file p3aul Calibre 3 04-16-2009 06:05 PM


All times are GMT -4. The time now is 05:56 PM.


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