Re: importing entries
will guaraldi <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 7 Apr 2005, Bill Mill wrote: >> >> Also, I'd stay away from metadata names that might conflict with >> existing entry variables. > > Well, I wrote my own metadata parser which puts them into a dictionary > of their own, so they can't conflict - they also can't be referenced > directly from the entry (it's *meta* data). That's an interesting idea. We could do that by storing all metadata under metadata::<key-name> kind of thing. >> This would get fixed if we were looking at fully parsed entries (i.e. >> the file has been read and parsed out) before we sorted and sliced the >> list. Then we could allow metadata to override the file mtime. > > Or we could just parse the metadata (not the whole story, it'd be very > fast, esp since the metadata is right at the top of the file) look for a > specific key, and use it to sort with if it exists. The issue is that when we're sorting all we have is the filename and the mtime--that's it. We haven't built entry objects at that point. So we definitely have to fix that. I haven't worked through the particulars yet. It's an interesting point that we could open the file for reading, pull the title, metadata, and then the rest of it we could stick in a data object to be absorbed when needed. That does skip the potentially cycle-intensive portion of parsing the entry. For blosxom entries, it's trivial, but for other entryparsers, it's more involved. I'll have to think about this some more, but this sounds like it'll work pretty well. In regards to caching and such, by default PyBlosxom will not be doing file-based caching. I really want to push all file-based caching to plugins so then people can implement what caching works for them. So it's nice that people can cache things, but PyBlosxom should work pretty well without caching (to varying degrees). > I think you see now why we were on different pages. I've been pretty vague about what I'm thinking. I haven't had time to sort it out into a spec yet. Getting there.... /will ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click