Edgewall Software
Modify

Opened 18 years ago

Last modified 10 years ago

#3895 new enhancement

Provide Trac API for returning all outbound links in a page

Reported by: anonymous Owned by:
Priority: normal Milestone: topic-wikiengine
Component: wiki system Version: 0.10
Severity: major Keywords: links xref
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I have a suggestion that could kill a lot of birds with one stone.

I see a lot of people asking for functionality in Trac that relates to connections between pages (Backlink, Orphaned Pages, and MissingLinks among them). I see some attempts by the community to provide that functionality. I also see that those attempts are:

1) Very poor, and 2) getting poorer by the day.

The reason they are getting poorer is that Trac already matches on a large array of patterns. The bar is set fairly high, and the current plugins do not meet it. Also, the Trac development team routinely introduces new additions/changes that increase the number of ways to connect two pages. There is really no way for the plugin community to catch up.

Instead of asking us to do so, I ask you to help us help you: Please provide (and document) an API function that takes some sort of reference to a Trac document (name perhaps) and returns a set of all outbound links from that page. This functionality should identically match (or perhaps replace?) the functionality Trac uses to generate and HTML page. As new patterns are added to the system, plugins would then automatically detect the new links. With this function as a basis, a host of other functions could be provided, correctly, by the community.

If and when Trac tracks links between pages, the API could be modified to use the stored information, rather than calculating it on the fly.

Attachments (0)

Change History (10)

comment:1 by Christian Boos, 18 years ago

Keywords: xref added
Milestone: 1.0
Severity: blockermajor

Er, you mean something like TracCrossReferences?

For a start, the Backlink, Orphaned Pages, and MissingLinks were all implemented on top of this (see the source:sandbox/trac-xref/trac/xref/macros.py)

This is still on my TODO list ;)

comment:2 by anonymous, 18 years ago

Summary: Provide Trac API for returning all outbound links in a pageFollowup

Oh, so you guys are still working on that? All of the links I'd found to it before were broken. When is it going to see the light of day? I think you guys underestimate how important it is for a working (work as in 'day job', not 'functioning') Wiki to have this sort of functionality.

I have concerns that the cross reference mechanism commits the sin of double-data entry. I already knew two pages were related, that's why I put a CamelCase reference on one page to the other. Why do I have to add something extra to get the Wiki to understand it?

Really, all I need is for the Wiki's own page parser to be able to tell ME what it determined as the outbound links from a page, that way all of the tools at least agree on what constitutes a link, and Edgewall is then free to tweak the rules with every single release without people getting miffed.

I'm willing to scan the entire 'wiki' table if needs be in order to sort out who's linked to whom (and who isn't linked to whom). Does it scale? On a large Wiki, obviously a database-driven solution is far superior. But most working Wikis (or at least, those without a blog built-in) aren't so big that you can't scan the entire thing in a handful of seconds.

comment:3 by anonymous, 18 years ago

Summary: FollowupProvide Trac API for returning all outbound links in a page

Summary correction.

comment:4 by Christian Boos, 16 years ago

Milestone: 1.0experimental

This is essentially the API side of #1242, which also included an UI for that.

comment:5 by Christian Boos, 15 years ago

Milestone: experimentalnext-major-0.1X

Milestone experimental deleted

comment:6 by Christian Boos, 15 years ago

Component: generalwiki system
Owner: changed from Jonas Borgström to Christian Boos

comment:7 by Christian Boos, 14 years ago

Milestone: next-major-0.1X0.13

Depends on #4431.

comment:8 by Christian Boos, 14 years ago

Milestone: 0.130.14-wikiengine

comment:9 by Christian Boos, 12 years ago

Can be used to fix issues like #11092.

comment:10 by Ryan J Ollos, 10 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.