Software releases download functionality
This plugin implements a project release downloader in your Trac installation. This downloader allows your users to download software, such as releases or release candidates. The downloader also maintains statistics of downloads from your Trac installation.
- Presents the user with downloadable files, such as software releases.
- Optionally presents the user with a questionnaire before the download of file(s).
- Captcha antirobot check.
- Maintains statistics on downloads.
- Easy to use administration in the Trac WebAdmin page.
A typical use case would be the release of upgrades to your released software for your external users to download.
See also DownloadsPlugin.
- View on Main list of downloads: see above
- Questionnaire with captcha to get information about user who downloads
- Administration of files for download
- Administration of statistics and questionnaire fill ups
- Statistics of downloads by year
- Statistics of downloads by month
- Statistics of files (releases and categories has this too)
Plugin was tested on Python 2.3, Trac 0.9.6 and Trac 0.10.4. The first successful tests were made on Trac 0.11b1. But note that there may still be some bugs and please report every problem you find.
Planned features and improvements
- Rewrite all templates from ClearSilver to Genshi
- Display and request captcha only first time in session
- Nicer rendering of forms and fix some rendering problems
- Support for searching in files and notes
- Support for Tags
- Some aggregations of data filled in user defined questionnaire
If you have any issues, create a new ticket.
You can download the egg or the full source here:
Here are some screenshots too.
Using Python egg
The easiest way to start using the Downloader plugin is to get download the Python egg into the plugin directory of your project environment. The egg is most probably Python version independent, just rename it, there is still the source package. After that you must turn both modules of Downloader on in WebAdmin/plugins: the Downloader is dependent on WebAdmin plugin. And finally you need to apply the permissions of Downloader to the users. In this case if you like to use PyCaptcha, you must install it yourself, PyCaptcha is dependent on the Python Imaging Library (PIL) so you must download it too.
Using source - installation with PyCaptcha and PIL which are needed for Captcha to work:
easy_install --find-links http://www.pythonware.com/products/pil/ Imaging easy_install PyCaptcha easy_install https://trac-hacks.org/svn/tracdownloaderplugin/0.10/
Using setup.py install An alternative and maybe better way is to download and unpack somewhere the source zip package and then just run "setup.py install" or on Windows maybe better "python setup.py install", or you can just use the easy_install commands written above. Setup just installs TracDownloaderPlugin. If you like to use Captcha tests you have to install PIL and PyCaptcha manually also. Note that PIL is in most Linux distributions package named python-imaging so you don't need to install it by easy install, and you can use your package manager.
Then you must enable both Downloader modules in TracAdmin/Plugins (or enable Downloader components in your environment's
trac.ini file - source bottom) and assign some permissions of downloader to someone and you can start using Downloader plugin:
[components] tracdownloader.admin.downloaderadminpage = enabled tracdownloader.web_ui.downloadermodule = enabled
After the steps above and clicking to any part of Downloader you should be asked about location of directory to store uploaded files. When it is set up, you must Submit that form two times and there can be an exception "DatabaseError: database schema has changed". If this exception is thrown, it is best to restart your http server.
Downloader keeps using ClearSilver as templating system so you have to have it installed. A version of this plugin for the Genshi templating system is under development. Version for Trac 0.11 wasn't too much tested, so if you find errors, please write me a ticket.
If you had problems installing Downloader, please write me a ticket or write the solution of your installation problems here.
Downloader plugin defines the following permissions:
DOWNLOADER_DOWNLOAD: allows user to download things from main part of plugin, if you like to let all users download from Downloader, just get this permission to user anonymous.
DOWNLOADER_STATS: allows user to browse part of statistics in the main module of Downloader (user will be able to see links to statistics in the right top corner of the page).
DOWNLOADER_ADMIN: allows user to upload files, manage files, releases and categories, browse fill up's of questionnaire, delete fill up's of questionnaire and manage settings of Downloader plugin. Note that this permission should never be given to user anonymous!
Downloader plugin provides three types of wiki syntax for referencing of standalone files, whole releases or categories. Each syntax has two possible forms. If syntax is enclosed by square brackets
, you can easily write your own title for item (file, release, category). If the syntax is separated just by spaces, there will be an automatically created link with the name of referenced item (file, release, category).
downloader:5 - Creates link to file with id 5 with its name [downloader:5 click here] - Creates 'click here' link to file with id 5 downloaderrel:23 - Creates link to release with id 23 with its name [downloaderrel:23 click here] - Creates 'click here' link to release with id 23 downloadercat:43 - Creates link to category with id 43 with its name [downloadercat:43 click here] - Creates 'click here' link to category with id 43
If item of that id doesn't exist, a dead link is displayed with title "id not found". If the file was deleted, it still displays its correct name, but does not link to anywhere.
This features are available only if you have Downloader installed in unzipped form. This doesn't work in egg or zip file.
MIME list In tracdownloader directory there is a file mime_list.txt which contains a list of known MIME types for Downloader, you can easily add new ones or delete unneeded ones, if there is no record found for particular file extension in this list, Downloader uses MIME of application/octet-stream.
EDIT QUESTIONNAIRE The file form_data.py contains the structure used to generate the questionnaire before the download of the file. You can easily edit this to get the data you want from your users. There is a description inside this file.
Reset all statistics
To clear all recorded data about downloads and users who downloaded anything by DownloaderPlugin, you can use on your Trac environment database these two SQL commands:
DELETE FROM downloader_downloaded_attributes; DELETE FROM downloader_downloaded;
After executing this all statistics are gone.
- 15874 by rjollos on 2016-09-07 23:52:51
Remove obsolete directory
- 12139 by rjollos on 2012-10-10 03:54:13
Fixed incorrect source code encoding (http://www.python.org/dev/peps/pep-0263/).
- 11235 by rjollos on 2012-02-02 23:12:33
Refs #4299: Fixed
setup.pysyntax error for the 0.10 branch. The 0.10 branch won't be supported. This fix is untested.
04_downloads.png (66.6 KB) - added by 9 years ago.
Main list of Downloads
01_files_admin.png (59.1 KB) - added by 9 years ago.
Administration of files to download
02_settings_admin.png (51.8 KB) - added by 9 years ago.
Settings of Downloader plug-in
03_stats_admin.png (65.4 KB) - added by 9 years ago.
Administration of statistics and questionnaire fill up's
06_year_stats.png (38.4 KB) - added by 9 years ago.
Statistics of downloads by years
05_month_stats.png (39.3 KB) - added by 9 years ago.
Statistics of downloads by months
07_file_stats.png (42.5 KB) - added by 9 years ago.
Statistics of files (releases and categories has this too)
08_questionnaire.png (81.8 KB) - added by 9 years ago.
Questionnaire to get information about user who downloads
Download all attachments as: .zip