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 "a\nb" | linerepeat 2 -s "---"
# a
# a
# ---
# b
# b

# Block mode with separator between blocks
echo "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.2.0

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.2.0
File Size Uploaded Provenance Actions
linerepeat-0.2.0.tar.gz 4.9 kB Without provenance Details for linerepeat-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 11.2 kB

Release files / linerepeat-0.2.0.tar.gz

Download URL linerepeat-0.2.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0d7797c2134e489e5dfb07713b3d2ca987ec9d95d564fb2d5ea20dd4db596df9
BLAKE2b-256 checksum
How to use checksums
cb457d69b250948396526c3c135ee18f0d3c93486a5b1938aa6733356539c18e
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.2.0-py3-none-any.whl

Download URL linerepeat-0.2.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ceea31f2ab8122dbe1131635768043fec0e42be3b29ea7c8ea3482db37dbca1
BLAKE2b-256 checksum
How to use checksums
769d7e4bd12e33578d718d300ced2cb380150e8e1a36956b5f111a796a2d00bf
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.2.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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