Opened 8 years ago

Last modified 8 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:
cmd=php -r "echo %REMOTE_ADDR;"

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

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by coderanger

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

Add Comment

Modify Ticket

as new .

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

Note: See TracTickets for help on using tickets.