Ticket #3551 (assigned enhancement)

Opened 2 years ago

Last modified 5 months ago

[Patch] Automatic insertion and removal of dowloads from server directory.

Reported by: rudd-o@rudd-o.com Assigned to: Blackhex (accepted)
Priority: normal Component: DownloadsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

I've written a replacement api.py for version 0.10 trac that you can use, it auto-detects new files in the releases directory and adds them to the downloads list, and it also removes nonexistent files. It also uses heuristics to guess several columns for the download table. The code explains itself

Attachments

api.py (33.9 kB) - added by rudd-o@rudd-o.com on 08/14/08 00:37:52.
Replacement api.py
TracDownloads-api.py.patch (4.1 kB) - added by rudd-o@rudd-o.com on 08/20/08 00:38:52.
patch for 0.11
TracDownloads-api.py.2.patch (4.2 kB) - added by rudd-o@rudd-o.com on 08/20/08 03:45:25.
new patch
TracDownloads-api.py.3.patch (4.5 kB) - added by rudd-o@rudd-o.com on 08/20/08 04:16:10.
this patch sorts in REVERSE by default, as you generally want the top downloads to be the most recent ones

Change History

08/14/08 00:37:52 changed by rudd-o@rudd-o.com

  • attachment api.py added.

Replacement api.py

08/14/08 01:18:30 changed by Blackhex

  • status changed from new to assigned.

Thanks a lot, I'll apply it to repository sequentally.

08/20/08 00:38:52 changed by rudd-o@rudd-o.com

  • attachment TracDownloads-api.py.patch added.

patch for 0.11

08/20/08 00:39:17 changed by rudd-o@rudd-o.com

I added a patch for 0.11. Works fine.

Hey, your package doesnt have a manifest.in file, it makes impossible to build RPM because the templates and htdocs do not get included! Watch out!

I have RPMs built correctly too.

08/20/08 03:45:25 changed by rudd-o@rudd-o.com

  • attachment TracDownloads-api.py.2.patch added.

new patch

08/20/08 03:45:50 changed by anonymous

I added a patch that sorts files added by date, to mimic the original semantics of the application.

08/20/08 04:16:10 changed by rudd-o@rudd-o.com

  • attachment TracDownloads-api.py.3.patch added.

this patch sorts in REVERSE by default, as you generally want the top downloads to be the most recent ones

10/23/08 17:17:15 changed by Paresh.Solanki@BellFruitGames.co.uk

I like both auto upload and having recent files at the top.

Do they need to be applied sequentially, or do I just need the last one?

I'm currently using 0.2 of this plugin on Trac 0.11 and it works fine.

04/27/09 14:55:14 changed by Blackhex

  • summary changed from Downloads plugin requires too much manual intervention to PATCH: Automatic insertion and removal of dowloads from server directory..

I won't apply the patch in this state since there has to be preserved downloads in directories per ID for unique_filename = false and because it's rather obsolete. I also don't understand what that multikeys stuff does.

10/30/09 21:42:09 changed by rjollos

  • summary changed from PATCH: Automatic insertion and removal of dowloads from server directory. to [Patch] Automatic insertion and removal of dowloads from server directory..

Add/Change #3551 ([Patch] Automatic insertion and removal of dowloads from server directory.)




Change Properties
Action