Skip to main content

A python CLI tool that allows you to extract certain lines from text files and transfer them to another file

Project description

Line Extractor

Line Extractor is a Python CLI for extracting certain lines from text files given specified rules.

Why you should use this CLI tool

If you're trying to read through thousands of lines of logs or just want to see every time the word "Donkey" shows up in the Shrek movie script this tool can help you do that. Instead of greping with regex you can use a more intutive CLI.

I created this tool because I got tired of reading through EC2 logs finding the lines beginning with certain phrases or ending with other phrases. So if this tool helps you out feel free to let me know!

Installation

Use the package manager pip to install Line Extractor.

pip install lineExtractor

Usage

General Format

lineExtractor [Options] source_file destination_file

Open the help menu

lineExtractor -h

Get all lines that contain the word "bee" and put them into output.txt

lineExtractor -c bee beeMovie.txt output.txt

Get all lines that start with "Hello" regardless of casing and put them into hello.txt

lineExtractor -b Hello -i speech.txt hello.txt

Contributing

Github

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Author

Kyle Van Landingham

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

lineExtractor-0.0.2.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file lineExtractor-0.0.2.tar.gz.

File metadata

  • Download URL: lineExtractor-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3

File hashes

Hashes for lineExtractor-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f484a9fd4f8b64d23da5df979f319f537742b6ece8f54237b4fab12ecc3b4659
MD5 2489c94b3bcca327b278fa421111a1dc
BLAKE2b-256 c131ddc4ef89fe1e86e817907816917bca3a5f6cdac5b8bcf1bb2894a7ca5cec

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