Skip to main content

A simple CLI tool that repeats lines of text.

Project description

line-repeater

A simple CLI tool that repeats lines in a file in-place.

Installation

pip install line-repeater

Usage

lr <file> <repeat_n_times> [OPTIONS]

Arguments

Argument Description
file Path to the file to modify
repeat_n_times How many times to repeat each line

Options

Option Short Description Default
--till-line -tl Repeat blocks of N lines at a time 1
--block-sep -bs Separator between each repeated block \n
--line-sep -ls Separator inserted between each repetition None

Examples

Repeat every line 3 times:

lr file.txt 3

Repeat every line 3 times, separated by ---:

lr file.txt 3 --block-sep "---"

Repeat blocks of 2 lines, 4 times each:

lr file.txt 4 --till-line 2

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

line_repeater-1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

line_repeater-1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file line_repeater-1.0.tar.gz.

File metadata

  • Download URL: line_repeater-1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for line_repeater-1.0.tar.gz
Algorithm Hash digest
SHA256 6805c8eeaba515f2b7ac831721a6b3c7ec2fa672ac8e53c88d2871b2248d4125
MD5 17476c50eaabda4a1bacf4957728a736
BLAKE2b-256 29d80f8c17a091db416ac1de64f4bc6e62d6614bb5350856e4c584b23dd24d92

See more details on using hashes here.

File details

Details for the file line_repeater-1.0-py3-none-any.whl.

File metadata

  • Download URL: line_repeater-1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for line_repeater-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff3354f28b4c60d4700ff952982426de0384fbd9af2e0e7ac3b6acc5b5a3cce3
MD5 43a48596311554214edb5c5068c88fde
BLAKE2b-256 5c8e94389f22f4cae74948ddc74d3c130cf97062bbcae41d6a48ce72c75c4471

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page