Skip to main content

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

pip install linerepeat

Pre-built Binaries

Download the latest linerepeat binary (Linux) or linerepeat.exe (Windows) from GitHub Releases.

Usage

$ 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

# 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

Metadata

Release files for linerepeat 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for linerepeat 0.1.1
File Size Uploaded Provenance
linerepeat-0.1.1.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for linerepeat 0.1.1
File Interpreter ABI Platform
linerepeat-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / linerepeat-0.1.1.tar.gz

Download URL linerepeat-0.1.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cfa9fb5a90f9559e3b155ede1abe638e5a49480f44678f1ba211945d8945c9f0
BLAKE2b-256 checksum
How to use checksums
15d575597b131f1efb267078eb509fd246047136433922a5261b9053ec3d68d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / linerepeat-0.1.1-py3-none-any.whl

Download URL linerepeat-0.1.1-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f96196de341b3457eae26e0657ab7bb50c0432a45a9b384ea3d099d63e3b6d78
BLAKE2b-256 checksum
How to use checksums
2fe8409f398a2890b8cbd85ee1e74fc55265a595423c3150982e3863b74487fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for linerepeat 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page