MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Calibre (https://www.mobileread.com/forums/forumdisplay.php?f=166)
-   -   Txt files - Convert to Epub - Multiple files into one book - noob help (https://www.mobileread.com/forums/showthread.php?t=83845)

Cernan 05-17-2010 05:13 PM

Txt files - Convert to Epub - Multiple files into one book - noob help
 
Greetings,

I'm a noob with all the ebook stuff. I'm looking at the latest readers, but I haven't decided on one at this time. The Alex and Skiff both look really great. In the meantime currently using Aldiko on my HTC Hero. I find it perfect for most of my needs.

Now to the part where I need some guidance. Aldiko only reads the epub format. A friend sent me a book in txt format. The files came in one folder. There is an xml file along with 12 txt files, one for each chapter. I found Calibre when searching online, and I didn't see anything in FAQ to help with this particular question.

I know where to move the files on my SD card for Aldiko, but I'm a little lost with the rest.

I tried importing all the text files into calibre, but it treated them as 12 individual books instead of one. I'm assuming the xml file probably has some chapter/formating options in it. Any help or guidance would be much appreciated.

Thank you

AnemicOak 05-17-2010 05:15 PM

Try opening it with Sigil and then saving as an ePub. Without seeing the file it's hard to say, but that might get you the results you want.

Cernan 05-17-2010 05:41 PM

Thanks for the quick reply. Sigil looks like it should work. I may have to play around with it some. There doesn't seem to be any documentation, and I didn't see any option to import multiple txt files at once.

I found a round about way to do it for now. I have the full version of Adobe on my work computer. It has an option to combine text files. I used that and it imported all the files. I then saved it as html and used Calibre to convert to epub for Aldiko. It mostly works. There is no title page and the table of contents looks like html script or something form adobe. However, all the chapters are readable. Perhaps there is an easier or better way to do it. I just didn't know how to manually take 12 chapter files setup as text and combine them for a single book. Nothing seems to read that xml file for table of contents. I'll continue to play around. Thanks again.

Cernan 05-17-2010 05:51 PM

This is what is in the xml file. Didn't realize I could just do an edit and read it. Looks simple. Just pointing to the 12 different txt files. Now to figure out the rest.


"<?xml version="1.0" encoding="utf-8"?>
<chapter>CHAPTER 1</chapter>
<chapterfile>chap001.txt</chapterfile>
<chapter>CHAPTER 2</chapter>
<chapterfile>chap002.txt</chapterfile>
<chapter>CHAPTER 3</chapter>
<chapterfile>chap003.txt</chapterfile>
<chapter>CHAPTER 4</chapter>
<chapterfile>chap004.txt</chapterfile>
<chapter>CHAPTER 5</chapter>
<chapterfile>chap005.txt</chapterfile>
<chapter>CHAPTER 6</chapter>
<chapterfile>chap006.txt</chapterfile>
<chapter>CHAPTER 7</chapter>
<chapterfile>chap007.txt</chapterfile>
<chapter>CHAPTER 8</chapter>
<chapterfile>chap008.txt</chapterfile>
<chapter>CHAPTER 9</chapter>
<chapterfile>chap009.txt</chapterfile>
<chapter>CHAPTER 10</chapter>
<chapterfile>chap010.txt</chapterfile>
<chapter>CHAPTER 11</chapter>
<chapterfile>chap011.txt</chapterfile>
<chapter>CHAPTER 12</chapter>
<chapterfile>chap012.txt</chapterfile>
"

DoctorOhh 05-17-2010 11:28 PM

Quote:

Originally Posted by Cernan (Post 915006)
The files came in one folder. There is an xml file along with 12 txt files, one for each chapter. I found Calibre when searching online, and I didn't see anything in FAQ to help with this particular question.

Did you try dragging the xml file to Calibre? With html files Cailbre would look at the html and gather all files zip them and create a book entry. It may be the same for xml files. give it a try.

Once in Calibre you should be able to convert it to ePub.

kovidgoyal 05-18-2010 10:41 AM

combining txt files is trivial. Just open the first file in any txt editor /notepad/wordpad/what have you.. Then open all the thers one by one and copy paste them into the first. calibre wont combine txt files for you automatically.

Starson17 05-18-2010 11:12 AM

If your files are in the correct order, in Windows you can combine all the txt files with a simple "copy *.txt All_files.txt" If they aren't in the correct order, you could use a for "FOR /L" loop.

FOR /L %%parameter IN (start,step,end) DO command

or a simpler:
copy file1+file2+file3 All_files.txt

and keep appending the files to the end.


All times are GMT -4. The time now is 08:06 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.