Difference between revisions of "Talk:Notifier.pl"

From Organic Design wiki
(Our notifier rules are in Config:Notifier)
Line 3: Line 3:
  
 
== Rules ==
 
== Rules ==
The rules are defined as a list of items and can reside in a location available from any of the protocols it's set up to read from.
+
The rules are defined as a list of items and can reside in a location available from any of the protocols it's set up to read from. Currently the rules must be bullet lists of 6 items as follows. Each set of these six items found in the rules resource will become an active task in the schedule. Our notifier rules are in [[Config:Notifier]].
  
 
=== Rule Items ===
 
=== Rule Items ===
 
*Schedule: pattern to be applied to localtime
 
*Schedule: pattern to be applied to localtime
*Source: FS, URL, POP
+
*Source: URL (file, http, mediawiki, pop3
*Extraction pattern: Extracts the information from the received content
+
*Match: Regular expression to determine information to extract from source
 +
*Target: URL (file, mediawiki, mailto, irc)
 
*Message: containing $n args
 
*Message: containing $n args
*Target: FS, Wiki, POP, IRC
+
*Comment: containing $n args (optional, used by some protocols like wiki or svn)
  
== Example Usage ==
+
== Example Uses ==
 
*SVN changes sent to chat room
 
*SVN changes sent to chat room
 
*Changes to files appended to a log file
 
*Changes to files appended to a log file
Line 18: Line 19:
 
*Changed articles written to files
 
*Changed articles written to files
 
*Price of a product changing shows up in wiki changes
 
*Price of a product changing shows up in wiki changes
 
== Development Notes ==
 
A standard method of specifying resources needs to be adopted and a function made which accepts these resource descriptions and then interfaces with the necessary code such as [[wiki.pl]] and the new [[irc.pl]].
 

Revision as of 09:27, 22 June 2008

Template:Project We need utility which runs as a daemon and uses a set of rules specifying information sources to be checked on a schedule. It will be a Perl daemon based on the wikid.pl code.

Rules

The rules are defined as a list of items and can reside in a location available from any of the protocols it's set up to read from. Currently the rules must be bullet lists of 6 items as follows. Each set of these six items found in the rules resource will become an active task in the schedule. Our notifier rules are in Config:Notifier.

Rule Items

  • Schedule: pattern to be applied to localtime
  • Source: URL (file, http, mediawiki, pop3
  • Match: Regular expression to determine information to extract from source
  • Target: URL (file, mediawiki, mailto, irc)
  • Message: containing $n args
  • Comment: containing $n args (optional, used by some protocols like wiki or svn)

Example Uses

  • SVN changes sent to chat room
  • Changes to files appended to a log file
  • Changed files syncronised to wiki article
  • Changed articles written to files
  • Price of a product changing shows up in wiki changes