Modify

Opened 6 years ago

Last modified 9 months ago

#3551 assigned enhancement

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

Reported by: rudd-o@… Owned by: rjollos
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 (4)

api.py (33.9 KB) - added by rudd-o@… 6 years ago.
Replacement api.py
TracDownloads-api.py.patch (4.1 KB) - added by rudd-o@… 6 years ago.
patch for 0.11
TracDownloads-api.py.2.patch (4.2 KB) - added by rudd-o@… 6 years ago.
new patch
TracDownloads-api.py.3.patch (4.5 KB) - added by rudd-o@… 6 years ago.
this patch sorts in REVERSE by default, as you generally want the top downloads to be the most recent ones

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by rudd-o@…

Replacement api.py

comment:1 Changed 6 years ago by Blackhex

  • Status changed from new to assigned

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

Changed 6 years ago by rudd-o@…

patch for 0.11

comment:2 Changed 6 years ago by rudd-o@…

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.

Changed 6 years ago by rudd-o@…

new patch

comment:3 Changed 6 years ago by anonymous

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

Changed 6 years ago by rudd-o@…

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

comment:4 Changed 6 years ago by Paresh.Solanki@…

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.

comment:5 Changed 5 years ago 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.

comment:6 Changed 5 years ago 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.

comment:7 Changed 9 months ago by rjollos

  • Owner changed from Blackhex to rjollos

Add Comment

Modify Ticket

Action
as assigned .
Author


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

 
Note: See TracTickets for help on using tickets.