|
From: John S. J. A. <ja...@ge...> - 2000-07-07 03:20:36
|
>>>>> "Dan" == Dan Fitch writes: ..already in progress... (Dan and I have been having an exchange about BOP that pre-dates this list; I noticed that Dan joined the list, so I'm taking it upon myself to move the discussion over here, so everybody can play. Dan, if this isn't okay, please feel free to smack me around.) Dan> Ohtay, I'm actually going to spend some time tonight looking at Dan> this again.. went around to the existing things, and there are Dan> some nice ones; Mason in particular is really neat, but it Dan> doesn't have a prefab "page" system, per se. It does the Dan> evaluating I babble about later, tho. Vcool. I've been using genpage for a while now. It does a similar thing -- evaluation of arbitrary Perl during publication. I fully intend to rip this off^W^W^Wincorperate this idea into BOP; it's just too useful. It's probably not going to happen until somewhat later, however -- I'd like to get more basic stuff working first. >> The other reason for getting the current CVS repository is that >> glossary items have been implemented. Add something, and then you >> can put (for example) <"apathy"> into a page, and have it change to >> <a href="apathy.pitas.com">apathy</a> when you publish the >> page. I'm going to implement an anchor rewrite, too, so doing >> <"apathy:dan fitch"> will use "dan fitch" for the anchor. Dan> Rightyo, that's awesome. Here's a question... would it be Dan> possible to make that <"whatever"> tag also evaluate? Well, Dan> heading into full state on a page, so here's what I'm picturing Dan> anyway. Tell me if I'm way off. Dan> See, if you have more than one conceptual "level" to your site, Dan> you might want to keep that in mind. I've got a "level" called Dan> "Comix", for example. Would it be possible to somehow define Dan> variables like "level" for the page? Then something like Dan> <"$level"> would include them. Okay, I think I see what you're getting at. One thing that I plan to do (but, of course, haven't yet) is have multiple levels of fall back in the glossary insert mechanism -- so, for example if you do <"foo">, but don't have a glossary item named "foo", other things will be checked -- for example, one obvious fallback is to look for a page with the title of "foo", and then use the URL field of the page record to put in a link to that page. I'm not sure what other "fallbacks" to have -- suggestions? (Obviously, the last one should output some sort of error message and maybe just insert the anchor text into the page, perhaps wrapped in <b> tags or something.) As far as dynamic evaluation to select a glossary item -- I think the best thing to do there would be to embed some Perl in the page that generates the string corresponding to the glossary item name, and then calls Glossary->get_object_by_name() directly. Or something. It also occurs to me that you might be asking about something else -- the ability to include a 'chunk' of text in multiple places. That will also be showing up, using a mechanism to be determined. genpage lets you do this, and it's very useful for navigation bars and such -- the "Section" headers on genehack.org use these, and evaluate some embedded Perl to figure out what the current page is, so that link is replaced with <b>bolded</b> text -- see <URL:http://genehack.org/personal/> for an example. It might be worthwhile to have a quick look at genpage (see <URL:http://www.freddyfrog.com/hacks/index.shtml>, although much of the site seems to be br0ken currently...). I've been using it for ~1 year, and I'm pretty used to the feature set, so I can't see giving up anything I can currently do. So, BOP will be able to do (at a minimum) anything genpage can do, with the addition of database backing and other assorted goodies. Dan> I'm gonna peek at the CVS version, pick something from your TODO Dan> to hammer at, and see if I can't help you out. It's going to be Dan> really handy when there's a working example. Heheh. Yes indeed-y. I'm already coming up with ways that this can make my life easier -- now I just have to do the damn coding. Tonight looks to be shot, but I hope to get some stuff done this weekend, even if it's only code cleanup, insertion of (better) error handling, and writing those front-end script things to make the current stuff (somewhat) usable. To everybody else: if you've got time, inclination, and/or skill, please also feel free to grab an item from the TODO basket and hack on it. If you're worried about somebody else working on the same thing, just drop a note to the list claiming your territory. john, looking for about six extra hours per day... -- ---------------------------------------------------------------------------- [ John S Jacobs Anderson ]------><URL:mailto:ja...@ge...> [ Genehack: Not your daddy's weblog ]------><URL:http://genehack.org> |