]> the.earth.li Git - htag.git/blob - docs/sample-config/sample.htrc
Import Upstream version 0.0.19
[htag.git] / docs / sample-config / sample.htrc
1 #!/does/not/exist/but/fools/vim/perl
2 # Htag.pl 0.0.18 - config file
3 # This file is parsed as Perl by perl.
4
5 ### Global options
6
7 $cfg{'debug'}     = 1;
8 $cfg{'plugindir'} = "~/perl/huggietag/current/plugins";
9 $cfg{'tmpdir'} = "~/.htag/";
10 $cfg{'tmpsigfile'} = "~/.htag/sig";
11 $cfg{'tmptagfile'} = "~/.htag/tag";
12
13 $cfg{'nicedie'}   = 1;  # Wait until return pressed if going to die from
14                         # htag.pl
15
16 #####################################################################
17 ### Multiple Config File support (see docs)                       ###
18 #####################################################################
19
20 # This is my magic to take email addresses out of a file called
21 # ~/.htagrc/notech_addresses and put them into a pattern called
22 # $notech_addresses with "|" between each.
23 # Note that it's not very efficient since it's executed between every
24 # plugin.
25
26 #my $notech_addresses;
27 #my $HOME = $ENV{"HOME"} || $ENV{"LOGDIR"} || (getpwuid($<))[7];
28 #open(NOTECH, "$HOME/.htagrc/notech_addresses")
29 #or htagdie "Could not open $HOME/.htagrc/notech_addresses: $!";
30 #while (<NOTECH>) {
31 #       next if ($_ =~ /^(?:#.*|\s*)$/);
32 #       chomp;
33 #       $_ = quotemeta;
34 #       $notech_addresses .= $_ . "|";
35 #}
36 #close(NOTECH);
37 #$notech_addresses =~ s/\|$//;
38
39 # Some random config stuff for multiple configs
40
41 #$cfg{'changeheaders'} = [
42 #       [ '^Foo: no','^From:.*?(\w+)@earth.li','~/.htagrc/$1' ],
43 #       [ '(?x)^To:.*
44 #               (?:'.$notech_addresses.
45 #               ')','~/.htagrc/notech' ],
46 #       [ '^From:.*@blackcatnetworks\.co\.uk','~/.htagrc/blackcat' ],
47 #       [ '^Cc:.*@blackcatnetworks\.co\.uk','~/.htagrc/blackcat' ],
48 #       [ '', '~/.htagrc/default' ],
49 #       ];
50
51
52 #####################################################################
53 ### plugins/02catsig.pl                                           ###
54 ### Simple Signature output                                       ###
55 #####################################################################
56
57 $cfg{'asksig'}    = 1;
58
59 # I define my sig stuff (sigs or sigdir) in the various changeheaders files
60 # - see sample.htrc.changeheaders.default.  If you don't use changeheaders
61 # you can define your sigs/sigdir here.
62
63 # To add a random signature at the end of the message define the file(s)
64 # containing it here.
65 # @{cfg{'sigs'}} = ( "~/.htsig", "~/.htsig1" );
66
67 # $cfg{'sigdir'} = "~/.sigs/";
68
69 # sigmatch allows you to restrict the sigs in sigdir to all those in the dir
70 # that match sigmatch
71 # e.g.
72 # $cfg{'sigdir'} = "~/.sigs/";
73 # $cfg{'sigmatch'} = '^/home/huggie/\.sigs/(bc-.*|blackcat.*)$';
74 # matches all the sigs in /home/huggie/.sigs/ which start with bc- or
75 # blackcat.
76
77
78 #####################################################################
79 ### plugins/10grep.pl                                             ###
80 ### Choosing a tagline by grepping the messge file                ###
81 #####################################################################
82
83 #$cfg{'grep_debug'} = 0;
84 #$cfg{'grep_debugfile'} = "~/perl/huggietag/grep_debug";
85
86
87 #####################################################################
88 ### examples/10dadadodo.pl                                        ###
89 ### Choosing a tagline by using dadadodo by jwz                   ###
90 ### NB copy to plugins directory first                            ###
91 #####################################################################
92
93 #$cfg{'dadadodo_file'} = "~/Docs/funny/darwin-awards";
94
95
96 #####################################################################
97 ### plugins/06marknlard.pl                                        ###
98 ### Is it x Mark?  Sounds just like y.                            ###
99 #####################################################################
100
101 # attributions file format:
102 # x:y
103 # e.g.:
104 # Buzz Lightyear:him => Is it Buzz Lightyear Mark?  Sounds just like him.
105
106 #$cfg{'attributions'} = "~/perl/huggietag/current/attributions";
107
108
109 #####################################################################
110 ### plugins/08uptime.pl                                           ###
111 ### Give uptime                                                   ###
112 #####################################################################
113
114 $cfg{'uptime_time'} = 1; # Just give "up 365 days, 23:59" not full output.
115
116
117 #####################################################################
118 ### plugins/09date.pl                                             ###
119 ### Print date in any format                                      ###
120 #####################################################################
121
122 # Format of strftime
123 #$cfg{'date_format'} = "%a %b %e %H:%M:%S %Y"; # Default
124 $cfg{'date_format'} = "%d/%m/%Y";
125
126
127 #####################################################################
128 ### plugins/10simple.pl                                           ###
129 ### Pick a tagline from a textfile or use fortune(1)              ###
130 #####################################################################
131
132 # Allows lines that begin with the following character (well regexp if you
133 # *really* like) to be comments and thus ignored.
134
135 $cfg{'tagline_comment_char'} = '#'; 
136
137 # As for the sigs I set these items in the individual changeheaders configs
138 # that come afterwards - see sample.htrc.changeheaders.default for details
139 # or if you don't use changeheaders set one of these:
140
141 # Where is your tagfile?
142 #$cfg{'tagfile'}   = "/usr/local/share/huggietag/taglines.tag";
143 $cfg{'tagfile'} = "~/taglines.tag";
144 #$cfg{'tagfiles'} = ["~/taglines.tag","~/others"];
145
146 # You can also use tagdir to specify a directory of taglines, and tagmatch
147 # to restrict the tagfiles to those that match.
148 # The example below includes all files in /home/huggie/.tags/ except 
149 # /home/huggie/.tags/tech
150
151 #$cfg{'tagmatch'} = '^/home/huggie/.tags/(?!tech$)';
152 #$cfg{'tagdir'} = "~/.tags";
153
154 # Provided by individual configs per message header or by the default.
155
156 #$cfg{'fortune'} = '/usr/games/fortune';
157 # Probability 0 -> 1 of using fortune instead of tagline
158 #$cfg{'fortuneval'} = 0.3;
159 #$cfg{'fortuneargs'} =
160 #'/home/huggie/Scratch/fortunes/matrixfortunes-0.1.0/matrix';
161
162
163 #####################################################################
164 ### plugins/15merge.pl                                            ###
165 ### Merge signature and Tagline                                   ###
166 #####################################################################
167
168 # This *INCLUDES* the length of leader and so should be the width of your
169 # screen minus a few characters
170
171 $cfg{'maxlinelen'} = 76;
172
173 # LEADER is put before every line.
174 # FIRST prefixes the first line
175 # FIRST must be one less character than leader.
176
177 # E.g.
178 # FIRST tagline tagline tagline tagline tagline
179 # LEADERtagline tagline tagline tagline
180
181 $cfg{'first'}  = "... ";
182 $cfg{'leader'} = "    ";
183
184 # How many newlines to insert before putting the tag.
185 # Depends on your sig really.
186
187 $cfg{'newline'} = 1;
188
189
190 #####################################################################
191 ### plugins/25asktag.pl                                           ###
192 ### Ask if you want this tagline                                  ###
193 #####################################################################
194
195 # Do you want to be prompted as to whether you want this tag or just choose
196 # the first one that fits?
197
198 $cfg{'asktag'}    = 1;
199
200
201 #####################################################################
202 ### plugins/35tearline.pl                                         ###
203 ### Simple Tearline output                                        ###
204 #####################################################################
205
206 # A tearline is the last line written out by HuggieTag
207 # If you want to disable it then set it to OFF (no quotes)
208 # SHORT is the prefix (PRETEAR) then HuggieTag and it's version
209 # LONG includes (a random) RANDTEAR after that and " - "
210 # if TEARLINE is OFF then PRETEAR and RANDTEAR may be omitted
211 # if RANDTEAR is omitted and LONG is specified it will default to SHORT
212 # PRETEAR must be three characters long
213
214 $cfg{'tearline'} = "OFF";
215 $cfg{'pretear'} =       "[+]";
216 @{$cfg{'randtear'}} = ( "I'm a tree!",
217                         "Boink!",
218                         "Chocolate!",
219                         "Fear not the penguins.",
220                         "Huggable.",
221                         "Kick the baby!",
222                         );
223
224 # To add a random header at the start of messages define it here:
225
226 @{$cfg{'randhead'}} = ( "Hi \@F,\@B",
227                         "Hiya \@F,\@B",
228                         "Look! It's \@F!\@B",
229                         "'ello \@F\@B",
230                         "Salut \@F!\@B",
231                         );
232
233 #####################################################################
234 ### Leave the 1; below or it'll all die horribly :)               ###
235 #####################################################################
236
237 1;