I have writ­ten a rel­a­tive­ly sim­ple CGI script that gen­er­ates a ran­dom quote, much like the Unix “for­tune” pro­gram, but with ty­po­graph­i­cal­ly more pleas­ing out­put. It us­es groff with Adobe Gara­mond at 12 points for the type­set­ting, which gen­er­ates Post­Script that is made in­to EPS and con­vert­ed to PDF with Ghost­script. Af­ter that, it is con­vert­ed to com­pressed SVG with pdf2svg and gzip.

In or­der to make the im­age match the pix­el den­si­ty of your dis­play, or to sim­ply zoom in or out, use the CGI pa­ra­me­ter d=<den­si­ty>, like so:


The unit is PPI (pix­els per inch), and the de­fault val­ue is 100.

NOTE: If you click on the im­age, you will get a HTML rep­re­sen­ta­tion of the quote. It won’t be per­fect, but it will at least let you copy and paste the text.

Fetching a Specific Quote

The num­ber of the quote and the to­tal num­ber of quotes in the quote data­base are shown in the ti­tle; you can fetch a spe­cif­ic quote by us­ing the CGI pa­ra­me­ter n=<num­ber>, like so:



You can search for quotes con­tain­ing spe­cif­ic text by us­ing the CGI pa­ra­me­ter s=<regex>, like so:


Match­ing quotes will have a di­rect link with the quote num­ber in­side brack­ets at the top.