ODFFILESEARCH(1)

πŸ“¦ version 2.125, in nixos 26.05, nixpkgs unstable

πŸ¦‹ ODFFILESEARCH(1) β€” like, a whole file-search era πŸ’…

okay bestie, so this is odffilesearch, straight out of the User Contributed Perl Documentation corner of the universe, and it's genuinely iconic. it's a little Perl cutie that goes through your OpenDocument files and pulls out the ones that match your keywords. let's get into it ✨


🌸 NAME 🌸

odffilesearch β€” file selection by keywords. that's it, that's the whole gig. you give it words, it gives you files. match made in heaven fr fr 🫢


πŸŽ€ SYNOPSIS πŸŽ€

odffilesearch -R "D:\Documents\*.odt" openoffice desktop XML

so this one produces the list of the ODF Text documents present in the given directory and its subdirectories, and containing the words "openoffice", "desktop" AND "XML". all three, no half-measures, she's picky and we love that for her πŸ’–

odffilesearch -command "rm -f %f" "*.ods *.odt" lost dismiss cancel

and this one executes the "rm -f filename" (i.e. deletes the file in a Unix system) for each ODT or ODS file present in the current directory and containing the words "lost", "dismiss" AND "cancel".

⚠️ okay so real talk, that second example literally deletes files. it's the manpage's own example, not a drill, so please look at your filter twice before you hit enter bestie 😭

πŸ’œ USAGE πŸ’œ

odffilesearch [-options] <file filter> <keyword list>

✨ DESCRIPTION ✨

this utility allows the user to retrieve a list of files matching a given set of keywords or regular expressions. a file gets selected when it contains, in its text and/or in its metadata (title, subject, keywords or description), all the given search strings. all of them. every single one. she does not do partial credit πŸ’…

the selected files are echoed to the standard output (one file per line), so this utility can be used as a filter piping its results to another program. alternatively, a given shell command can be launched by the script each time a file matches, allowing on-the-fly processing of the selected documents. very main character energy, honestly πŸ”₯

the files filter may content one or more space-separated paths. each path may content jokers. so it's possible to explore several directories and/or several filename patterns β€” like, go off, explore the whole filesystem, we support you 🧚

and heads up: all the arguments after the file filter are processed as search criteria. so once the filter is done, everything else is a keyword. no cap.


πŸ‘‘ OPTIONS πŸ‘‘

  • -R, -recursive β€” include the subdirectories of each given search directory. she goes deep πŸ•³οΈ
  • -verbose, -trace, -debug β€” echo some processing comments, so you can watch her work and feel involved πŸ“
  • -warnings β€” activate the warning messages of the OpenOffice::OODoc API. let her vent, she's earned it
  • -log <file> β€” like -verbose, but then messages are sent to the given file and don't pollute the standard output. tidy queen behavior ✨
  • -result <file>, -output <file> β€” send the list of matching files to the given file and not to the standard output
  • -criteria <file> β€” get search criteria from a file (one per line); the loaded search keywords may be combined with additional criteria passed with the command line, if any. stack 'em, mix 'em, the more the merrier πŸ’–
  • -command <command>, -exec <command> β€” execute a shell command for each matching file; if the command string contains "%f", this substring is replaced with the name of the selected file; if this option is provided, the selection list is not echoed to the standard output; if -verbose is on, the value returned by the command is echoed 🫢
  • -encoding <encoding> β€” selects the user's character set; this option is mandatory if one or more search criteria contain characters not belonging to the default character set. not optional, not a suggestion, mandatory mandatory 🚨

that's the whole page bestie, no notes, she ate and left zero crumbs πŸ’€πŸŒˆ

sign-off time: this page lives under User Contributed Perl Documentation, it's from perl v5.42.3, and it's dated 2010-07-12 β€” a true vintage icon, still slaying in the group chat β­πŸ’œ

πŸ“¦ where this page comes from