INLINE-DETOX(1)

πŸ“¦
version 3.0.1 Β· 3 versions
, in arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu stonking

πŸ’– INLINE-DETOX(1) πŸ’–

okay bestie, welcome to inline-detox β€” the stream-based glow-up for your filenames ✨ (it lives in the General Commands Manual section, if you're keeping track πŸŽ€)


✨ SYNOPSIS ✨

inline-detox [-f configfile] [-s sequence] [-v]
inline-detox [-f configfile] [-s sequence] [-v] file ...
inline-detox [-L] [-f configfile] [-v]
inline-detox [-h | --help]
inline-detox [-V]

🌸 DESCRIPTION 🌸

okay so. The inline-detox utility literally just makes new filenames for you so that living under Linux and other Unix-like operating systems stops being a whole ordeal 🫢. It takes the characters that make a filename a nightmare to type out and swaps them for dashes and underscores. Periodt.

It also serves up transcoding-based filters, converting ISO-8859-1 or CP-1252 to UTF-8 β€” yes, a whole character-set makeover πŸ’…. And there's one more filter on the roster that unescapes CGI-escaped filenames, because of course there is.

Here's the flow, bestie: inline-detox reads filename(s) from the input stream and writes the updated filename(s) to the output stream. That's it. That's the whole vibe.

And if a filename gets passed on the command line? Then inline-detox reads this file and processes each line before writing it to the output stream. Easy.

πŸ’‘ fun fact: running detox --inline is identical to running inline-detox. same girl, different name tag.

🧚 Sequences 🧚

inline-detox is driven by a configurable series of filters, and that series is called a sequence. Iconic naming, honestly. Sequences are covered in more detail in detoxrc(5) and you can discover them with the -L option. The default sequence will run the safe and wipeup filters. Other examples of pre-configured sequences are iso8859_1 and iso8859_1-legacy, which both provide transcoding to UTF-8, and then finish with the safe and wipeup filters. 🌈

πŸ‘‘ Options πŸ‘‘

  • -f configfile β€” use configfile instead of the default configuration files for loading translation sequences. Heads up though: no other config file will be parsed. not one. she's exclusive.
  • -h, --help β€” display helpful information. we love a helpful queen πŸ’œ
  • -L β€” list the currently available sequences. When paired with -v this option shows what filters are used in each sequence and any properties applied to the filters. the receipts!! 🧾
  • -s sequence β€” use sequence instead of default.
  • -v β€” be verbose about which files are being renamed.
  • -V β€” show the current version of inline-detox.

πŸŽ€ FILES πŸŽ€

  • /etc/detoxrc β€” the system-wide detoxrc file.
  • ~/.detoxrc β€” a user's personal detoxrc. Normally it extends the system-wide detoxrc, unless -f has been specified, in which case, it is ignored. 😭 (sorry girl, rules are rules)
  • /usr/share/detox/cp1252.tbl β€” the provided CP-1252 transcoding table.
  • /usr/share/detox/iso8859_1.tbl β€” the provided ISO-8859-1 transcoding table.
  • /usr/share/detox/safe.tbl β€” the provided safe character translation table.
  • /usr/share/detox/unicode.tbl β€” the provided Unicode control character filtering table, used by the UTF-8 filter.

🌟 EXAMPLES 🌟

  • echo Foo Bar | inline-detox -s lower -v β€” will run the sequence lower, listing any changes and returning the result to the output stream.

like… look at her go πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

detox(1), detox.tbl(5), detoxrc(5), ascii(7), iso_8859-1(7), unicode(7), utf-8(7)


πŸ’€ HISTORY πŸ’€

inline-detox was originally designed to clean up files that I had received from friends which had been created using other operating systems. It's trivial to create a filename with spaces, parenthesis, brackets, and ampersands under some operating systems. These have special meaning within FreeBSD and Linux, and cause problems when you go to access them. I created inline-detox to clean up these files.

Version 2.0 stepped back from transliteration out of the box, instead focusing on ease of use. Version 3.0 further shifted this, by removing most of the transliteration from the tables. The primary motivations for this were user-provided feedback, and the fact that many modern Unix-like OSs use UTF-8 as their primary character set. Transliterating from UTF-8 to ASCII in this scenario is lossy and pointless. πŸ’€ (fr fr, no cap)


🫢 AUTHORS 🫢

inline-detox was written by Doug Harple. king behavior, honestly πŸ‘‘


and that's the whole page, bestie β€” brought to you by the Debian crew, dated March 31, 2024. go forth and rename things with main character energy πŸ¦‹βœ¨

πŸ“¦ where this page comes from