rtf to DOC and back

12 views
Skip to first unread message

Ivory

unread,
Jun 7, 2012, 7:38:53 AM6/7/12
to ywSynch
ySynch does a fine job converting the files to DOC which is the most
necessary step in using them within Android, but for me, I miss the
ability to easily browse backwards through previous scenes. Simon's
export/import almost works for me, but it requires that I convert the
chapters to DOC and then back to RTF.

I was wondering if you would like to include the exports for syncing,
and if not, could you tell me how you use Libreoffice to provide this
function? Is there an API within Libre that converts RTF to DOC?

Trevor Prinn

unread,
Jun 7, 2012, 8:11:57 AM6/7/12
to yws...@googlegroups.com
I see what you mean. I hadn't thought about it. I can't see an easy way
of getting yWriter to do the export/import, so it would be easy to end
up with inconsistent files. It would need ywSynch to work in a quite
different way. I'll have a think about it.

You may find it easier to use batch files to do the conversion. There's
no API that I know of to do the conversion. What I am doing is spawning
off a separate process that runs an swriter command line. The format is:

"<swriterpath>\swriter.exe" -convert-to <format> -headless -outdir
"<outputpath>" "<filename>"

The format is doc, rtf etc (in fact, the strings that appear in the
Remote Format combobox in Options). outputpath is a directory (I
actually convert into the temp folder and then move it from there).
-headless stops swriter becoming visible.

Trevor Prinn
ywSynch Author

Ivory

unread,
Jun 9, 2012, 6:55:52 AM6/9/12
to ywSynch
I will play with those command lines, thanks.

You could, if you wanted, just synch anything in the EXPORT folder to
a remote EXPORT folder and back. You would have no responsibility to
create the export or actually put it back in the project, and we would
have the option.

Trevor Prinn

unread,
Jun 9, 2012, 7:01:50 AM6/9/12
to yws...@googlegroups.com
I'll have a look at doing that. I'm in the middle of moving house, and
trying to get a new job, so it might take a little while.

Trevor Prinn
Reply all
Reply to author
Forward
0 new messages