Skip to main content

Block Pruner

How would you go about deleting blocks of [start;end] if the block contains 615 in example.txt ?

example.txt

a
2
start
a
b
615 b
d
end
f
a
g
start
610
h
i
end
b
3
start
e
e
615
s
s
end
a
$ block_pruner --start start --end end --needle 615 example.txt
a
2
f
a
g
start
610
h
i
end
b
3
a

Usage

block_pruner --start start --end end --needle 615 example.txt > out.txt

Development

For help getting started developing check DEVELOPMENT.md

Metadata

Release files for block-pruner 0.0.4

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

Source distribution (sdist)

Source distribution for block-pruner 0.0.4
File Size Uploaded
block_pruner-0.0.4.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for block-pruner 0.0.4
File Interpreter ABI Platform
block_pruner-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / block_pruner-0.0.4.tar.gz

Download URL block_pruner-0.0.4.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c836fdcc0f76d70339ff0be926ef898163a1ad91249ea3aba1077d78cc81f0ed
BLAKE2b-256 checksum
How to use checksums
9672775c0d59b7a338a7088087a12cabfb08a74bc84a05aa144723aebeecc16f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / block_pruner-0.0.4-py3-none-any.whl

Download URL block_pruner-0.0.4-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bf4ebf52eb26de60c9d12859669b4324a6a71959cb4a9a233e7d12dd26251df
BLAKE2b-256 checksum
How to use checksums
911e04e4f6522fc515bd53f46882460f02305c5b26e80e001c9345b9247ec26a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.1

2 release files

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