#4520 closed enhancement (fixed)
Add Download using command line
Reported by: | galaktor | Owned by: | Radek Bartoň |
---|---|---|---|
Priority: | normal | Component: | DownloadsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
It would be really great, if there would be any straight-forward way to add a download to the database using the command line (like managing tickets using trac-admin). I would love to use DownloadsPlugin with continuous integration, where the latest build will automatically be added as a new download. I would add a task to CC or Ant to execute whatever command is necessary.
Maybe it could work something like this:
trac-admin [projectlocation] add download [attributes]... [pathtofile]
Removing a download could work the same way, using "remove" instead of "add".
If the path to the file is relative, then DownloadsPlugin looks within the downloads cache defined in trac.ini. It can also be absolute, meaning anywhere on the server.
This would be an awesome addition to DownloadsPlugin!
Attachments (0)
Change History (9)
comment:1 Changed 16 years ago by
Status: | new → assigned |
---|
comment:4 Changed 16 years ago by
Oops, I thought that trac-admin is extensible via extension points but it isn't. I can implement new script, let's say trac-downloads-admin.py, which does the same as trac-admin but which can add downloads too. Would be that fine?
comment:5 Changed 16 years ago by
Yes, of course. As long as I can integrate some command into my build automation scripts, I do not really care what I actually have to call :-)
comment:6 Changed 16 years ago by
(The previous post was done by me, but I forgot to add my name...)
comment:7 Changed 16 years ago by
I added another comment to this topic recently but either I didn't submit it or I posted it to another ticket :-). The meaning was that I noticed that previous is true for Trac 0.11. Trac 0.12 has already extension points for trac-admin
. So I created 0.12 branch of the plugin and started to implement this feature there. Do you plan to use Trac 0.11 for a long time?
comment:8 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Implemented for Trac 0.12 with r5598. If your desperately need this for Trac 0.11, please, reopen the ticket.
comment:9 Changed 16 years ago by
Ah, I forgot. Some notes before it will be documented. admin.py
module was splitted to webadmin.py
and cosoleadmin.py
. Enable/disable proper components accordingly. If you want to set tags of uploaded downloads, you have to set consoleadmin_user
option in trac.ini
to user with TAGS_MODIFY
permission.
I agree. Futhermore, it won't be too hard to implement with current Trac architecture. But currently I'm pretty occupied...