Listing all attachments for easy searching

33 views
Skip to first unread message

YC

unread,
Oct 22, 2008, 6:59:58 PM10/22/08
to Trac Users
I have a problem finding attachments on the wiki. Since I work with a
few wikis, I sometimes can't remember which wiki page an attachment is
attached. I know Timeline will show like when the attachment was
attached and where was it attached to.

Just wondering is there a way to have a list of all attachments ( and
where it is located, on which wiki page etc.) for easier searching? If
anybody has any idea. Thanks.

Remy Blank

unread,
Oct 22, 2008, 7:34:21 PM10/22/08
to trac-...@googlegroups.com
YC wrote:
> Just wondering is there a way to have a list of all attachments ( and
> where it is located, on which wiki page etc.) for easier searching? If
> anybody has any idea. Thanks.

I don't know how you could achieve that out-of-the-box, but this would
make a nice macro, similar to [[TitleIndex]].

-- Remy

signature.asc

Yvonne Oy Ling Cheong

unread,
Oct 22, 2008, 7:38:03 PM10/22/08
to trac-...@googlegroups.com
Yes! That would be great to have! I'm not technical enough to know how
to go about doing it. Hopefully someone has already done it and could
share with the group. That would be awesome!

-- Remy


This email (including any attached files) is confidential and is for the
intended recipient(s) only. If you received this email by mistake,
please, as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily
reflect those of the University of Southern Queensland. Although all
reasonable precautions were taken to ensure that this email contained no
viruses at the time it was sent we accept no liability for any losses
arising from its receipt.

The University of Southern Queensland is a registered provider of
education with the Australian Government (CRICOS Institution Code No's.
QLD 00244B / NSW 02225M)


Jeff Hammel

unread,
Oct 23, 2008, 10:11:44 AM10/23/08
to trac-...@googlegroups.com
I've ticketed this on trac-hacks:

http://trac-hacks.org/ticket/3977

I'll take a stab at this if/when I have time, though if someone beats me to it I wouldn't complain (nor do I know when I'll be able to tackle it).

I think its a great idea, though.

Jeff

Yvonne Oy Ling Cheong

unread,
Oct 23, 2008, 4:59:22 PM10/23/08
to trac-...@googlegroups.com
Thanks a lot Jeff. It's a great start!

Daan van Etten

unread,
Oct 25, 2008, 10:56:43 AM10/25/08
to trac-...@googlegroups.com
Hi,

I took the plunge and created the AllAttachmentsMacro.
See http://trac-hacks.org/wiki/AllAttachmentsMacro

Let me know what you think!

Regards,

Daan

Jeff Hammel

unread,
Oct 28, 2008, 5:19:40 PM10/28/08
to trac-...@googlegroups.com
Thanks Daan!

Seems to work perfectly here. Thanks for the quick turnaround too.

Jeff

Yvonne Oy Ling Cheong

unread,
Oct 28, 2008, 7:30:57 PM10/28/08
to trac-...@googlegroups.com
Excellent!! Works so well. Thanks all.

Daan van Etten

unread,
Oct 29, 2008, 11:28:19 AM10/29/08
to trac-...@googlegroups.com
Great it worked!

Regards,

Daan

Op 29 okt 2008, om 00:30 heeft Yvonne Oy Ling Cheong het volgende
geschreven:

gctrekker

unread,
Nov 10, 2008, 9:40:03 AM11/10/08
to Trac Users
I installed the AllAttachmentsMacro but cannot get it to work. When I
run it I get:

Error: Failed to load processor AllAttachments
No macro or processor named 'AllAttachments' found

The trac.log file also contains:
2008-11-10 07:50:56,619 Trac[loader] ERROR: Failed to load plugin
from /usr/local/trac/mistic/plugins/AllAttachmentsMacro-1.0.py
Traceback (most recent call last):
File "/usr/local/lib64/python2.5/site-packages/Trac-0.11.1-py2.5.egg/
trac/loader.py", line 89, in _load_py_files
module = imp.load_source(plugin_name, plugin_file)
File "/usr/local/trac/mistic/plugins/AllAttachmentsMacro-1.0.py",
line 9, in <module>
from trac.wiki.macros import WikiMacroBase, parse_args
SystemError: Parent module 'AllAttachmentsMacro-1' not loaded

I added "AllAttachments.* = enabled" in the trac.ini file but that did
not make a differences. I have stopped and started the apache2 server
several times and I still get the error. When I do "About Trac" as an
administrator I see "allattachments.* enabled" under components.

System Information
Trac: 0.11.1
Python: 2.5.1 (r251:54863, Sep 21 2007, 22:46:31) [GCC 4.2.1 (SUSE
Linux)]
setuptools: 0.6c8
MySQL: server: "5.0.67-community", client: "5.0.67", thread-safe: 0
MySQLdb: 1.2.2
Genshi: 0.5.1
mod_python: 3.3.1
Subversion: 1.5.4 (r33841)
jQuery: 1.2.6

This is what I have in the plugins directory:

> ls -l ../plugins
total 92
-rw-r--r-- 1 svn www 2683 2008-11-01 16:25
AllAttachmentsMacro-1.0.py
-rw-r--r-- 1 wwwrun www 2703 2008-11-10 07:40
AllAttachmentsMacro-1.0.pyc
-rw-r--r-- 1 svn svn 5495 2008-10-17 11:23 cc_selector-0.0.2-
py2.5.egg
-rw-r--r-- 1 svn svn 3562 2008-08-07 08:14
nevernotifyupdaterplugin-0.0.1-py2.5.egg
-rw-r--r-- 1 svn svn 11617 2008-09-26 08:44
TicketModifiedFiles-0.10-py2.5.egg
-rw-r--r-- 1 svn www 57013 2008-10-09 17:45
timingandestimationplugin-0.7.3-py2.5.egg

Thanks in advance for any suggestions.


On Oct 29, 9:28 am, Daan van Etten <d...@stuq.nl> wrote:
> Great it worked!
>
> Regards,
>
> Daan
>
> Op 29 okt 2008, om 00:30 heeft Yvonne Oy Ling Cheong het volgende
> geschreven:
>
>
>
> > Excellent!! Works so well. Thanksall.
>
> > -----Original Message-----
> > From: trac-...@googlegroups.com [mailto:trac-...@googlegroups.com]
> > On Behalf Of Jeff Hammel
> > Sent: Wednesday, 29 October 2008 7:20 AM
> > To: trac-...@googlegroups.com
> > Subject: [Trac] Re:Listingallattachmentsfor easy searching
>
> > Thanks Daan!
>
> > Seems to work perfectly here. Thanks for the quick turnaround too.
>
> > Jeff
>
> > On Sat, Oct 25, 2008 at 04:56:43PM +0200, Daan van Etten wrote:
>
> >> Hi,
>
> >> I took the plunge and created the AllAttachmentsMacro.
> >> Seehttp://trac-hacks.org/wiki/AllAttachmentsMacro
> >>>>allreasonable precautions were taken to ensure that this email
> >>>> contained no viruses at the time it was sent we accept no liability
>
> >>>> for any losses arising from its receipt.
>
> >>>> The University of Southern Queensland is a registered provider of
> >>>> education with the Australian Government (CRICOS Institution Code
> >>> No's.
> >>>> QLD 00244B / NSW 02225M)
>
> >>> This email (including any attached files) is confidential and is for
>
> >>> the intended recipient(s) only. If you received this email by
> >>> mistake, please, as a courtesy, tell the sender, then delete this
> >>> email.
>
> >>> The views and opinions are the originator's and do not necessarily
> >>> reflect those of the University of Southern Queensland. Although
> >>>allreasonable precautions were taken to ensure that this email

Martin S.

unread,
Nov 10, 2008, 10:03:58 AM11/10/08
to Trac Users
I think the problem is the '-1.0' in the filename.
Try to rename the file to 'allattachments.py'
and change the config to 'allattachments.* = enabled'.

gctrekker

unread,
Nov 10, 2008, 10:55:07 AM11/10/08
to Trac Users
Thank you. AllAttachmentsMacro is now working for me.
Reply all
Reply to author
Forward
0 new messages