02-17-2010, 04:51 PM | #1 |
Connoisseur
Posts: 72
Karma: 16
Join Date: Sep 2009
Location: UK
Device: Sony PRS-600 with latest Calibre and Linux Ubuntu-9.10
|
doc conversion under Linux
I know that under ms-windows that calibre can convert doc to other file types via Word. Koffice has the same functionality. How would one make calibre talk to Koffice so that one-button doc conversion can be had under linux? Is it just an issue of calling Koffice with options via python or is it a lot more complex?
|
02-17-2010, 04:57 PM | #2 |
creator of calibre
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre doesn't convert doc on windows either. But it should be relatively easy to make a custom input format plugin that uses another program to convert doc to html first.
|
Advert | |
|
02-17-2010, 10:50 PM | #3 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
I don't know how easy it would be to do this with KOffice, but using AbiWord, I've got a very simple bash script set up to do conversion from .doc to .html (with AbiWord) and from .html to whatever (with calibre's commandline).
E.g. save this as ~/bin/docconvert.sh Code:
#!/bin/bash filein="$1" fileout="$2" abiword --to=html $filein ebook-convert ${filein%.doc}.html $fileout docconvert.sh myfile.doc myfile.epub will convert from .doc to epub. This could of course be improved a zillion different ways, and can of course, be one of the associated applications for .doc files in nautilus to skip having to open a terminal. |
02-18-2010, 07:25 AM | #4 |
Connoisseur
Posts: 72
Karma: 16
Join Date: Sep 2009
Location: UK
Device: Sony PRS-600 with latest Calibre and Linux Ubuntu-9.10
|
excellent, many thanks. Didn't twig that abiword can do this
|
02-18-2010, 09:29 AM | #5 |
Guru
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
For a command line conversion of Word documents prior to docx you can use antiword
http://www.winfield.demon.nl/ |
Advert | |
|
02-18-2010, 03:19 PM | #6 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
If it wasn't clear, AbiWord can do .docx from the commandline too. You may need to tweak the script above for it, though.
|
02-21-2010, 06:55 AM | #7 |
Connoisseur
Posts: 72
Karma: 16
Join Date: Sep 2009
Location: UK
Device: Sony PRS-600 with latest Calibre and Linux Ubuntu-9.10
|
thanks for the tips guys. been a long while since I used antiword
|
03-25-2010, 07:06 AM | #8 |
Enthusiast
Posts: 41
Karma: 5514
Join Date: Oct 2009
Location: Groningen, Netherlands
Device: PRS-T1
|
I use "antiword -x db" to convert to docbook, then db2epub to convert to epub and then ebook-convert to convert to lrf. You lose all images but most of the format and the chapter structure stays. Sweet and easy!
|
03-25-2010, 12:50 PM | #9 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HELP!! Tables in doc. not right on Kindle after Conversion via Calibre | MinaNoir | Amazon Kindle | 3 | 07-22-2010 01:42 PM |
Conversion of DOC to EPUB under Linux (Ubuntu 9.10), and a couple of other questions | booksonthemove | Calibre | 3 | 02-21-2010 01:26 PM |
Conversion from .doc & .docx?? | LarryLaser | Calibre | 2 | 02-08-2010 10:48 PM |
Any Chance Calibre Will Support Direct DOC Conversion? | sirbruce | Calibre | 1 | 03-22-2009 05:14 AM |
DOC to PDF conversion - font size issues | icebattle | 4 | 02-15-2009 03:32 AM |