Giter Club home page Giter Club logo

loot's Introduction

Loot

I wrote loot as a replacement for the fortune command, to avoid needing to run manual commands with root access to update my quotation files. This script relies on some GNU coreutils such as shuf. You may find it useful for printing other random text besides quotations, just bear in mind it has not been heavily tested.

Usage

usage: loot [options] [target file or directory]

Print random quotes or text from within the target file/directory specified. By default entries are delimited by a line containing only the '%' character. The last entry must be terminated by the delimiter as well.

Example:

quotes.txt

"One original thought is worth a thousand mindless quotings."
 -- Diogenes
%
"To be is to do - Socrates

 To do is to be - Sartre

 Do Be Do Be Do - Sinatra"
 -- Kurt Vonnegut
%
"You'll find your fortune fallin' all over town
 Be sure that your umbrella is up-up-up-up-up-upside down"
 -- Louis Prima
%

Options

--help,-h                Show this help text
--number,-n              Number of random entries to print (Default 1)
--input-delimiter,-i     Delimiter separating entries within the text file(s) (Default '%')
--output-delimiter,-o    Delimiter separating printed entries (Default '' for a blank line)
--glob,-g                Glob pattern for matching files within a target directory (All files by default)
--width,-w               Number of columns until output is forced to line-wrap (Default 80)

loot's People

Contributors

bdellaterra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.