Metadata-Version: 2.4
Name: linerepeat
Version: 0.1.1
Summary: A small CLI tool for repeating lines
Keywords: cli,text,lines,repeat,typer
Author: Abdullah Alhamdi
Author-email: Abdullah Alhamdi <trymemain.pb.hug@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Utilities
Classifier: Environment :: Console
Requires-Dist: typer>=0.27.3
Requires-Python: >=3.14
Project-URL: Repository, https://github.com/cqveman/linerepeat
Project-URL: Issues, https://github.com/cqveman/linerepeat/issues
Description-Content-Type: text/markdown

# linerepeat

A small CLI tool for repeating lines from stdin or files. Useful for generating test data, creating separators, duplicating content, or any task where you need to repeat text patterns.

**Features:**
- **Line mode** (default): Repeat each input line N times
- **Block mode**: Repeat groups of lines as blocks
- **Custom separators**: Add delimiters between input line groups
- **Flexible I/O**: Read from stdin/files, write to stdout/files

## Install

### From PyPI
```bash
pip install linerepeat
```

### Pre-built Binaries
Download the latest `linerepeat` binary (Linux) or `linerepeat.exe` (Windows) from [GitHub Releases](https://github.com/cqveman/linerepeat/releases).

## Usage

```console
$ linerepeat [OPTIONS] {count}
```

**Arguments:**

* `count`: How many times to repeat.  [required]

**Options:**

* `-i, --input <file>`: Edit this file in place instead of reading stdin.
* `-o, --output <file>`: Write here instead of stdout. Can't be used with --input.
* `-s, --separator <str>`: Line placed between repeats.
* `-m, --mode <line|block>`: Repeat single lines or blocks.  [default: line]
* `-t, --till <int>`: Lines per block (block mode).  [default: 0]
* `--help`: Show this message and exit.

## Examples

```bash
# Repeat each line 3 times (single line - no separator printed)
echo "hello" | linerepeat 3
# hello
# hello
# hello

# With multiple input lines, separator goes BETWEEN lines
echo -e "a\nb" | linerepeat 2 -s "---"
# a
# a
# ---
# b
# b

# Block mode with separator between blocks
echo -e "line1\nline2\nline3\nline4" | linerepeat 2 -m block -t 2 -s "==="
# line1
# line2
# ===
# line1
# line2
# ===
# line3
# line4
# ===
# line3
# line4

# In-place: duplicate every line in a file
linerepeat 2 -i file.txt
```

## License

MIT
