This is a sample htrc file as used by the HtagHowto

# Htag.pl 0.0.18 - config file
# This file is parsed as Perl by perl.

### Global options

$cfg{'debug'}     = 1;
$cfg{'plugindir'} = "~/perl/huggietag/current/plugins";
$cfg{'tmpdir'} = "~/.htag/";
$cfg{'tmpsigfile'} = "~/.htag/sig";
$cfg{'tmptagfile'} = "~/.htag/tag";

$cfg{'nicedie'}   = 1;  # Wait until return pressed if going to die from
                        # htag.pl

#####################################################################
### Multiple Config File support (see docs)                       ###
#####################################################################

# This is my magic to take email addresses out of a file called
# ~/.htagrc/notech_addresses and put them into a pattern called
# $notech_addresses with "|" between each.
# Note that it's not very efficient since it's executed between every
# plugin.

#my $notech_addresses;
#my $HOME = $ENV{"HOME"} || $ENV{"LOGDIR"} || (getpwuid($<))[7];
#open(NOTECH, "$HOME/.htagrc/notech_addresses")
#or htagdie "Could not open $HOME/.htagrc/notech_addresses: $!";
#while (<NOTECH>) {
#       next if ($_ =~ /^(?:#.*|\s*)$/);
#       chomp;
#       $_ = quotemeta;
#       $notech_addresses .= $_ . "|";
#}
#close(NOTECH);
#$notech_addresses =~ s/\|$//;

# Some random config stuff for multiple configs

#$cfg{'changeheaders'} = [
#       [ '^Foo: no','^From:.*?(\w+)@earth.li','~/.htagrc/$1' ],
#       [ '(?x)^To:.*
#               (?:'.$notech_addresses.
#               ')','~/.htagrc/notech' ],
#       [ '^From:.*@blackcatnetworks\.co\.uk','~/.htagrc/blackcat' ],
#       [ '^Cc:.*@blackcatnetworks\.co\.uk','~/.htagrc/blackcat' ],
#       [ '', '~/.htagrc/default' ],
#       ];


#####################################################################
### plugins/02catsig.pl                                           ###
### Simple Signature output                                       ###
#####################################################################
$cfg{'asksig'}    = 1;

# I define my sig stuff (sigs or sigdir) in the various changeheaders files
# - see sample.htrc.changeheaders.default.  If you don't use changeheaders
# you can define your sigs/sigdir here.

# To add a random signature at the end of the message define the file(s)
# containing it here.
# @{cfg{'sigs'}} = ( "~/.htsig", "~/.htsig1" );

# $cfg{'sigdir'} = "~/.sigs/";

# sigmatch allows you to restrict the sigs in sigdir to all those in the dir
# that match sigmatch
# e.g.
# $cfg{'sigdir'} = "~/.sigs/";
# $cfg{'sigmatch'} = '^/home/huggie/\.sigs/(bc-.*|blackcat.*)$';
# matches all the sigs in /home/huggie/.sigs/ which start with bc- or
# blackcat.


#####################################################################
### plugins/10grep.pl                                             ###
### Choosing a tagline by grepping the messge file                ###
#####################################################################

#$cfg{'grep_debug'} = 0;
#$cfg{'grep_debugfile'} = "~/perl/huggietag/grep_debug";


#####################################################################
### examples/10dadadodo.pl                                        ###
### Choosing a tagline by using dadadodo by jwz                   ###
### NB copy to plugins directory first                            ###
#####################################################################

#$cfg{'dadadodo_file'} = "~/Docs/funny/darwin-awards";


#####################################################################
### plugins/06marknlard.pl                                        ###
### Is it x Mark?  Sounds just like y.                            ###
#####################################################################

# attributions file format:
# x:y
# e.g.:
# Buzz Lightyear:him => Is it Buzz Lightyear Mark?  Sounds just like him.

#$cfg{'attributions'} = "~/perl/huggietag/current/attributions";

#####################################################################
### plugins/08uptime.pl                                           ###
### Give uptime                                                   ###
#####################################################################

$cfg{'uptime_time'} = 1; # Just give "up 365 days, 23:59" not full output.


#####################################################################
### plugins/09date.pl                                             ###
### Print date in any format                                      ###
#####################################################################

# Format of strftime
#$cfg{'date_format'} = "%a %b %e %H:%M:%S %Y"; # Default
$cfg{'date_format'} = "%d/%m/%Y";


#####################################################################
### plugins/10simple.pl                                           ###
### Pick a tagline from a textfile or use fortune(1)              ###
#####################################################################

# Allows lines that begin with the following character (well regexp if you
# *really* like) to be comments and thus ignored.

$cfg{'tagline_comment_char'} = '#'; 

# As for the sigs I set these items in the individual changeheaders configs
# that come afterwards - see sample.htrc.changeheaders.default for details
# or if you don't use changeheaders set one of these:

# Where is your tagfile?
#$cfg{'tagfile'}   = "/usr/local/share/huggietag/taglines.tag";
$cfg{'tagfile'} = "~/taglines.tag";
#$cfg{'tagfiles'} = ["~/taglines.tag","~/others"];

# You can also use tagdir to specify a directory of taglines, and tagmatch
# to restrict the tagfiles to those that match.
# The example below includes all files in /home/huggie/.tags/ except 
# /home/huggie/.tags/tech

#$cfg{'tagmatch'} = '^/home/huggie/.tags/(?!tech$)';
#$cfg{'tagdir'} = "~/.tags";

# Provided by individual configs per message header or by the default.

#$cfg{'fortune'} = '/usr/games/fortune';
# Probability 0 -> 1 of using fortune instead of tagline
#$cfg{'fortuneval'} = 0.3;
#$cfg{'fortuneargs'} =
#'/home/huggie/Scratch/fortunes/matrixfortunes-0.1.0/matrix';

#####################################################################
### plugins/15merge.pl                                            ###
### Merge signature and Tagline                                   ###
#####################################################################

# This *INCLUDES* the length of leader and so should be the width of your
# screen minus a few characters

$cfg{'maxlinelen'} = 76;

# LEADER is put before every line.
# FIRST prefixes the first line
# FIRST must be one less character than leader.

# E.g.
# FIRST tagline tagline tagline tagline tagline
# LEADERtagline tagline tagline tagline

$cfg{'first'}  = "... ";
$cfg{'leader'} = "    ";

# How many newlines to insert before putting the tag.
# Depends on your sig really.

$cfg{'newline'} = 1;


#####################################################################
### plugins/25asktag.pl                                           ###
### Ask if you want this tagline                                  ###
#####################################################################

# Do you want to be prompted as to whether you want this tag or just choose
# the first one that fits?

$cfg{'asktag'}    = 1;


#####################################################################
### plugins/35tearline.pl                                         ###
### Simple Tearline output                                        ###
#####################################################################

# A tearline is the last line written out by HuggieTag
# If you want to disable it then set it to OFF (no quotes)
# SHORT is the prefix (PRETEAR) then HuggieTag and it's version
# LONG includes (a random) RANDTEAR after that and " - "
# if TEARLINE is OFF then PRETEAR and RANDTEAR may be omitted
# if RANDTEAR is omitted and LONG is specified it will default to SHORT
# PRETEAR must be three characters long

$cfg{'tearline'} = "OFF";
$cfg{'pretear'} =       "[+]";
@{$cfg{'randtear'}} = ( "I'm a tree!",
                        "Boink!",
                        "Chocolate!",
                        "Fear not the penguins.",
                        "Huggable.",
                        "Kick the baby!",
                        );

# To add a random header at the start of messages define it here:

@{$cfg{'randhead'}} = ( "Hi \@F,\@B",
                        "Hiya \@F,\@B",
                        "Look! It's \@F!\@B",
                        "'ello \@F\@B",
                        "Salut \@F!\@B",
                        );

TheEarthWiki: SampleHtagRC (last edited 2008-02-19 15:39:26 by localhost)