![]() |
#76 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
But, you can configure the location of the wordconv.exe. Go into the preferences, "Input options" and select "DOC Input". I don't think finding it automatically is worth the effort. |
|
![]() |
![]() |
![]() |
#77 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2016
Device: Kindle Paperwhite 2015
|
@BetterRed - already did that for the 5 DOC files I had. But I added the comment so that someone could fix it if anyone was interested in putting in the effort.
|
![]() |
![]() |
Advert | |
|
![]() |
#78 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2025
Device: Computer
|
Dead plugin, but there's a better alternative with the LibreOffice converter that features 1:1 conversion from doc to odt (can convert from anything that it can read to anything that it can write, probably with a better quality than Python's internal conversion options).
Tested with the following batch on Windows. I don't know Python, but is there an easy option to adjust/fork the current "Microsoft Doc Input Plugin" to use LibreOffice in the background? Code:
@echo off REM search for documents in the "docs" folder where this batch is located for /R docs %%f IN (*.doc) do if "%%~xf"==".doc" ( REM specific output directory "C:\Program Files\LibreOffice\program\soffice" --convert-to odt --outdir "docs" "%%f" REM LibreOffice --convert-to documentation REM https://help.libreoffice.org/latest/...rtfilters.html ) Code:
import subprocess # Import subprocess module import os # We will use the exists() function from this module to know if the file was created. def convert_doc_to_odt(file_path, output_dir): subprocess.run( f'/opt/libreoffice7.3/program/soffice \ --headless \ --convert-to odt \ --outdir {output_dir} {file_path}', shell=True) pdf_file_path = f'{output_dir}{file_path.rsplit("/", 1)[1].split(".")[0]}.odt' if os.path.exists(pdf_file_path): return pdf_file_path else: return None file_path = '/home/tarik/docs/file.docx' output_dir = '/tmp/' file = convert_doc_to_odt(file_path, output_dir) if file: print(f'File converted to {file}.') else: print('Unable to convert the file.') |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Input Plugin] DOCX Input | SauliusP. | Plugins | 42 | 06-05-2013 04:01 AM |
Understanding html input plugin | nimblebooks | Conversion | 3 | 02-26-2012 01:06 AM |
telling the input plugin to allow a rel=nofollow | nimblebooks | Conversion | 0 | 02-22-2012 05:01 PM |
Plugin which uses net as input and output | medve | Development | 0 | 12-04-2011 03:20 PM |
Looking For MHT Input Conversion Plugin | FlooseMan Dave | Plugins | 4 | 03-30-2010 05:52 PM |