Modified 2004-04-11 to use post_editor_command instead of editor_command since that works better

Modified 2004-04-29 to include signature compliance guidelines, and a possible line-end pitfall

  1. First, Catch your sigs. Best Sigs (or “tags”) are either random lines that make just as much sense in context as they do out of it, Famous quotes from infamous people, or lines you stole off a website somewhere.
  2. Prepare text files.
    The quotes need to be seperated by % signs, which is a bugger if you’re using ones that are one line per quote. Personally, I’ve got a shell script like this:

    which I can call with “cat $file | fortunate > ~/.sigmonster/$file“.

    It’s important to note that these have to be in unix line format, rather than Dos/Windows (explaination). Plus, Signatures should not be more than four lines and a non-excessive line length (See your group FAQ for guidelines, they do change). Personally I prefix the quote part of my sig with an actual signature, so I have to go though each file and chop each sig to three lines or under.

    Note I’ve put all my sig files in a directory all of their own, this makes life easier. Then we have to make databases of them. There is a util called “strfile” which comes with fortune (which we will be using in a sec) that does this. Make databases of all files (for FILE in ~/.sigmonster/*;do strfile $FILE;done).

  3. Fortune favours the brave
    Now we get fortune to randomly pick a line from any one of those files and display it. Like this: fortune ~/.sigmonster/ (Thoughout this, I’ve used ~/.sigmonster for the directory where I put the files. This is up to you, obviously). If this didn’t work (“fortune:/ not a fortune file or directory“) then something is wrong in step 2
  4. Set your sig
    The first line of your signature will be read from ~/.signature, so I’d recommend putting something in there, probably the stuff you want to remain consistant across sigs. If you don’t want anything to be consistant, make an empty file.
  5. Live and Slrn
    (Yes, these titles are getting worse). In your ~/.slrnrc file, you may have a line saying “set editor_command "vim +'set wm=72' +'set noai' +%d '%s'" or similer. If so, comment it out (prefix it with “%”) and below that put in the following:

    set post_editor_command "FILE='%s';vim +'set wm=72' +'set noai' +%d $FILE;cat .signature >> $FILE; /usr/games/fortune ~/.sigmonster/ >> $FILE"

    If you’re feeling brave, you can merge your existing line with the new one, but I’d try mine first if I were you 🙂

  6. The Explaination
    The post_editor_command declaration specifies what slrn is to do in the event of something needing to be edited – a message, for example. What I did there was replace the command with a script that edits the file, tacks a sig onto the end of it and sends it back to slrn for posting. The downsides of that script are that you don’t see the sig before posting. That’s because my setup has an auto-post formatter that makes my attributions right, but screws up my sig something chronic, so I have to add the sig afterwards. You could do it the other way around (tack on the sig then do the editing) by having this editor_command instead:

    set post_editor_command "FILE='%s';cat .signature >> $FILE; /usr/games/fortune ~/.sigmonster/ >> $FILE";vim +'set wm=72' +'set noai' +%d $FILE