New archiving system!

| No Comments | No TrackBacks

Inspired by Mark Bernstein's site, J. Nathan Mathias' Notebook of Sand, and others, I considered my archive system and realized that it wasn't going to scale.

Scalability Problems

  • The "archive" note in Tinderbox was going to keep growing, leading to an archive.html that was both broken in its template usage and expanding with each entry
  • I would have no easy way to make a calendar with month-by-month summary pages like those on the two blogs mentioned
  • As the archive grew in my Tinderbox file, any time I opened it in outline view I would get the whole thing. To work with notes after the archive, I'd have to scroll past a list that is already longer than a screen.

Solution

So I set up a system like J. Nathan's, with year and month notes, and entries are children of the months. I'll just keep the latest month open, and since the years are children of the archive note (thus keeping descendedFrom(archive)=true), my agents still work. The challenges were twofold.

Legacy Links

Problem: Others have linked to existing entries. While Tinderbox easily accomodates this dramatic architectural shift, the static links of the web don't. I have to leave pointers from the old system.

Fixed: I made aliases of all the existing notes (not that many, really) and left them in the archive note. I exported the whole kit and kaboodle one more time. That created proper pages like I used to have. Then I tossed all the aliases in an unexported note. That keeps them around, their exported html is still hanging out in the export folder for the site, and if I ever forget and delete the legacy files I can pull the aliases back out again and re-export.

Cascading Actions

Problem: The old archive note had an action: publicationDate=today;hot=false; where publicationDate kept the note organized by blog publication date and hot marked entries which needed attention. But now I had a system which would expand with new year and month notes, and the months needed to have that action. Obviously I can't be bothered to remember to type that every month.

Fixed: I set up a few new prototypes. The prototype *year* has the action Prototype=*month*, and the prototype *month* has the action publicationDate=today;hot=false;. Now whenever I make a new month and drag it into a year, it becomes a *month* and gets the action. In point of fact I also gave the old archive note the action Prototype=*year* in case I forget to assign that, too. It took me a while at Tinderbox Weekend Boston to get my head around how to use cascading actions to enforce a data structurein that manner.

The Main Page

Problem: The main page is an agent that draws the first 7 children from the archive. After the change the children of the archive note are the years and months.

Fixed: This took a bit of kludge. I set up an agent called "pseudo-archive" with the following agent query:

  1. descendedFrom(archive)&!(Prototype=*year*|Prototype=*month*|Prototype=*note*)

... got that? It's in the archive but it's not a year, month, or subtopic. None of those should be listed by themselves.

Then I changed the main page agent query from #first(archive,7) to #first(pseudo-archive,7). Naturally I left pseudo-archive not exporting its children and using textOnly.html as its template so that its presence on the site is masked.

No TrackBacks

TrackBack URL: http://www.textuality.org/cgi-sys/cgiwrap/sprice/managed-mt/mt-tb.cgi/45

Leave a comment

About this Entry

This page contains a single entry by Scott Price published on March 15, 2005 11:44 PM.

Tinderbox is taking me over is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Pages