Skip to content

tanhiowyatt/lentaflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LentaFlow

Python Version License Build Status

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.

Features

  • 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+.

Installation

Run this simple command (no root required):

bash install.sh

This 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.

Usage

1. Interactive Mode (Recommended)

Just type lentaflow and paste any messy data (even with ; or |), then press Ctrl+D.

2. Arguments & Options

# 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: 1

3. Quoted List (for mixed delimiters)

If your data has semicolons, wrap it in quotes:

lentaflow "1001; 1002 | 1003"

Options Summary

  • -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.

Uninstallation

To remove the program:

bash uninstall.sh

Structure

lentaflow/
├── lentaflow.py    # Main standalone script
├── install.sh      # Installation script
└── uninstall.sh    # Uninstallation script

Requirements

  • Python 3.6+

About

Lentaflow — CLI tool to automate work processes. Written in Python with shell scripts for installation/uninstallation.

Resources

License

Stars

Watchers

Forks

Contributors