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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6805c8eeaba515f2b7ac831721a6b3c7ec2fa672ac8e53c88d2871b2248d4125
|
|
| MD5 |
17476c50eaabda4a1bacf4957728a736
|
|
| BLAKE2b-256 |
29d80f8c17a091db416ac1de64f4bc6e62d6614bb5350856e4c584b23dd24d92
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff3354f28b4c60d4700ff952982426de0384fbd9af2e0e7ac3b6acc5b5a3cce3
|
|
| MD5 |
43a48596311554214edb5c5068c88fde
|
|
| BLAKE2b-256 |
5c8e94389f22f4cae74948ddc74d3c130cf97062bbcae41d6a48ce72c75c4471
|