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 02-01-2010, 09:30 PM   #31
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by awp View Post
Please reread this entire thread. I never suggested Atlantis Word Processor as a "free solution".

Posts #2, #3, and #5 of this thread all mention Atlantis Word Processor, and they are not mine. My first post to this thread is #10. When someone says that Atlantis Word Processor generates an invalid EPUB file, why I cannot ask for details? When Laura said that "Atlantis worked perfectly", and asked for batch conversion "in Atlantis", what's wrong with replying with MY solution?
Thank you for answering direct queries from users on this forum. It is nice to know someone from AWP is watching and ready to assist as needed.

It is also worthy of note that you stepped up to help even though you knew she was using the free version of your software.

Quote:
Originally Posted by frabjous View Post
As I noted, the batch file is two lines long:

Here's what you need to do:

1. Download and install AbiWord. It's completely free.
2. Download and install calibre. It's completely free.
3. Copy and paste the two lines above into Notepad, and save a file named "doc2epub.bat" or anything else whose name you'll remember ending in .bat. Save it in the same folder where your .doc files are.

The lines assume you're using a 64-bit operating system. If not, then use this instead:

Code:
for %%I in (*.doc) do "C:\Program Files\AbiWord\bin\AbiWord.exe" --to=html "%%I"
for %%I in (*.html) do "C:\Program Files\Calibre2\ebook-convert.exe" "%%I" "%%~nI.epub"
This is a very nice solution. I'm glad you stopped whining about another forum member answering questions and trying to help someone long enough to provide a working solution.

I'll have to save this post for future use.

Karma to both of you.
DoctorOhh is offline   Reply With Quote
Old 02-02-2010, 01:04 AM   #32
Laura81
Addict
Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.
 
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
Quote:
Originally Posted by frabjous View Post
Those .dll and .txt files aren't the result of the script, though they may be the result of installing either Abiword or calibre. I looked at my Windows partition and they were there too. If I had to guess, I'd say they're a byproduct from using the .msi installation routine, and/or using Internet Explorer to download the programs to install, since the EULA files are Microsoft-related. Typical microsoft messiness.

I went ahead and deleted them, and everything still worked just fine, including my conversion script.

Yeah, you can copy or move the .bat file from one folder to another, and run it whereever.
Thanks for your help in this too! I will just delete it all then. And now for some massive conversion time today!

Oh and I actually prefer using your bat command versus even Calibre because it annoys me that Calibre creates a new area to put my ebooks when I want them arranged a certain way and I can't do that with Calibre. Ever think about writing more command lines for converting other things? Like PDF and LIT files?
Laura81 is offline   Reply With Quote
Advert
Old 02-02-2010, 01:28 AM   #33
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
Thanks.

Yeah I pretty much do all my calibre conversions using scripts or the command line, partly to avoid Calibre's GUI messing with my file structure. Calibre is still doing the conversion, though, so let's give credit where it's due.

Actually, the modifications you'd need to do batch converting with .PDF or .LIT should be pretty straightforward. If you want, e.g., to convert all the .pdf's in a folder to *.epub, using calibre alone, just use my second line above, but change (*.html) to (*.pdf). Or change it to (*.lit) to convert .lit files to .epub. If you want .lit files as output, just change the "%%~nI.epub" at the end to "%%~nI.lit"

Similarly, if you want to use it for converting files that AbiWord handles but calibre doesn't (WordPerfect, or Works, or Word 2007), keep the first line, and change (*.doc) to (*.docx) or (*.wpd) or (*.wps), or whatever. Keep to=html at the end, and (*.html) in the second line.

If you want to get serious about this, though, you should read up on calibre's ebook-convert command line program and the many options it offers, as well as a batch guide for Windows such as this one, or if you use another OS, try a bash script.

Last edited by frabjous; 02-02-2010 at 01:32 AM.
frabjous is offline   Reply With Quote
Old 02-02-2010, 01:49 AM   #34
Laura81
Addict
Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.
 
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
Thanks frabjous, I doubt I'd get fully serious about it though as I'm not sure I would fully understand it all. Changing your first command line to use Calibre that way though seems pretty straight-forward so I think I'll try that.
Laura81 is offline   Reply With Quote
Old 02-02-2010, 04:11 AM   #35
Laura81
Addict
Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.
 
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
Hey frabjous, I tried changing the .html to a .lit as you said above to convert those to epubs but it didn't work for me. The file I saved just saved as a .dat and didn't change into a windows batch file like the other one did.
Laura81 is offline   Reply With Quote
Advert
Old 02-02-2010, 04:25 AM   #36
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Laura81 View Post
Hey frabjous, I tried changing the .html to a .lit as you said above to convert those to epubs but it didn't work for me. The file I saved just saved as a .dat and didn't change into a windows batch file like the other one did.
The other one didn't change into a batch file, you named it that way. If you opened the previous bat file in notepad and made the changes frabjous
Code:
for %%I in (*.html) do "C:\Program Files\Calibre2\ebook-convert.exe" "%%I" "%%~nI.lit"
suggested then just save the file as html2lit.bat and it will be a batch file.

Good Luck.

Last edited by DoctorOhh; 02-02-2010 at 04:27 AM.
DoctorOhh is offline   Reply With Quote
Old 02-02-2010, 04:34 AM   #37
Laura81
Addict
Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.
 
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
This is the change I'm trying to make:

for %%I in (*.lit) do "C:\Program Files\Calibre2\ebook-convert.exe" "%%I" "%%~nI.epub"

I then saved the above as lit2epub.dat but it does not turn into a windows batch file as the other one did. It just stays the dat file.
Laura81 is offline   Reply With Quote
Old 02-02-2010, 04:41 AM   #38
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Laura81 View Post
This is the change I'm trying to make:

for %%I in (*.lit) do "C:\Program Files\Calibre2\ebook-convert.exe" "%%I" "%%~nI.epub"

I then saved the above as lit2epub.dat but it does not turn into a windows batch file as the other one did. It just stays the dat file.
Change the D to a B it is called a batch file because we name it such. change .dat to .bat

Save it as lit2epub.bat

Last edited by DoctorOhh; 02-02-2010 at 04:44 AM.
DoctorOhh is offline   Reply With Quote
Old 02-02-2010, 05:17 AM   #39
Laura81
Addict
Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.
 
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
Quote:
Originally Posted by dwanthny View Post
Change the D to a B it is called a batch file because we name it such. change .dat to .bat

Save it as lit2epub.bat
Oi vey, do I feel like an idiot! How much more obvious can it get! Excuse my idiocy and thanks!
Laura81 is offline   Reply With Quote
Old 02-02-2010, 05:20 AM   #40
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Laura81 View Post
Oi vey, do I feel like an idiot! How much more obvious can it get! Excuse my idiocy and thanks!
ABCD is the extent of my knowledge, glad I could help.

Last edited by DoctorOhh; 02-02-2010 at 05:24 AM.
DoctorOhh is offline   Reply With Quote
Old 02-02-2010, 06:03 AM   #41
Laura81
Addict
Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.
 
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
Well I tried it and while it did create the batch file properly it didn't work. Not sure why. I pasted it in the folder with the lit files but the black command screen just flashed up really quickly and then closed again.
Laura81 is offline   Reply With Quote
Old 02-02-2010, 06:38 AM   #42
Solicitous
Wizard
Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.Solicitous ought to be getting tired of karma fortunes by now.
 
Posts: 1,434
Karma: 1525776
Join Date: Aug 2009
Location: TAS, Australia
Device: Astak Pocket Pro (Black), 2 x Kindle WiFi (Graphite), iPod Touch 4G
Quote:
Originally Posted by Laura81 View Post
Well I tried it and while it did create the batch file properly it didn't work. Not sure why. I pasted it in the folder with the lit files but the black command screen just flashed up really quickly and then closed again.
You could add a third line to the batch file
sleep 30
This will keep the window open for 30 seconds (replace 30 with the number of preferred seconds). Will allow you to see any error messages.
Solicitous is offline   Reply With Quote
Old 02-02-2010, 08:19 AM   #43
Laura81
Addict
Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.Laura81 ought to be getting tired of karma fortunes by now.
 
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
Quote:
Originally Posted by Solicitous View Post
You could add a third line to the batch file
sleep 30
This will keep the window open for 30 seconds (replace 30 with the number of preferred seconds). Will allow you to see any error messages.
Thanks for the suggestion but I would have no clue how to do that. I don't know how to write any code at all.


EDIT: I worked out what I was doing wrong with the code... using the 32bit line instead of the 64bit. Another smack upside my head needed. All working perfectly now.

Last edited by Laura81; 02-02-2010 at 10:51 AM.
Laura81 is offline   Reply With Quote
Old 02-02-2010, 03:16 PM   #44
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
Glad to hear it!
frabjous is offline   Reply With Quote
Old 03-02-2010, 01:16 PM   #45
gastan
Addict
gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.gastan ought to be getting tired of karma fortunes by now.
 
Posts: 221
Karma: 801624
Join Date: Aug 2009
Location: US Pacific Northwest
Device: LePan II, Kobo Aura
Thank you, frabjous, for the script you supplied. I came here looking for a solution to convert an html file to epub. I used only the one html2epub line and it worked perfectly.

Needless to say, I'm going to save the bat file and bookmark this thread.

gastan 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
Hebrew Doc file to epub logie072 ePub 3 08-27-2010 11:31 AM
need advice doc/html to epub ebooker Workshop 2 08-14-2010 10:06 PM
Converting .doc to epub . . . michael180 General Discussions 2 06-08-2010 08:54 PM
Doc to Epub convertion problems johnbajer Calibre 5 06-04-2010 05:30 PM
Problem converting doc to epub Laura81 Calibre 3 01-26-2010 06:03 PM


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


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