LentaFlow is a console utility designed for the correct sorting and cleaning of product IDs. It is essential for generating clean, duplicate-free lists of IDs for promo codes, database imports, or inventory management.
It handles messy input with mixed delimiters (commas, semicolons, pipes, newlines) and outputs a strictly formatted, comma-separated list of unique identifiers.
- Smart Cleaning: Automatically converts various separators (
;,|,/, spaces, newlines) into standard commas. - Deduplication: Removes duplicate IDs while maintaining the original order.
- Validation: Ensures integrity of the output data.
- Zero Dependencies: Runs on standard Python 3.6+.
Run this simple command (no root required):
bash install.shThis will copy the tool to ~/bin/lentaflow and automatically add it to your PATH if needed.
Note: After installing, you may need to restart your terminal for the command to become available.
Just type lentaflow and paste any messy data (even with ; or |), then press Ctrl+D.
# Basic usage
lentaflow 1001 1002 1003
# Sorting
lentaflow 5 1 100 --sort
# Output: 1,5,100
# SQL Mode (Ready for IN clause)
lentaflow 10 20 --sql
# Output: '10','20'
# Custom Separator
lentaflow 10 20 --sep "|"
# Output: 10|20
# Filtering by Length
lentaflow 1 22 333 --min-len 2
# Output: 22,333
# Stats
lentaflow 100 100 200 --stats
# Output: 100,200
# (stderr): 📊 Stats: Total: 3 | Unique: 2 | Duplicates: 1If your data has semicolons, wrap it in quotes:
lentaflow "1001; 1002 | 1003"-c,--copy: Copy result to clipboard (macOS).-s,--stats: Show total/unique count.--sort: Sort output (numerically/alphabetically).--sql: Wrap items in single quotes'item'.--sep "X": Use "X" as separator instead of comma.--min-len N,--max-len N: Filter items by length.-q,--quiet: Don't print result to console.--json,--newline: Alternative output formats.
To remove the program:
bash uninstall.shlentaflow/
├── lentaflow.py # Main standalone script
├── install.sh # Installation script
└── uninstall.sh # Uninstallation script
- Python 3.6+