XOPO(1)

πŸ“¦ version 1.7.5, in epel 9, fedora 43, fedora 44, nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, gather round β€” xopo is the lil tool that turns libxo format strings into their simplified form ✨ like, it takes the messy version and gives you the cute streamlined one πŸŽ€


🌸 SYNOPSIS 🌸

xopo [-options]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” xopo takes libxo format strings and simplifies them down into the form that libxo uses for gettext lookups. with xopo you can take the .pot files that xgettext spits out and turn them into data that's actually useful for libxo-enabled applications 🫢

the reason this whole thing exists? gettext uses the string itself as the key into the message catalog, so libxo uses a simplified version of the format string β€” one that strips out the unimportant field formatting and modifiers. the glow-up here is that tiny formatting changes stop messing with the expensive translation process 😀 like, if a dev changes "/%06d" to "/%08d", that should not force someone to hand-inspect every single .po file. no cap.

so what does xopo actually do? it peeks inside the input file πŸ‘€ looking for lines that start with "msgid" β€” those lines carry format strings as the rest of the input line. those strings get passed to libxo for simplification, and the resulting simplified strings get swapped back into the output stream. that's what lets xopo run as a filter, slay πŸ’…

  • -f pofile, --po pofile β€” use the given po file as the input, bestie
  • --help β€” shows you this help text πŸ₯Ί
  • -o file, --output file β€” write the output content into the given file
  • -s text, --simplify text β€” gives you the simplified version of one single text string
  • -W, --warn β€” generate warnings while it's parsing the format strings (iykyk)
  • --version β€” displays version information πŸ‘‘

✨ EXAMPLE ✨

% xopo -f foo.pot -o foo.pot.new

πŸ‘€ SEE ALSO πŸ‘€

libxo(3), xo_format(5)


πŸ“œ HISTORY πŸ“œ

the libxo library first appeared in FreeBSD 11.0 πŸ•°οΈ


🫢 AUTHORS 🫢

libxo was written by Phil Shafer <phil@freebsd.org> πŸ’œ


πŸ“š ADDITIONAL DOCUMENTATION πŸ“š

FreeBSD uses libxo version 1.7.5. the complete documentation lives on github:

https://juniper.github.io/libxo/1.7.5/html/index.html

libxo lives on github as:

https://github.com/Juniper/libxo

and the latest release of libxo is available at:

https://github.com/Juniper/libxo/releases

πŸ“œ HISTORY (yes, again) πŸ“œ

the libxo library was added in FreeBSD 11.0 πŸ•°οΈ


🌟 AUTHOR 🌟

Phil Shafer


and that's the whole page, bestie πŸ’– this one shipped in the Debian world with a date of July 9, 2015 β€” and it's filed under the General Commands Manual section, so you already know it's giving main character energy πŸ‘‘βœ¨ go simplify some format strings, periodt πŸŽ€

πŸ“¦ where this page comes from