25 practical automations

Text & cleanup

Turn messy text into consistent, usable content. Each guide includes full code, usage instructions, and ideas for making it your own.

Search this category ↗
PythonBeginner

Add line numbers

Prefix each line with a padded number and tab.

Text & cleanup
PythonBeginner

Compare text versions

Write a unified difference report between two UTF-8 files.

Text & cleanup
PythonBeginner

Expand tab stops

Replace tabs with the correct spaces for their line position.

Text & cleanup
PythonBeginner

Find doubled words

Report adjacent repeated words with source line numbers.

Text & cleanup
PythonBeginner

Normalize line endings

Create a UTF-8 copy with consistent LF or CRLF line endings.

Text & cleanup
PythonBeginner

Normalize list bullets

Convert leading asterisk and plus bullets to a consistent marker.

Text & cleanup
PythonBeginner

Remove empty lines

Discard whitespace-only lines while retaining nonempty line text.

Text & cleanup
PythonBeginner

Split text at a delimiter

Create numbered text files from literal delimiter-separated sections.

Text & cleanup
PythonBeginner

Wrap paragraphs

Reflow paragraphs at a selected character width.

Text & cleanup