Skip to main content

This tool reads files or stdin and outputs random lines.

Project description

randfilter

This tool reads files or stdin and outputs random lines.

randfilter is tested with Python 2.6, 2.7, 3.2, 3.3.

Requirements

  • Python 2.6 / 2.7 / 3.2 / 3.3 or higher

  • docopt==0.6.1

  • schema==0.2.0

Installation

Install from pypi

easy_install randfilter

or

pip install randfilter

Install from github

git clone https://github.com/ton1517/randfilter.git
cd randfilter
python setup.py install

Usage

randfilter

Usage:
    randfilter (-n <num> | -p <probability>) [-u | --unorder] [-i | --ignore-empty] [<files>...]
    randfilter -h | --help
    randfilter -v | --version

Options:
    <files>...          Choose and output lines at random in files. If omitted, use stdin.
    -n <num>            The choise number of lines.
    -p <probability>    The choise probability of lines. The value is 0.0 to 1.0.
    -u --unorder        Output lines are unordered.
    -i --ignore-empty   Ignore empty line.
    -h --help           Show this screen.
    -v --version        Show version.

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

randfilter-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file randfilter-1.0.0.tar.gz.

File metadata

  • Download URL: randfilter-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for randfilter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 86ffb81df58dfd6a95f77173679f692cd97956904e17e685f6b403849180f0c3
MD5 8fad371b0da8c9c059c1d9830308e0ab
BLAKE2b-256 7126660cca3f29ade21f06c49401742d3d5291083337eb52ae14b38e8430bd02

See more details on using hashes here.

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