Libre office import

Hello,

I have a LibreOffice document (.odt) that I’d like to convert to Tiddlyhost format. The .odt file is 35 pages long, with approximately 60 paragraphs that could be used as tiddlers. What would be a good way to perform this conversion? I don’t mind having to copy and paste or edit the headings for paragraph numbers, so an automated procedure isn’t necessary.

Thank you very much and merry Christmas.

Serge

1 Like

off the top of my head have a look at the various export formats of libre office for something more suitable. it all depends if it’s one off, or occasionally etc… exporting as markdown, copy and past etc…

you can then use excise to breakup the document

let us know how you progress

There’s also pandoc, which can convert from LibreOffice to Markdown (but not directly Wikitext, alas).

IIRC, there’s been a few threads here on Talk about Markdown to/from Wikitext conversion plugins, @Serge_Dube you might find them in the forum’s history or with the integrated search function.

Fred

IMO for 1 document. Just copy / paste as text and then add the TW formatting. It will be much faster, than searching for an automated process. That will cost you halve a day or more.

Copy / paste and formatting will be done in 10 minutes.

1 Like

I have done this quite a bit to get a large number of tiddlers created from an external file. Essentially, you want your data in a spreadsheet.

The steps I use are variations on the ‘method’ below.

=======================

You need to have some column headers in a Calc/Excel file, and that one of the column headers is “title” and one column header is “text” (all headers need to be lower case, and “tags” would be a good one to include).

Save the file as a CSV. Then, run your file through a CSV/XLMS → JSON converter. This should turn your file (rows) into an “array of objects” with each object having at least a “title” property. You can then drag and drop this JSON file into vanilla TW5 and it should import as 1-tiddler-per-object.

Here is a converter that would work for you: CSV to JSON Converter | Online Tool

For example run this small sample CSV through the converter:

title,tags,text
One,test,Question One?
Two,test,Question Two?
Three,test,Question Three?

Which renders as:

[{
“title”: “One”,
“tags”: “test”,
“text”: “Question One?”
},{
“title”: “Two”,
“tags”: “test”,
“text”: “Question Two?”
},{
“title”: “Three”,
“tags”: “test”,
“text”: “Question Three?”
}
]

Then, simply drag and drop this Json file into a Tiddlywiki. If it is a file with this correct format, each object will become a separate (regular) tiddler.

I actually find this a more flexible and easier/quicker process than the xlsx-utils plugin.

2 Likes