grep'ping the highlighted text in .odt file?


New Member
Dec 21, 2021
Reaction score
I did some highlighting of lines of text in a Libre Writer .odt file. And now I'm trying to grep them into another file using Highlight Color as the only pattern. I'm not exhausted but, i did look around and found nothing about this. Do you know how to get into a .odt file and grep out this? thanks

From memory, they are an archive of various pieces of your document.

Try opening/extracting one with a program such as 'xarchiver' to see what it consists of.
You could use Mozzilla Firefox to design a cascading style sheet (CSS).
You can use grep in the terminal to find occurrences of words, phrases or regex patterns in .odt files.
I answered a question on it some time ago:
Post in thread 'libreoffice - writer - search options'

I’m not sure if that’s exactly what you’re after though.

Libreoffice does have a scripting language built into it, similar to the VBScript used by M$ Office, but I’ve never used it. That will probably allow you to create a script that could be used to find and highlight occurrences of the currently selected text. But again, I’ve never used LibreOffice’s scripting language.