export questoin: why do href values for intra-wiki links use two different naming schemes?

14 views
Skip to first unread message

Matthew Cornell

unread,
Nov 30, 2015, 1:33:34 PM11/30/15
to PBworks API
Hi Folks,

I'm writing an app that runs on the html files in a pbworks export, and I've noticed an inconsistency in how intra-wiki href links are named. I've found two variations:
  1. a clean one: <a href="/Jen">Jen</a>
  2. a messy one: <a href="/w/page/103318757/Denholm">Denholm</a>

Here's the html:


<p><a href="/Jen">Jen</a> has an interview with <a href="/w/page/103318757/Denholm">Denholm</a> in <a href="/w/page/103318717/Denholms%20office">Denholms office</a> . From "Yesterday's Jam".</p>

Because of this, it looks like I'll have to normalize #2 to match #1, but I'm curious why pbworks is doing this. At first I thought it had to do with page versions, but that's not so.


Thanks very much!

Eileen Xie

unread,
Nov 30, 2015, 1:48:26 PM11/30/15
to PBworks API
The longer URLs include the ID of the page, which means they will continue to work even if the page is renamed. The shorter URLs are used if the link is created before the page is created. We do not recommend using the shorter URLs, because they will break when pages are renamed.

- Eileen

Jason Chapman

unread,
Nov 30, 2015, 2:02:03 PM11/30/15
to PBworks API
Hi Matthew, we found the same thing.  I didn't spend much time trying to work it out, just strip out the w/page/# part of the link.  We have a "wikilinker" app that you paste in a page and it takes this out, so the link looks better in e-mail.

I'm really replying to find out what you are working on.  We parse the exports as well.  We organise our wiki into an upturned tree, with the first set of branches defining the "Chapters" of the wiki - technical, process, system etc.  Then every page has an "up" link in it which allows us to parse all the pages and build this tree.  We currently do this offline in a W32 app.  Users find it hard to find what they are looking for, so we also build a HTML table of contents that we have as a page, so they can see how the wiki hangs together.

We don't currently use the API, but are looking for others who are delving into the innards to bounce ideas off of. 

We also produce a mesh of cross links from pages and also broken links.  We are hoping to parse the raw useage data to give quick feedback on hot and cold parts of the wiki and would be interesting in how / what people use to visualize their wikis.
Reply all
Reply to author
Forward
0 new messages