Skip Menu |

This queue is for tickets about the Text-Trac CPAN distribution.

Report information
The Basics
Id: 22634
Status: resolved
Priority: 0/
Queue: Text-Trac

People
Owner: Nobody in particular
Requestors: GTERMARS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Feature request: TracLinks
I see that you're using the "[<url> <text>]" syntax to allow for HTTP links to be specified, and wondered if that could be easily extended to allow for other types of TracLinks... :) Let me describe my pipe dream (so it at least gets written down somewhere)... --- I'm using Text::Trac in a message board package that I'm working on for a website, and would love to be able to have things like "#123" do an immediate cross-reference to "Message #123". Making this work would require some additional info at instantiation time, though, to help specify where things should get linked to (and if they don't have a target defined, they shouldn't get auto-linked). With instantiation parameters like: - "url_trac"; specifies the URL to a Trac repository, and all other location parameters get autoconfigured based on this (e.g. "http://example.com/") - "url_ticket"; specifies the base URL for tickets (e.g. "http://example.com/ticket/") - "url_report"; specifies base URL for reports (e.g. "http://example.com/report/") ... Initially I'd love to see "Tickets" and "Changesets", but if the support were generic enough it should be possible to support all of the various types of TracLinks.
I've ported TracLinks function that supports tickets, reports, changesets, revision logs, wiki pages, milestones, attachments and files. trac_url must be passed to the construnctor like this: my $p = Text::Trac->new( trac_url => 'http://trac.mizzy.org/public/' ); Please check my svn repos. http://svn.mizzy.org/public/library/perl/trunk/Text-Trac/
From: GTERMARS [...] cpan.org
On Sat Oct 28 10:20:39 2006, MIZZY wrote: Show quoted text
> I've ported TracLinks function that supports tickets, reports, > changesets, revision logs, wiki pages, milestones, attachments and > files.
Cool... Any chance this could be made more configurable, so that specific TracLinks could be en/disable by the presence of config options? What I'm hoping to be able to do is use the TracLinks support to let me do crossreferences with "ticket" and "changeset" links, but to have them point to URLs that aren't part of a standard Trac install (e.g. "#23" => "/region/newyork/forum/employment/23"). I do have a need in another project for being able to generate real URLs into a Trac installation, but for this particular project am hoping to be able to cheat a bit and just enable support for tickets/changesets but not have it autogenerate the crossreferences for any other types of TracLinks. If there was a way that I could pass through the base URLs for each of the specific TracLink types (ticket, changeset, source, etc) and have Text::Trac only generate autolinks for those specific types, that'd be ideal. If a "trac_url" was provided, Text::Trac could presume that I'm using a "standard Trac URL scheme" and build the URLs appropriately, but otherwise I'd have to pass through the URLs that I wanted to use for each and every TracLink type.
Show quoted text
> Any chance this could be made more configurable, so that specific > TracLinks could be en/disable by the presence of config options?
I see.I will add these functions to Text::Trac. Now I'm rewriting inline parsers wholly because they don't work well. I will finish rewring by this weekend, so please wait. Thanks.
Subject: Re: [rt.cpan.org #22634] Feature request: TracLinks
Date: Wed, 8 Nov 2006 13:11:13 -0800
To: bug-Text-Trac [...] rt.cpan.org
From: Graham TerMarsch <cpan [...] howlingfrog.com>
On Tuesday 07 November 2006 5:31 pm, Gosuke Miyashita via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=22634 > >
> > Any chance this could be made more configurable, so that specific > > TracLinks could be en/disable by the presence of config options?
> > I see.I will add these functions to Text::Trac. > > Now I'm rewriting inline parsers wholly because they don't work well. > I will finish rewring by this weekend, so please wait.
Many thanks Gosuke. -- Graham TerMarsch
I've finished rewriting inline parsers and added below functions: 1. En/disabling the specific TracLinks. 2. Specifying each type of TrackLinks base URL individually. Please check the latest version on my svn and see the pod. http://svn.mizzy.org/public/library/perl/trunk/Text-Trac/