The LinkDatabase feature gives a list of all page-links in the local wiki. The first link on each line is to the page being searched, and the following links are those that were found on that page. Samples: [Note that all the options can be combined]
- MeatBall:action=links (plain list)
- MeatBall:action=links&editlink=1 (non-existent pages include the "?" edit-link)
- MeatBall:action=links&empty=1 (list "empty" pages (without any links of the requested type))
- MeatBall:action=links&names=0 (just the links, no page names)
- MeatBall:action=links&unique=0 (every instance of the link, not just the first one per page)
- MeatBall:action=links&unique=2 (only list each link one time (do not repeat it on later pages))
- MeatBall:action=links&sort=0 (links in the order they appear on the page)
- MeatBall:action=links&exists=0 (only links to non-existent pages)
- MeatBall:action=links&exists=1 (only links to existing pages)
- MeatBall:action=links&url=1 (also include URL links)
- MeatBall:action=links&url=2 (*only* include URL links)
- MeatBall:action=links&inter=1 (also include InterWiki links)
- MeatBall:action=links&inter=2 (*only* include InterWiki links)
- MeatBall:action=links&inter=2&search=UseMod: (Search for InterWiki links to UseMod?)
- MeatBall:action=links&url=2&search=crit.org (Search for URL links mentioning crit.org)
- MeatBall:action=links&names=0&unique=2&exists=0 (show all non-existent (wanted) links, showing each link only once)
Notes:
- All URLs and InterWiki links are considered non-existent. (It would be rather expensive to check them.)
- The setting empty=0 may leave blank lines if names=0 is also set.
Technical standard
Wikis will often want to describe their link structure to clients. A simple format would be, one per line:
pageName (link | URL)*
- pageName refers to the page being described by that line. This will be URL encoded to accommodate FreeLinks.
- link refers to a internal link from the page to other pages within the same PageDatabase. This will be URL encoded to accommodate FreeLinks.
- URL refers to an external link from the page to other pages on different sites.
Links and URLs must appear in the order of appearance on the page.
For example:
LinkPattern OnePage Two%20Page http://www.example.com ThreePage
says that the page LinkPattern has internal links to the pages OnePage, Two Page, and ThreePage in that order, with an external link to http://www.example.com between Two Page and ThreePage.
Depending on the context of operation:
- links do not have to appear more than once (the first time they appear).
- internal links do not have to appear
- external links do not have to appear
Also, the list of pages need only reflect the scope of the query; i.e. it can be any subset of the PageDatabase, including one single page.
The LinkDatabase feature currently rescans the entire database every time it is used, so it is slow and CPU-intensive. Eventually the code will store the results and reuse them.
See WikisWithLinkDatabases for other Wikis for which one can obtain a LinkDatabase in a similar format.
Are you going to implement a URL to retrieve a plain text LinkDatabase for import by the TouchGraphWikiBrowser? [9/02]
I just posted a patch to implement it. It's up to the admins to implement it here of course. See UseMod:WikiPatches/TouchGraphWikiBrowserStyleLinkDatabase -- ManpreetSingh [10/02]'
I think there's a lot more potential for the link-database. I just hacked together a quick script to do a "PageRank" and find the most linked-to pages. You can point it at the LinkDatabase of any wiki.
More details : http://www.nooranch.com/synaesmedia/wiki/wiki.cgi?AnalyzingThoughtStorms
-- PhilJones
Cool. Sunir has something similar for meatball: http://sunir.org/apps/links.pl?in=1 See additional interesting views on IndexingScheme.
I figured it should already exist. But I'm wondering if anyone else uses the LinkDatabase.
However, now I see the LinkDatabase isn't so standard. On my UseMod I have action=tgwb which gives me the links in a plain text format without anchors, but action=links here on MeatBall gives me an HTML page with anchors wrapped around them. Is there an action here at meatball to get the plain, non-HTML version or is that deprecated. It's a pity if that's the case, because a good common linkbase format suitable for processing by other scripts would be a useful cross-wiki standard.
-- PhilJones
update : the script now draws an incredibly basic frequency chart. Yep, all the wikis looked at so far seem to be PowerLaws. But you knew that anyway. Still looking for info about whether there's a non HTML version of the LinkDatabase here and whether that's something we can expect to be a standard.
-- PhilJones
This is really similar to [Local Names;]
I can adapt the software I've written to use the LinkDatabase format.
I'd want to incorporate a few ideas from Local Names: You can extend this from being "just about wiki."
Just about every markup standard (MarkDown, Textile, etc.,.) has shorthands for everything in wiki except easy linking. They almost universally make the cludge of: "use this big attached link glossary at the end of the file."
I have a lot more to add; Just not the time to add it. I'll write here again some later time.
Perhaps I should separate out the meta-level namespacing stuff, from the raw links database. The "meta-level" namespacing stuff is things like interlinks- which namespace is connected with which other namespace, and by what names- and stuff like "what URL do I make if it's not in the list." Maybe make that RDF or something.
See also: GoogleInterWiki.
-- LionKimbro
See also MoinMoin:VisualSiteMap
This feature seems to be disabled ? --ThomasKalka