[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

krmbzds/qf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fq-logo qf

Travis Code Climate Gem

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:

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:

curl kerembozdas.com | qf url

Emails from some contact page:

curl linux.com/contact | qf email

Or extract and save credit card numbers from a csv file:

cat customers.csv | qf creditcard > customer_ccn.txt

To see all the options you can use:

qf --list

Usage

Usage: qf [filter]

Options
 -h, --help       Prints this help page
 -l, --list       Lists available filters

Examples
  qf url
  qf magnet
  qf creditcard
  qf ipv4

This 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