Published on : 2026-01-03 14:25
Gopher works best with lines no longer than 70 chars. Long lines
can wrap badly and become hard to read in simple clients.
(IMG) How I wrap text with FMT
Counting chars by hand is tedious - let tools do the work for you.
Install formatting tools
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
On Debian/Ubuntu:
sudo apt install libfmt-dev
Even though libfmt is a C++ library, most systems include the fmt
command-line tool, perfect for quick formatting in Bash scripts.
Wrap text in Bash
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Example: wrap text to 67 chars for Gopher:
echo "Gopher likes short lines. Formatting manually is annoying
This text will be wrapped automatically to fit 67 characters
per line." | fmt -w 67
Output: neat, readable text ready for Gopher menus or text files.
Benefits
‾‾‾‾‾‾‾‾
* No manual line breaks
* Consistent formatting
* Clean, readable Gopher content
Write freely, format once, and keep your Gopher content pleasant
to read.
(DIR) Back to my phlog