Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 878 Bytes

File metadata and controls

30 lines (18 loc) · 878 Bytes

Text File Line Trimmer

Text-File-Line-Trimmer is a simple Python script designed to format text files by ensuring that each line does not exceed 120 characters in length.

Features

  • Reads the content of a specified text file.
  • Formats the content to ensure no line exceeds 120 characters.
  • Writes the formatted content back to the same file.

Requirements

  • Python 3.x

Usage

  1. Place the script in the directory containing your text file or adjust the path accordingly in the script.
  2. Run the script:
python Text-File-Line-Trimmer.py

By default, the script is set to format "textfile.txt". To format a different file, replace the filename in the format_file() function call at the end of the script.

Support the Developer

If you found this helpful, please consider:

  • Buymeacoffee: Link