ODFHIGHLIGHT(1)
π NAME π
okay so bestie, meet odfhighlight(1) β itβs from the User Contributed Perl Documentation, and it literally does search, replace and highlight text in a document. The whole thing is giving β¨ document-glow-up β¨ and Iβm obsessed.
β¨ SYNOPSIS β¨
odfhighlight "source.odt" "search string" -r "replacement" -o "target.odt"
This one replaces "search string" by "replacement" in the file "source.odt", highlights each replacement with a yellow (default) background, then writes the resulting document as "target.odt" π
odfhighlight "myfile.odt" "search string" -color "green"
This one highlights each occurrence of "search string" in "myfile.odt" with a green background color, without changing the text β and without the -o option, the changes apply to "myfile.odt" π
π¦ ARGUMENTS AND OPTIONS π¦
πΌ Default behaviour πΌ
With the minimal command line β just a filename and a string as arguments β each matching string is highlighted with a yellow background and represented with the Standard style. Thatβs the default vibe, no extra flags needed π«Ά
π Options π
-e,--encoding "xxxxxx"β character set to use, if different from the default-r,--replacement "new string"β"new string"is used as a replacement for"search string"-c,--color "code"β an RGB color code, expressed either as the concatenation of 3 comma-separated decimal values (each one in the range0..255, ex:"72,61,139"for a dark slate blue), or a 6-digit hexadecimal number, preceded by a#(ex:#00ff00for green) or, if a colormap is available and known in yourOpenOffice::OODocinstallation, a symbolic color name (ex:"sky blue")-s,--stylename "name"β the name of the color style (default:"MyHighlight"); the user must provide a style name that is not already in use in the document-p,--property "property=value"β This option can be repeated; each occurrence gives an additional property for the highlight style (font name, size, foreground color, ...). For example, with the combination of-p 'fo:color=#ff0000'and-p 'fo:font-size=18pt', the highlighted text will be made of 18pt-sized, red characters. In order to master these options, you should have some knowledge of the Form Objects (FO) vocabulary that is used in the OpenDocument specification.-o,--output "filename"and-t,--target "filename"β an alternative filename to save the modified document, when the source document must remain unchanged
Thatβs the whole page, bestie β signed off from the User Contributed Perl Documentation, perl v5.42.3, dated 2010-07-12 π«Άπ
π¦ where this page comes from
- nixos 26.05: perl5.42.3-OpenOffice-OODoc 2.125
- nixpkgs unstable: perl5.42.3-OpenOffice-OODoc 2.125
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms