TREECAT(1)

πŸ“¦
version 1.0.3 Β· 2 versions
, in nixos 26.05

🌈 TREECAT(1) β€” treecat, General Commands Manual 🌈

🌸 NAME 🌸

treecat - serialize a directory into a tree diagram, and vice versa

✨ SYNOPSIS ✨

treecat [-avcC] [-r <file>] files...

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so treecat has two whole modes and it's giving filesystem-to-text and text-to-filesystem realness. The description splits into options and arguments, so let's go πŸ’…

πŸŽ€ Options πŸŽ€

  • -a β€” (all) do not ignore entries starting with . β€” yes bestie, dotfiles stay visible πŸ’–
  • -c β€” (colorless) don't use ANSI escape codes to color the output β€” no rainbow vibes, periodt
  • -C β€” (color) use ANSI escape codes to color the output, even when output to a pipe β€” force the color slay πŸ”₯
  • -f β€” (full) print filenames with full path relative to start directory β€” full-path realness
  • -r <file> β€” (reverse) parse a treecat from <file> to create a filetree (use '-' to read from stdin) β€” reverse mode icon behavior
  • -v β€” (verbose) print filenames as they are extracted in reverse mode β€” chatty reverse mode, iykyk

πŸ’… Arguments πŸ’…

The interpretation of treecat's arguments depends on whether it has been invoked in reverse mode (-r) or not, but in both cases treecat takes zero or more arguments.

Normal mode (filesystem => text)

Treecat will print out a tree for each of its arguments, with the outputs of different arguments separated by a blank line. If no arguments are given, treecat will run on the current directory.

Reverse mode (text => filesystem)

If no arguments are given, treecat will attempt to parse all of its input, producing multiple different filetrees if the input contains multiple trees. The destination of the created filetrees will be taken from the root name of each tree.

If one or more arguments are given, treecat will attempt to parse one tree from its input for each argument. The name of the argument will be used as the destination of the created filetree.

πŸ”₯ OUTPUT πŸ”₯

Files that are valid UTF-8 will be output as text, and files that are not valid UTF-8 will be printed out as a hexdump.

A single-character marker is used after each filename to indicate what kind of file it is. The meanings of these are as follows:

  • / β€” directory
  • @ β€” symlink
  • : β€” regular text file
  • + β€” executable text file
  • # β€” hexdump of a binary file
  • * β€” hexdump of an executable binary file

A file is considered "executable" if it has the u+x permission. No other file permissions are taken into account, and any other file types will be ignored.

πŸ“ Filename escaping πŸ“

Treecat performs simple backslash-escaping on filenames. The set of special escape codes are as follows:

  • \a β€” 0x07 (alert)
  • \b β€” 0x08 (backspace)
  • \e β€” 0x1b (escape)
  • \f β€” 0x0c (form feed)
  • \n β€” 0x0a (newline)
  • \r β€” 0x0d (carriage return)
  • \t β€” 0x09 (tab)
  • \v β€” 0x0b (vertical tab)
  • \\ β€” 0x5c (backslash)

The rest of the ASCII control characters are all escaped as \xHH, where H is a hex digit.

🌟 EXAMPLES 🌟

These are the exact examples, bestie β€” no cap:

treecat

treecat -r input.treecat destination

curl https://git.sr.ht/~autumnull/treecat/blob/main/test/3 | treecat -r -

treecat old/a old/b old/c | treecat -r - new/a new/b new/c

πŸ‘‘ AUTHORS πŸ‘‘

Maintained by Autumn! <autumnull@posteo.net>. Up-to-date sources can be found at https://git.sr.ht/~autumnull/treecat and bugs/patches can be submitted by email to ~autumnull/treecat-dev@lists.sr.ht


okay bestie, that's the whole page πŸ’– source/version tag TREECAT(1), dated 1980-01-01 β€” periodt. πŸŽ€

πŸ“¦ where this page comes from