a violet pig being the logo of this site

gboquotes – retrieve quotes from GBO

gboquotes gives you the quotes out of GBO! And prints them nicely formatted on your console.

Usage

gboquotes has six actions, which let you fetch quotes from GBO. If no action is specified, the default from the action setting is performed.

-t, --toprandom
Prints a random selection of the best quotes at GBO.
-r, --random
Prints a random selection of all quotes at GBO.
-l, --latest
Prints the latest quotes at GBO.
-w, --worst
Prints the worst of all quotes at GBO (why would someone want to see these?)
-b, --best
Prints the truely best quotes of GBO.
-i [id, ...], --id [id, ...]
Prints the quotes with the specified ids. This is useful, if you want to print your personal all-time favourites. Yes, I know, that no one can remember silly numbers, that’s what you the gbofavs script for!

There are two other options, which are not really important, but definitely nice to now:

-c [{auto,always,yes,y,never,no,n}], --color [{auto,always,yes,y,never,no,n}]

Tells gboquotes, whether to use colored output or not. If this option is not given, coloring depends on the color setting.

If auto is specified, coloring depends on the capabilites of your terminal. On windows, colored output is disabled, since the windows console is a poor, dumb terminal. On other systems, colored output is enabled, if you’re running on a tty. Note, that this means, that redirections like gboquotes > foobar will disable colored output! If you want colors in your file, you must explicitly enable them.

If no argument is given, colored output is enabled. Note, that if your terminal doesn’t supported ANSI color sequences, you will weird stuff in the output, since ANSI color sequences are not interpreted.

-d format, --date-fmt format
Defines the format of dates. If this option is not specified, date format depends the dateformat setting. It understands strftime-like format.

Configuration

gboquotes reads ~/.gbo/gboquotesrc at startup. This configuration file knows four configuration values:

dateformat
Sets the default date format. Like the -d it understands strftime-like format. The default is %x %X, which formats date and time according to your locale settings.
color
Sets the default for colored output. Understands the same values as the -c option. The default is auto.
action

Sets the default action. The following actions may be set through this option:

  • toprandom: Same as -t.
  • random: Same as -r.
  • latest: Same as -l.
  • worst: Same as -w.
  • best: Same as -b.

The default action is latest.

Example

I don’t need seconds in the time formatting and don’t like to always see the latest quotes. Instead I prefer a random selection of the best ones. Therefore my configuration file looks like the following:

action=toprandom
dateformat=%x %H:%M

Table Of Contents

Previous topic

gboquotes – Get the quotes out of GBO

Next topic

gbofavs – manage your favourite quotes

This Page