(I've been playing around off in proof of concept and prototype
land to flesh out some ideas and see what's good and what's not
so good. I'm trying to push things forward by playing.) (01)
I've implemented the NID -> URL lookup index with the NID
generator that I've been talking about over on the collab tools list: (02)
http://collab.blueoxen.net/forums/tools-yak/2003-02/msg00011.html#nid017 (03)
When the next nid is requested, if a URL has been provided, a
nid:URL pair is written to (for the time being) a DB file. (04)
That's all well and good but there's not much you can do with
that, so I wrote a thing to grab at it. I've called it Space
because I imagine an individual or a group having a NID generator
that they share. That is all their document tools create purple
numbers from the same generator. "This is our space", "This is my
space", "I think I have that fragment in my space". (05)
Space, a CGI, takes a NID and does one of three things: (06)
- redirects (including the anchor) to the page where that NID is
present
- presents the purpled fragment out of context on a page by
itself, with a link to the original context
- presents the text that makes up the fragment as plain text
(hoping for some kind of machine readability here) (07)
You can try it if you like. (08)
I've not checked this code in, again, because I'm not sure how to
make it fit in. Am hoping for some discussion to review the
various stuff I've done in the last week or so. (09)
To try it: (010)
- For some existing things in the index go to: (011)
http://www.burningchrome.com:8000/~cdent/Space.cgi/000041
http://www.burningchrome.com:8000/~cdent/Space.cgi/000041/c
http://www.burningchrome.com:8000/~cdent/Space.cgi/000041/t (012)
http://www.burningchrome.com:8000/~cdent/Space.cgi/000048
http://www.burningchrome.com:8000/~cdent/Space.cgi/000048/c
http://www.burningchrome.com:8000/~cdent/Space.cgi/000048/t (013)
- To create and mess with your own, go to: (014)
http://www.burningchrome.com:8000/~cdent/wiki.cgi?FrontPage (015)
create some wiki pages and then feed the newly created NIDs
(minus the leading nid0) to Space.cgi with or without the /c
and /t (016)
Things to look into, play with, think about: (017)
- Make some kind of decision about the leading zero on nids.
Should it be there, where should it show up, what should the
human usable format of the nid be. I've not settled on anything
in this stuff and it leads to some confusion. (018)
- Right now this stuff is very hacky and could do with a good
clean:
- The way URLs are pushed into the parser and on to the NID
generator is just dirty
- MT is being asked to save a new entry twice, the first time
to get the id so that the permalink is available to pass to
the parser as the URL
- A regular expression is being used to separate the purpled
fragment out of the HTML that LWP pulls off the web (019)
- Space as an apache handler (020)
- Using Xpointer to get elements in documents. Would it make
sense to instead of putting the id tage on the <a> put it on
the containing structural HTML element (like P, LI, DD, etc)? (021)
- Adjusting Space's input so that it can take a long list of nids
and present them as something akin to a document made up of
transclusions. (022)
- Adding a wiki tag that basically does the same thing as
Space/<nid>/t but does it as a real transclusion in a wiki
page. (023)
--
Chris Dent <cdent@burningchrome.com> http://www.burningchrome.com/~cdent/
"If you assume that there is an instinct for freedom, that there are
opportunities to change things, that hope is possible, then hope may be
justified, and a better world may be built. That's your choice." N.Chomsky (024)
--
This message is archived at: (025)
http://purplewiki.blueoxen.net/forums/cgi-bin/mesg.cgi?a=devel&i=Pine.LNX.4.30.0302112214240.9132-100000@hot.burningchrome.com (026)
|