Modify

Opened 9 years ago

Last modified 4 months ago

#3551 new enhancement

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

Reported by: rudd-o@… Owned by:
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@… 9 years ago.
Replacement api.py
TracDownloads-api.py.patch (4.1 KB) - added by rudd-o@… 9 years ago.
patch for 0.11
TracDownloads-api.py.2.patch (4.2 KB) - added by rudd-o@… 9 years ago.
new patch
TracDownloads-api.py.3.patch (4.5 KB) - added by rudd-o@… 9 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 (13)

Changed 9 years ago by rudd-o@…

Attachment: api.py added

Replacement api.py

comment:1 Changed 9 years ago by Radek Bartoň

Status: newassigned

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

Changed 9 years ago by rudd-o@…

Attachment: TracDownloads-api.py.patch added

patch for 0.11

comment:2 Changed 9 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 9 years ago by rudd-o@…

new patch

comment:3 Changed 9 years ago by anonymous

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

Changed 9 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 8 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 8 years ago by Radek Bartoň

Summary: Downloads plugin requires too much manual interventionPATCH: 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 7 years ago by Ryan J Ollos

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

comment:7 Changed 3 years ago by Ryan J Ollos

Owner: changed from Radek Bartoň to Ryan J Ollos

comment:8 Changed 4 months ago by Ryan J Ollos

Status: assignednew

comment:9 Changed 4 months ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Interesting idea, but a new patch would need to be generated against the latest code.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.