Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.4. Tutorial

Set up your projects

For this extension to work, you'll have to create a project record for each project (e.g. each SVN repository) you want to generate reports for.

  1. Create new record of type “StatSVN project”

  2. Enter a title (this is shown in the fron-end plugin)

  3. Enter the repository URL

    1. Use https://domain.tld/svn/projectname/ when using the tags feature (see below)

    2. Use https://domain.tld/svn/projectname/trunk/ when not using the tags feature

  4. Define whether you want to use the tags feature (shows the tags/releases in the chart). If activated, you can leave the default “.*” to show all tags. Or limit that via a regex. See the statsvn website/manual for details on this.

Define the interval, how often this project should be checked for updates and new reports get generated. Note: If the project has not changed (no committs since last run), no new report is generated to save energy.

If you ever need a certain project's statistics to be re-generated immediately instead of waiting for the update interval to pass by, just set the “force report generation” flag. Projects marked like this will be processed before all the others upon the next run of the cron-job.

Set up the report generation

  1. Install the extension from TER

  2. Add some projects (you should have at least one to use that extension)

  3. Install the plugin to the page where your website visitors should find the links to the statistics.

    1. Make sure that the caching_period of this page is either a small amount of time, or disable caching for this single page.

  4. Try to run the command from the shell

    /path_to_www_dir/typo3/cli_dispatch.phpsh statsvn_update

  5. If it works, add a cronjob that runs the script every n minutes.

Set up the log cleanup process

Especially if you run the cronjob to generate reports in short interval of < 1 day, you'll see many many log entries in your database. I think they are nice to be stored for debugging and maybe they should be shown in a BE module or even in the frontend. But do we really need to store them for the next century? I don't think so. And that's why there is a secons CLI which can be run once a week or so, to clean up old log entries.

  1. Try to run the command from the shell (this will delete all log entries except the last 100)

/path_to_www_dir/typo3/cli_dispatch.phpsh statsvn_houseKeeping -max 100

  1. If this is working for you, add a cronjob that runs this script from time to time.