https://github.com/krmbzds/qf
Extract substrings from a block of text
https://github.com/krmbzds/qf
productivity-tools regular-expressions rubygem search substring-search unix-command
Last synced: 7 months ago
JSON representation
Extract substrings from a block of text
- Host: GitHub
- URL: https://github.com/krmbzds/qf
- Owner: krmbzds
- License: mit
- Archived: true
- Created: 2016-01-23T11:14:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-24T12:23:42.000Z (over 9 years ago)
- Last Synced: 2024-10-20T12:19:47.863Z (12 months ago)
- Topics: productivity-tools, regular-expressions, rubygem, search, substring-search, unix-command
- Language: Ruby
- Homepage: https://rubygems.org/gems/qf
- Size: 79.1 KB
- Stars: 8
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ![fq-logo][logo] qf
[](https://travis-ci.org/krmbzds/qf)
[](https://codeclimate.com/github/krmbzds/qf)
[](https://rubygems.org/gems/qf)**qf** is a Ruby gem that extracts specific substrings from a block of text.
**qf** is a productivity tool, it behaves like a standard Unix application and can be chained with other Unix commands.
It helps you extract:
* Emails
* URLs
* Magnet Links
* IPv4 & IPv6 Addressses
* Credit Card Numbers.. and **much more** from any stream with flexibility and convenience.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'qf'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install qf
## Examples
**qf** behaves like a standard Unix application.
Let's say you want to extract URLs from a website:
```sh
curl kerembozdas.com | qf url
```Emails from some contact page:
```sh
curl linux.com/contact | qf email
```Or extract and save credit card numbers from a csv file:
```sh
cat customers.csv | qf creditcard > customer_ccn.txt
```To see all the options you can use:
```sh
qf --list
```## Usage
```
Usage: qf [filter]Options
-h, --help Prints this help page
-l, --list Lists available filtersExamples
qf url
qf magnet
qf creditcard
qf ipv4This application uses standard input and output.
```## Contributing
1. Fork it (https://github.com/krmbzds/qf/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request**Hint:** You can add new rules to the `rules.rb` file.
## Trivia
**qf** (pronounced as **/kjuː eff/**) is short for **quick fetch**, or **quick find**.
However, similar to how people pronounce **SQL** as **sequel**, the author likes to pronounce **qf** as **queef**.## License
The MIT License (MIT)
Copyright (c) 2016 Kerem Bozdas[logo]: http://i.imgur.com/PQxBoRI.png