- Timestamp:
- Jan 12, 2013, 1:43:31 PM (12 years ago)
- Parents:
- 4626016 (diff), 7869e48 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- examples
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/owlconf.erik
rd7cc50b r7869e48 1 ### The owlconf config file -*- perl -*- 1 ### The owlconf config file -*- perl -*- 2 2 ### 3 3 ### !!!!!WARNING!!!!! !!!!!WARNING!!!!! !!!!!WARNING!!!!! !!!!!WARNING!!!!! 4 ### This is an example file intended to demonstrate how to use 4 ### This is an example file intended to demonstrate how to use 5 5 ### various features of owl. Some of the key bindings, in particular, 6 6 ### are more for examples than things you may actually want to use. … … 30 30 ### The message attributes may be dereferenced with $m->attribute 31 31 ### 32 ### 32 ### 33 33 34 34 # tokens for sepbar are: … … 122 122 } 123 123 124 # Load in things which don't belong in an owlconf 124 # Load in things which don't belong in an owlconf 125 125 # that people might use as an example... 126 126 sub personal_startup { … … 231 231 sepbartokens_add("<$sender"); 232 232 sepbartokens_trim(">$sender"); 233 } 233 } 234 234 } elsif ($m->is_mail) { 235 235 mail_add_message($m); … … 249 249 my ($b) = @_; 250 250 $b=~s/^/ /g; 251 $b=~s/\n/\n /g; 251 $b=~s/\n/\n /g; 252 252 return $b; 253 253 } … … 282 282 } 283 283 284 if (!$m->is_zephyr && !$m->is_aim) { 284 if (!$m->is_zephyr && !$m->is_aim) { 285 285 return "Unknown message type: ".$m->type."\n"; 286 286 } … … 308 308 309 309 if ($m->is_zephyr) { 310 $out = sprintf "[mit,%s,%s] / %s / %s", lc($m->class), 310 $out = sprintf "[mit,%s,%s] / %s / %s", lc($m->class), 311 311 lc($m->instance), $m->time, lc($m->host); 312 312 if ($m->opcode ne "") {$out.=" op:".$m->opcode;} … … 322 322 } 323 323 } 324 $out.="\n"; 324 $out.="\n"; 325 325 } else { 326 326 $out = sprintf "[%s] / %s\n", lc($m->type), $m->time; 327 327 $out.= " \@bold($sender)> "; 328 $out.="\n"; 328 $out.="\n"; 329 329 } 330 330 … … 380 380 } 381 381 382 if (!$m->is_zephyr && !$m->is_aim) { 382 if (!$m->is_zephyr && !$m->is_aim) { 383 383 return "Unknown message type: ".$m->type."\n"; 384 384 } … … 402 402 } 403 403 return "$out\n"; 404 404 405 405 } elsif ($m->is_zephyr && $m->is_mail) { 406 406 my $body = $m->body; … … 414 414 my $channel = ""; 415 415 my $body = $m->body; 416 416 417 417 if ($m->is_zephyr) { 418 418 my $inst = $m->instance; … … 459 459 } 460 460 for my $w (@words) { 461 if (($outline ne "") 461 if (($outline ne "") 462 462 && (length($outline)+length($w) > $width-$unindent)) { 463 463 $out .= $outline."\n"; … … 472 472 $outline .= $w; 473 473 } 474 $out .= $outline . "\n"; 475 } 474 $out .= $outline . "\n"; 475 } -
examples/owlconf.simple
rd7cc50b r7869e48 1 ### The owlconf config file -*- perl -*- 1 ### The owlconf config file -*- perl -*- 2 2 3 3 ### !!!!!WARNING!!!!! !!!!!WARNING!!!!! !!!!!WARNING!!!!! !!!!!WARNING!!!!! 4 ### This is an example file intended to demonstrate how to use 4 ### This is an example file intended to demonstrate how to use 5 5 ### various features of owl. Some of the key bindings, in particular, 6 6 ### are more for examples than things you may actually want to use. … … 36 36 ### $owl::sender, $owl::opcode, $owl::zsig, 37 37 ### $owl::msg, $owl::time, $owl::host, @owl::fields, $owl::id 38 ### 38 ### 39 39 40 40 # NOTE: Lines beginning with a "#" are perl comments. … … 49 49 ## Doing "help" will show you more about each variable. 50 50 ## These lines will set things to the default. 51 ## You can uncomment them and then change the value to get 51 ## You can uncomment them and then change the value to get 52 52 ## a different behavior (remove the "#" to an alternate value). 53 53 ################################################################ … … 60 60 61 61 ## Set this to on to enable logging of personal zephyrs 62 # owl::command('set -q logging off'); 62 # owl::command('set -q logging off'); 63 63 64 64 ## This directory must exist and is where personal zephyrs are logged. … … 67 67 68 68 ## Set this to on to enable logging of classes 69 # owl::command('set -q classlogging off'); 69 # owl::command('set -q classlogging off'); 70 70 71 71 ## This directory must exist and is where class zephyrs are logged. … … 105 105 ################################################################ 106 106 ## The following create filters. Filters can be used to select 107 ## on multiple zephyrs for operations. With 'views' you can 107 ## on multiple zephyrs for operations. With 'views' you can 108 108 ## look at only the zephyrs matching a particular filter. 109 109 ## Use the 'view <filtername>' command or the 'v' key to switch views. … … 114 114 ## The filter command creates a filter with the specified name, 115 115 ## or if one already exists it is replaced. Example filter 116 ## syntax would be: 116 ## syntax would be: 117 117 ## 118 118 ## filter myfilter -c red ( class ^foobar$ ) or ( class ^quux$ and instance ^bar$ ) … … 123 123 ## is used it specifies the color that messages matching this filter 124 124 ## should be displayed in. Do 'show colors' to see the available colors. 125 ## 125 ## 126 126 ################################################################ 127 127 … … 137 137 ## The 'trash' filter is used when you press 'T' to mark things 138 138 ## for autodeletion. 139 # owl::command('filter trash class ^mail$ or opcode ^ping$ or type ^admin$ or class ^login$'); 139 # owl::command('filter trash class ^mail$ or opcode ^ping$ or type ^admin$ or class ^login$'); 140 140 141 141 } … … 188 188 ## Note that: 189 189 ## $out .= "foo"; appends "foo" to the end of the variable $out. 190 ## lc(bar) will convert bar to lowercase. 190 ## lc(bar) will convert bar to lowercase. 191 191 ## "ne" does "not equal" for string comparison. 192 192 ## sprintf fills in the %s's with the arguments later on the line. … … 213 213 # Incoming messages 214 214 215 $out .= sprintf "[mit,%s,%s] / %s / %s", lc($owl::class), 215 $out .= sprintf "[mit,%s,%s] / %s / %s", lc($owl::class), 216 216 lc($owl::instance), $owl::time, lc($owl::host); 217 217 if ($owl::opcode ne "") {$out.=" op:$owl::opcode";} … … 228 228 } 229 229 } 230 $out.="\n"; 230 $out.="\n"; 231 231 232 232 # This indents the body of the message and then appends it on. … … 251 251 ## In most cases you won't need anything here. 252 252 sub owl::receive_msg() { 253 253 254 254 ## If this is uncommented, it would mark all messages 255 255 ## with opcode "PING" for immediate deletion: -
examples/owlconf.vtformat
rd7cc50b r7869e48 1 ### The owlconf config file -*- perl -*- 1 ### The owlconf config file -*- perl -*- 2 2 ### 3 3 ### This file is interpreted by the perl interpreter. … … 23 23 ### $owl::sender, $owl::opcode, $owl::zsig, 24 24 ### $owl::msg, $owl::time, $owl::host, @owl::fields 25 ### 25 ### 26 26 27 27 # classes will be appreviated this way … … 124 124 } 125 125 for my $w (@words) { 126 if (($outline ne "") 126 if (($outline ne "") 127 127 && (length($outline)+length($w) > $width-$unindent)) { 128 128 $out .= $outline."\n"; … … 137 137 $outline .= $w; 138 138 } 139 $out .= $outline . "\n"; 139 $out .= $outline . "\n"; 140 140 }
Note: See TracChangeset
for help on using the changeset viewer.