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 hashes)

Uploaded Source

Supported by

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