REFORMAT(1)

πŸ“¦
this version Β· 3 versions
, in ubuntu noble, ubuntu questing

✨ REFORMAT(1) ✨

okay bestie, gather round, because today we're talking about reformat β€” the little manual-page queen whose whole entire job is making plain ascii texts look cute. yes, the manual is literally called reformat. she's giving lowercase, she's giving 2004, she's giving actually useful. πŸ’…


🌸 NAME 🌸

reformat β€” tool to simple format plain ascii texts


πŸŽ€ SYNOPSIS πŸŽ€

reformat [-h] [-j] [-l margin] [-p] [-w width]

πŸ’– DESCRIPTION πŸ’–

reformat is a simple tool to reformat plain texts. she reads from stdin and writes to stdout. that's it. that's the whole vibe. no config files, no drama, no nothing. πŸ¦‹

Available options are:

  • -h β€” prints usage information. the classic "help me bestie" flag. πŸ™ˆ
  • -j β€” switch justify mode: each line of a paragraph will have the same width (see -w option). to reach this, spaces (' ') will be added between words. default: disabled. so yeah, she'll stretch the lines out with extra spaces to make everything line up all nice and even. periodt.
  • -l left-margin β€” sets the left margin to left-margin. the margin is produced by left-margin spaces (' '), no tabs will be used. default: 0. no tabs, okay?? she said SPACES. respect it.
  • -p β€” accept lines beginning with a whitespace as usual paragraphs, too. lowkey changes how she reads your text, so pay attention. πŸ‘€
  • -w width β€” sets the paragraph width to width. no reformatted line will be longer than width (plus defined margins) then. default: 72. iconic number, honestly.

πŸ’€ LIMITATIONS πŸ’€

okay so she's not perfect. nobody is. let's be real about it:

  • reformat isn't an intelligent program. it just reads a whole paragraph into a buffer and then reformats it. the end of a paragraph is indicated by an empty line (may also contain spaces or tabs) or at a line beginning with whitespaces (if you don't use -p option).

lines beginning with whitespaces are lines to keep untouched. nothing happens with them, unless you use -p option (as just mentioned). so hands off, she said. πŸ™…

  • reformat doesn't look for hyphenation and hyphens at all. it won't make new lines when reached a hyphen. reformat works word-by-word. she's not doing that whole hyphen-break thing. not her era. 😭
  • reformat doesn't detect 'small paragraphs' (paragraphs without an empty line). if you forgot the blank line, bestie, that's on you. πŸ’€
  • Check for errors! if reformat detects a word with a length greater than the specified width, it will abort. like, full stop, she's out. 🚨
  • reformat has problems with control characters. some text documents contain the ^L character (0x0c), for example. yeah. messy. πŸ™ˆ

πŸ‘‘ TODO πŸ‘‘

planned features are:

  • Fix some problems, see "LIMITATIONS". (she's working on herself, okay? growth era. 🌱)
  • Add an option to declare a string that indicates "don't reformat" in the text. would be nice on reformatting emails, and don't touch the quoteas ('> '-lines). yes, "quoteas". she said what she said. 🫢
  • Add an option (e.g. -i) to keep indenting.

🌈 EXAMPLES 🌈

reformat < foo > bar

Reads text from foo, reformats and writes to bar. the starter pack, fr fr.

reformat -l 15 -j -w 50 < foo

Nice justified, centered text from file foo on an 80x25 terminal. look at her go. ✨


πŸ¦‹ SEE ALSO πŸ¦‹

fold(1)


(C) Stephan Beyer <s-beyer@gmx.net>, 2003-2004, GPL


and that's the whole page, bestie! this iconic little manual is from reformat 20040319, dated 2024-02-17 β€” so yeah, she's been serving since before most of us could read, and she's still here. legacy behavior. πŸ‘‘πŸ’– go format something pretty. 🌸✨

πŸ“¦ where this page comes from