Home / Market / Fmt Tool

Fmt Tool

Simple text formatting and reflow tool. Use for reformatting paragraphs, removing extra whitespace, and cleaning up text files.

skill★ 00 dlclawhubMIT-0Install in CosmosUpstream Source

Documentation & Preview

#!/usr/bin/env python3 import textwrap, sys width = int(sys.argv[2]) if len(sys.argv)>2 else 80 text = open(sys.argv[1]).read() if len(sys.argv)>1 else sys.stdin.read() print(textwrap.fill(text, width))