ODFSEARCH(1p)
πΈ NAME πΈ
odfsearch β text selection and copy from one document to another using callback π
Like, okay, bestie, listen. This one's a lil script that goes shopping through one doc, grabs the bits you asked for, and drops them into a whole other doc. Using a callback. Iconic behavior, honestly.
β¨ SYNOPSIS β¨
So here's the whole vibe: this sample script extracts the content of every text element β and by every text element I mean literally every one, the paragraph, the header, and the list item β inside a source document that matches a given pattern. And that pattern can be a plain old string or a full regex, whatever your heart desires. π¦
Then, once it's got those matches? It appends them as a new paragraph to a target document. That's the whole trick. No cap. π
π¨ Bestie. Real talk. The target document must exist. Like, it has to actually be there. No ghost files, no vibes-only documents. π«Ά
Also the target document must exist β and yes I'm repeating myself on purpose because it matters β and the good news is it can be an empty document or a template, so you have options, queen. β¨
And here's how you actually call it, character for character, don't @ me:
usage : odfsearch target_file source_file "search_string"
That's target_file first, then source_file, then your "search_string" in quotes. Order matters, slay accordingly. π
Okay that's the whole page!! Go forth and copy text between docs like the main character you are π π¦πΈπ
This lil writeup is from the perl v5.34.0 era, dated 2022-06-16, and it's part of the ODFSEARCH(1p) manual, filed under User Contributed Perl Documentation. Byeee! πβ¨π
π¦ where this page comes from
- debian bookworm: libopenoffice-oodoc-perl 2.125-4 Β· LGPL-2.1-only
- debian trixie: libopenoffice-oodoc-perl 2.125-4 Β· LGPL-2.1-only
- ubuntu noble: libopenoffice-oodoc-perl 2.125-4 Β· LGPL-2.1-only
- ubuntu questing: libopenoffice-oodoc-perl 2.125-4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms