Tags:
create new tag
, view all tags
DeleteMe - this request is no longer relevant as the TouchGraphPlugin works as is where is. smile

The Request: Add a URL to TWiki which generates a Links Database suitable for use with the MeatBall:TouchGraphWikiBrowser. (Also see TouchGraph)

What is the Links Database?: A text file, or URL, which lists all the links (as topic names) contained within a topic name. It looks like this: (also see MeatBall:LinkDatabase)

TouchGraph WikiWebBrowser MeatballWiki TGLinkBrowser TGGoogleBrowser WebTopicList ArbitraryTextForWikiWordLinks
BreadSlicer YearTwo WikiWords FaqIndex TWikiAccess
AnotherPage WithTwoWikiWordLinks AndAnExternalLink http://example.com/
...etc... 

Suggested URL: http://twiki.org/cgi-bin/view/Codev/TGTopicList for a single web database, and http://twiki.org/cgi-bin/view/TGTopicList for an all public webs database


Discussion

Not sure how ArbitraryTextForWikiWordLinks could be handled but even without them this would make a killer add on for TWiki.

In conception this appears dead simple, how much work would it be to program?

-- MattWilkie - 22 Jul 2002

Just downloaded and tried TouchGraph with a handseeded link file. Yes, it is a killer! A few details

  • It's not (yet) as responsive as Personal Brain, but lightning fast compared to navigation in TWiki
  • The browser (is that HotJava or what?) balks on TWiki's BleedingEdge <xyz ... /> tags ...
  • ... and doesn't like JS / Frame stuff (can't say, JoachimDurchholz didn't warn me ;-)

Programmatically, it shouldn't be too complicated. Although, a clever integration into TWiki needs some thought. I need a demo really fast, so I put together a quick hack.

-- PeterKlausner - 23 Jul 2002

I've hacked together a crude MeatBall:LinksDatabase style text database for the TWiki web from the 2001-December release. To use:

  1. make sure you have the Java Runtime Environment 1.3 or newer installed (http://java.sun.com/j2se/1.4/download.html)
  2. Download and unpack MeatBall:TouchGraphWikiBrowser
  3. Put the files Twiki.txt (attached) and Twiki.bat in the same directory.
  4. Run Twiki.bat (on unix edit the file so it starts with #!/bin/sh and rename it to twiki.sh and then run it with ./twiki.sh )

twiki.bat:

java -cp TGWikiBrowser.jar;BrowserLauncher.jar com.touchgraph.wikibrowser.TGWikiBrowser twiki.txt http://twiki.org/cgi-bin/view/TWiki/ hypermedium 2 false

The script I used to extract the links is below and was run on a CygWin installation of Twiki. The WikiWord pattern matching is extremely simplistic.

gen_tglist.sh:

#!/usr/bin/bash
theList=TouchGraphTopicList
rm $theList
# for every text file in the current directory do...
for a in *.txt 
do
   # the topic being processed
   echo -n $a | sed -e 's/\.txt//' >> $theList
   # add a 3 space gap between the topic and it's links
   echo -n '   ' >> $theList
   # find and write out the WikiWords
   egrep -UZo  [A-Z]+[a-z]+[A-Z]+[a-z]+ $a | tr  \\n ' ' >> $theList
   # add a newline between the records (topic names)
   echo ' ' >> $theList
done

Problems with this hack;

  • External links are not in the database
  • there are no links across Web boundaries (eg: you can't follow a link from TWiki/SomePage to Codev/ThisPage)
  • I couldn't figure out how to specify the plain skin
  • the script is very slow (and not in perl)
  • it isn't live
  • the generated LinkDatabase textfile is in alphabetical order, so instead of the first on-load-up page being TWiki/WebHome it is TWiki/AlWilliams which only has two child links. Not very exciting (no offense to Al meant).
  • many, many more I'm sure : ) Feel free to flesh out the list.

-- MattWilkie - 23 Jul 2002

I put together a similar 80:20 hack; see the attached screenshot, which is centered around WelcomeGuest (you can supply the initial page as parameter). From playing around, it seems hard to cover more than one "web" in a TouchGraph, because you would always see the "web" prefix. So I build one touchgraph.txt file per pub/web dir. For a real solution, I see 3 approaches:

From the outside

  1. let twiki render as usual
  2. extract all the links
  3. match them and convert them into local or remote touchgraph references
Pros:
  1. Completely modular
  2. Catches absolutely definitely everything
Cons:
  1. External analysis is difficult, because the original function is not available any more
  2. Make sure to use a skin with 0 navigation

File based

MattWilkie's and my hack
  1. parse the files directly for all link patterns
  2. update touchgraph link list accordingly
Pros:
  1. Full control about what to link; this is imporatant, because the priorities for the graph are a bit different: e.g. you want to reverse the direction of the parenttopic link
  2. no navigational fluff
Cons:
  1. Each and every link generating function or plugin must be duplicated. Yep

From inside

  1. Render all pages in a special touchgraph mode
  2. Do not output text
  3. Only output link data
Pros:
  1. Should catch everything
Cons:
  1. Each and every link generating function must be modified, to generate touchgraph data...
  2. ... which might cost performance for regular rendering as well
  3. specialized rendering, e.g. for parenttopic seems harder

-- PeterKlausner - 24 Jul 2002

I reached a 90:10 solution and created TouchGraphAddOn. See TouchGraphAddOnDev for further discussion.

-- PeterKlausner - 09 Oct 2002

Thanks for creating this, guys! Go TouchGraph!

-- GrantBow - 16 Jan 2003

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt Twiki.txt r1 manage 24.2 K 2002-07-23 - 23:06 MattWilkie LinkDatabase for Dec2001 TWiki web
Unknown file formatEXT touchgraph r1 manage 3.4 K 2002-07-24 - 14:29 PeterKlausner hack to scan all webs and write touchgraph.txt
GIFgif touchgraph.gif r1 manage 37.4 K 2002-07-24 - 14:28 PeterKlausner Screenshot of TWiki . WelcomeGuest
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2004-04-01 - MattWilkie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.