------------------------------------------------------------------------------- Mesg Archive (a persnal quotes/fortune database) I personally written set of scripts I initially wrote 30 years ago (1988) and slowly extended and modified as required over years! ------------------------------------------------------------------------------- Archive... The quotes are stored in a "zip" archive. Though originally I used a "zoo" archive as I came from an Amiga Personal computer environment when I first started my quotes archive. * The quotes are ones I personally liked. * Compression of the file contents, can insert and delete any single file. But most importantly allows me to 'print' a contained file directly to standard output. * The file names of the quotes denote the subjects the quote is about EG:- File "RC-Comp-Error-LostInDir" is a quote from Rick Cook is about computers, and some sort of 'error' and is called "LostInDir" ASIDE: Here is that quote for your interest... What happened, get lost in the directory tree again? -- Rick Cook, "The Wizardry Consulted" Mesgs... I have a script called "mesgs" which lets me add/delete/edit/rename the quotes in the file. By default it extracts quotes in sorted order or a random pick of ones matching a key word (or if that fails any string match). EG: mesgs Kite will give a random 'kite' quote mesgs -v Kite will list the 'kite' quotes available then pick one at random, VERBOSELY. Example... message: Multiple matches found using "Kite" matched by prefix! Kite-AscArt-GroundPass Kite-Dance Kite-Dict-Circoflex Kite-DontFeedTrees Kite-Flight Kite-FlyAm Kite-FlyBeFree Kite-FlyDog Kite-FlyOrNot Kite-GoFlyAKite Kite-GodsHand Kite-KiteEatingTree Kite-LineInvisible Kite-Offering Kite-OldKiters Kite-OutOfSight Kite-Parafauna Kite-SmartTree Kite-TetraFeeling Kite-UFOKite Kite-WindWordsPoem Random Pick : "Kite-WindWordsPoem" ( #202 of 700 ) A Kite is at my fingertips, the wind is in my hair, Poem 'WindWords" by on wing the sound of wind it rips, David Bartholomew oh, nothing can compare. xmesgs... A X windows (Perl-TK) script that lets me see and edit the various message quotes in a X Window. I use it for sorting and re-organising the quotes. signed... Passed the arguments to message and wraps up the results as a signature! prompt> signed Advent Anthony Thyssen ( System Programmer ) ┌────────────────────────────────────────────────────────────────────────────┐ │ A Gods idea of amusement is a Snakes and Ladders game, │ │ with greased rungs. -- Terry Pratchett, "Wyrd Sisters" │ └────────────────────────────────────────────────────────────────────────────┘ Anthony's Castle is his Home https://antofthy.gitlab.io/ mailout... Filter to add a random signature to mail, my mail face, URL etc to outgoing mail if each is not present already. Can also ne used for news! NOTE: this script looks for a line starting with '@' at the bottom with 'message' args for a personal pick of a quote to be added EG: a quote appropriate to the mail! A "@@" does not append a message but adds a special mail header to tell letter re-runs of mailout to NOT append a signature. fake-sendmail... A fake sendmail program for the old 'mail' command to call. filters mail through mailout then calls the REAL sendmail program. I set my old mail to use the fake_sendmail command in my ".mailrc" file with the line set sendmail=$HOME/bin/scripts/fake-sendmail fake-mhsend... Same as last but for the 'send' command used by the 'MH' mail system I use to set it by adding the following line to my ".mh_profile" sendproc: fake-mhsend But now I use a mail editor which calls the mailout script directly I use the MH mail system for most of my mail handling under the control of one of the huge number of graphical MH mail client programs available. By using MH I can switch between any of these mail clients without problems!!! The MH client one I am currently using is called exmh, which has just about every feature you could wish for including BOTH old and new PGP methods. And user choice of editor (very important to me, few client let you pick the editor to use for mail writing!). Summery of scripts and files involved... Files associated mesgs.zip the archive of all my random messages mesgs.list the list of filename in the archive. mesgs.num the next message to send (unless a specific message or group is requested) The other scripts associated... mesgs message archive and selection handling script xmesgs a GUI interface to control the archive. random give a random number in the requested range randomize randomize the lines in a file randomline pick a random line from pipelined file (without knowing how many lines are in the file before hand) signed like mesgs, but wraps the quote as a signature mailout filters mail adding signatures, and headers as appropriate mailedit a Mail editor (wrapper around VI) to also call mailout after editing a mail message (VI could be run in a Xterm) Lets me see what message was selected so I can abort the mail send and re-select something better. fake-sendmail pretends to be sendmail but filters mail through mailout fake-send the MH mail send filter Other binary commands used by scripts zip/unzip archive handling wc count number of messages in filename list sed extracting a specific line from filename list also splitting a mail message for handling grep specific message searching perl-tk GUI perl for "xmesgs" -------------------------------------------------------------------------------