ODFEXTRACT(1p)

πŸ“¦
version 2.125 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

odfextract β€” text selection and copy from one document to another one ✨ it's giving "screenshot but for words", bestie, no cap 🫢


🌸 SYNOPSIS 🌸

okay so listen πŸ‘‚ this is a sample script, right? and what it does is chef's kiss β€” it goes through a source document and extracts every text element that matches a pattern you give it (a string or a regex, either one slays), then it appends all of that onto a target document. literally just copy-paste energy but make it Perl πŸ’…

⚠️ heads up bestie: the target document has to already exist. Empty is fine, not empty is fine, but it must be there. Not me creating files out of thin air, that's not the vibe 😭

and the command line? it takes exactly three little arguments, in order, and the order MATTERS, okurrr:

  1. argument one β€” the source file name 🌈
  2. argument two β€” the target file πŸŽ€
  3. argument three β€” the selection filter, aka any quoted string or Perl regular expression πŸ¦‹

so like, in your terminal it's gonna look something like:

odfextract <source-file> <target-file> <selection-filter>

where that third one is anything you quote β€” a plain string, or a full-on Perl regex, your call, main character choice fr fr πŸ’œ

πŸ’€ reminder again because it's important: target document = must be an existing one. empty or not. the script is not out here making new files for you. periodt.

🌸 mwah, that's the whole page 🌸 this lil number came from the User Contributed Perl Documentation corner of the universe, running on perl v5.34.0, dated 2022-06-16 β€” iconic, timeless, ate and left no crumbs πŸ‘‘πŸ’–βœ¨

πŸ“¦ where this page comes from