[Trac] Trac tags users?
Muness Alrubaie
muness at gmail.com
Fri Aug 26 08:46:25 CDT 2005
On 8/26/05, Alec Thomas <trac-list at swapoff.org> wrote:
> On Thu, Aug 25, 2005 at 12:36:35AM -0400, Muness Alrubaie wrote:
> > Alec,
> >
> > Nice. Looks like you've patched the ListTags macro. Care to share it? ;)
>
> Sure thing, I'll mail it to you separately.
I'll get the ListTags macro updated to your version once you send it.
>
> > Yeah, unfortunately a preview causes the tags to get updated. In fact
> > even a view is doing that, but I figured the db overhead was worth it
> > - the operation was cheap, and initially, I didn't expect the
> > implementation to really be used much; I intended it as a proof of
> > concept, but it worked well enough that I never bothered redoing it.
>
> > Is there a way for a macro to tell if it is being called under a view,
> > preview or save operation. If so, that'd be the best way to fix the
>
> Yep, I check for this in AddComment with 'wikipreview = hdf.getValue("args.preview", "")'
>
> Presumably there is a similar way to check for "view" as opposed to
> "edit".
I'll use that approach to fix previews so that they don't update the database.
>
> > issue you're highlighting, Alec, and give a way to enhance performance
> > (especially if I make a new implementation as suggested below).
> >
> > Here's the idea I've been thinking of instead of using a table to
> > store tags, use del.icio.us as the persistence engine for tags.
> > (Maybe go ahead and cahce the tags locally in the tags table, but
> > that'd just be for optimization/reliability purposes, e.g. when
> > del.icio.us is down). Immediate benefits:
> > * share tags via del.icio.us
> > * view/manage tags via things like del.icio.us director.
> > Those two alone are compelling to me. However, I think with a little
> > more thereafter, it'd be a way more powerful concept. For example,
> > the way the dynamic content generation works with the tags for trac is
> > sweet - looks like you're using this feature throughout trac-hacks.
> > Now expand that idea such that content generation isn't limited to
> > links to other wiki entries, but to URLs in general.
> >
> > i.e. http://trac-hacks.swapoff.org/wiki/DebianBtsMacro is tagged
> > "beta macro tiago trunk". Using del.icio.us, I envision tagging any
> > old URL. If it happens to start with
> > http://trac-hacks.swapoff.org/wiki/ , then the macro will be smart
> > enough to know that is actually the wiki entry at the url. But if it
> > doesn't, it can treat it instead as a url and just list it that way
> > instead. With a little more smarts, it could do even more - e.g. if
> > something is tagged image, inline it, instead of just making a link.
> >
> > Conversely, your del.icio.us tags can then also provide a description
> > to what they are by extracting the content from the self-named wiki
> > entry at the wiki (perhaps via a greasemonkey script).
> >
> > To sum up, I think this is simple, provides a nice separation of UIs
> > such that content is handled via the wiki and tagging is handled via
> > del.icio.us. Each one's UI is really simple and good at what it does.
> > The current implementation hacks something onto Trac which it was
> > never intended to do. Also, with the flexibility of a general purpose
> > tagging system providing all the tagging work, I think there will be
> > all sort of emergent remixing abilities that may enhance trac and
> > del.icio.us for those of us who use both a lot.
> >
> > What do you think? Would this be useful? Or am I missing something
> > painfully obvious? Any and all input is much appreciated.
>
> That's quite an interesting idea. Presumably del.icio.us has some API
> for interacting with it?
Yes, it does. In fact there is a python api at
http://www.hackdiary.com/archives/000060.html .
>
> I personally don't think I'd like to see this replace the existing
> mechanism however as the current simplicity is what makes it appealing,
> from both an implementation and usage perspective.
Excellent point. I've been thinking about this for the last few
hours. Also about the fact that that Alain brought up about having to
be online to use tags. Based on your feedback, here's the new plan:
* Keep the tags in the table as in the current implementation.
* Add a new field, say source. By default this can be empty, or have
the form: "<source>.<user>", e.g. trac.<username> or del.muness...
* Write a tool that imports tag information from del.icio.us (or other
tag implementations). This tool can then run periodically, maybe
completely outside of Trac. Maybe add code to TagIt to explicitly
invoke the tool to import tags for that page. It can fail silently if
del.icio.us times out or is unavailable.
This will keep the exisiting simplicity but add the functionality I
wanted. Sound better?
>
> > Also, any implementation suggestions? Does the new plug-in stuff come
> > up at all? (at first glance, methinks not...)
>
> I was thinking about this a while back and the ability to add arbitrary
> "link handlers" might be useful.
>
> eg. you could use the following to create tags
>
> tagit:beta,macro,tiago,trunk
>
> I'm not convinced this actually adds anything or is just "syntactic
> sugar".
>
Hmm... This may be cleaner than the macro implementation now in
place. I'll look at implementing it and giving the user the choice of
which to use.
After I get the new changes done, users could then tag in a wiki entry
via the TagIt macro (or the above link handler approach, after 0.9).
They could also tag simply by using del.icio.us as they usually tag
URLs. I'll also be adding a variation of TaggedWith macro (currently
called ListTags) that can query arbitrary URLs instead of just Wiki
entries.
Thoughts?
Thanks everyone for the feedback. This is exactly why I wanted to
brainstorm before diving into code.
Muness
> > Muness
> >
> > On 8/24/05, Alec Thomas <trac-list at swapoff.org> wrote:
> > > On Wed, Aug 24, 2005 at 04:49:15PM -0400, Muness Alrubaie wrote:
> > > > BTW, you say the "This Tag functionality is great". Have you been
> > > > using it? I am just curious, because like I said, I am thinking of
> > > > adding some major feature enhancements and was hoping to talk to some
> > > > other users to bounce some ideas off them.
> > >
> > > Hi Muness,
> > >
> > > I am using tags extensively on http://trac-hacks.swapoff.org. It makes
> > > life a lot easier for classifying the various "hacks". It uses some
> > > custom macros to utilise the tags more effectively for that environment,
> > > but it is all pretty much stock underneath.
> > >
> > > The only real issue I've seen is that the tags get applied to the page
> > > during preview, which may not be desirable.
> > >
> > > Regards,
> > > Alec
> > >
> > > --
> > > Evolution: Taking care of those too stupid to take care of themselves.
> > > _______________________________________________
> > > Trac mailing list
> > > Trac at lists.edgewall.com
> > > http://lists.edgewall.com/mailman/listinfo/trac
> > >
> > _______________________________________________
> > Trac mailing list
> > Trac at lists.edgewall.com
> > http://lists.edgewall.com/mailman/listinfo/trac
> >
>
> --
> Evolution: Taking care of those too stupid to take care of themselves.
> _______________________________________________
> Trac mailing list
> Trac at lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
>
More information about the Trac
mailing list