2003-05-29 |
Rescuing Lost Nodes |
Thank your gods that you make backups.
Fetch wiki.data from the most recent backup.
ActivePython 2.2.2 Build 224 (ActiveState Corp.) based on
Python 2.2.2 (#37, Nov 26 2002, 10:24:37) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import metakit
>>> db = metakit.storage('wiki.data')
>>> nodes = db.getas("nodes[id:S,title:S,text:S")
>>> res, found = nodes.locate({'id':'WikiTool'})
>>> found
1
Sigh with relief.
>>> t = nodes[res].text
>>> t[:60]
".. contents:: \n\nWhat?\n-----\n\nI've hacked together the PyDS W"
>>> file('phew.txt','wt').write(t)
Copy content from phew.txt back into PyDS as WikiTool/ToDo.
Cackle with laughter.
|
posted at 12:22:56
#
comment []
trackback []
|
|
Edit non-existent subnode bug |
Oops
Exception exceptions.KeyError:
categoryid File Line Function
Source
D:\Python22\Lib\site-packages\PyDS\Tool.py 1068
continue_request s = getattr(self,meth)(req)
D:\Python22\Lib\site-packages\PyDS\WikiTool.py 257
show_html _flet.begin(categoryid=node ['categoryid'], id=id)
I linked to WikiTool/ToDo and tried to follow it.
Oh, bugger. I just trashed my to do list by copying the error before pasting the list somewhere else...
|
posted at 12:10:08
#
comment []
trackback []
|
|
|
Oooooh.
|
posted at 11:53:04
#
comment []
trackback []
|
|
|
Nifty, though the DHTML Imposter Exploding Tree List Menu is closer to what I want. If anyone has a tree view that'd make sense for the heirachial display of the new WikiTool (grab the most recent version), please let me know.
|
posted at 11:20:00
#
comment []
trackback []
|
|
|
2003-05-28 |
Validation |
Just for fun, I checked the validity of my PyDS weblog home page (not good, mainly due to ampersands in links to comments and trackbacks — worse, I have no idea why it's a problem, nor how to fix it), and the validity of a Wiki page (conformant HTML4.01!).
|
posted at 20:22:56
#
comment []
trackback []
|
|
Merged |
I've merged in Georg's changes, and have just one thing to say.
Oh, boy, I missed a lot of bugs.
Full, awful detail in WikiTool/RecentChanges.
|
posted at 10:14:56
#
comment []
trackback []
|
|
WikiTool in CVS |
Georg has put a stable version of WikiTool, plus a form of RSS support, into the CVS version of PyDS. In the mean time, I've been busy working on subnodes; see WikiTool/RecentChanges for details.
|
posted at 06:56:32
#
comment []
trackback []
|
|
|
2003-05-27 |
Rich Text Editor |
I'm thoroughly impressed with Kevin Roth's cross-browser rich text editor. If I apply some of our stray link resolution technology to HTML input, it seems to me we could widen PyDS' appeal considerably...
|
posted at 11:20:00
#
comment []
trackback []
|
|
Moving stray link resolution III |
Further to Moving stray link resolution II, I think I've successfully moved the StrayLinkTransform and dependencies to the MeshTool. If you'd like to try it out, see the bottom of MeshTool.
Aah, interesting: the refresh button doesn't cause the external rendering to be updated...
|
posted at 09:58:56
#
comment []
trackback []
|
|
Slideshows in PyDS II |
Further to Slideshows in PyDS: I've realised that splitting should be [carefully] done as a transform, as then we can touch up links.
Alternative: adjust the JavaScript so that links into display:none sections result in the appropriate slide transition. Tricky.
|
posted at 07:32:48
#
comment []
trackback []
|
|
Moving stray link resolution II |
For some reason, I started by moving the substitution transform into the ShortcutTool. That turned out to be pretty easy; StructuredText.Reader now computes its transforms list at run-time; tools register transforms with StructuredText.registerTransform. (Confused? See Steal My Code, which is now quite out of date.)
Next, I'll move StrayLinkTransform and StrayLinkResolver to MeshTool, test it, and publish a diff.
|
posted at 06:44:48
#
comment []
trackback []
|
|
|
|
|
2003-05-25 |
Quick patch |
I'm adjusting WikiTool's stray link matcher so that it's considerably looser, dragging to lowercase and removing all non-alphanumeric characters before comparison.
Test: steal my code (should match against StealMyCode).
|
posted at 08:36:48
#
comment []
trackback []
|
|
|
2003-05-24 |
Fantastic! |
Georg just checked in changes to the Weblog and Story tools in which rendering for upstream is handled separately to rendering for administration, the practical upshot of which is now that you can click on an internal link in a post or story and go to the edit page of the destination, not the upstreamed version of the destination.
You'll need to hit the refresh link in the weblog tool for the effect to hit the first time, and again when the status of a linked-to destination changes, but for the time being it's all good.
Hint: re-rendering in the upstream tool administration interface does not update the internal version of the cache. :)
Next: I'm going to have to carve enough time to keep track of resolved and unresolved stray links and refresh the cache automatically.
|
posted at 09:46:08
#
comment []
trackback []
|
|
|
2003-05-23 |
Shortcut Tool |
Oh, boy, did Georg quickly turn around a fix for the shortcut tool. Now has never been a better time to tune into PyDS.
|
posted at 23:26:24
#
comment []
trackback []
|
|
|
Posts related to PyDS
|