Opened 16 years ago

Last modified 5 years ago

#712 new defect

A plugin to run a command line program for every displayed page

Reported by: omry Owned by: anybody
Priority: normal Component: Request-a-Hack
Severity: normal Keywords:
Cc: Trac Release: 0.10


I am working on a php statistics system called FireStats and I would like to use it to monitor trac usage. I require a plugin that will allow me to excute a commnad line program for every displayed page. that alone would be a great start, but it will be even better if it will include some sort of macro support: the command line to execute (which should of course come from the configuration file) may contain special constants which will be replaced by run time parameters, for example: %REMOTE_ADDR = the ip address of the remote user %REFERER = the referer of the current user %USER_AGENT = the user agent of the user %REQUEST_URI = the requested page uri and so on, as required by users. those will be used like this: [prog_exec] cmd=php -r "echo %REMOTE_ADDR;"

the plugin will replace %REMOTE_ADDR with the ip of the current user. etc.

Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by Noah Kantrowitz

This is trivial to write as a pre/post request filter, but I think the performance hit would be prohibitive.

comment:2 Changed 5 years ago by figaro

See also FireStatsPlugin

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain anybody.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.