Re: years and categories (was Odd error in wbgwiki.py with numeric only directories)
Blake Winton <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
Will Guaraldi wrote: > I _really_ appreciate you doing this. Hey, I'm glad I'm able to help, even in this minor a way. > I have a couple of minor thoughts from skimming it: > 1. the "archiving feature" (let's call it that for now) only kicks in > when it's looking at a path segment that's 4 digits and starts with 19 > or 20. So it won't/shouldn't kick in for 1234. If it is, that's a bug. You caught me. I haven't tested that case. It was just an example. :) > c) archive-based paths everywhere (if it can't otherwise be construed as > a directory) > > How does that strike you for behavior? Do you think that covers all the > issues that we've talked about on the list (along with Chris Green's > issues)? Oh, yeah, I totally forgot about case c)... I've updated the doc. My current favourite recommendation has changed from option 4 to option 5, leave the archive-based paths everywhere, but they only kick in if there isn't a directory already named that. (Details in the attached spec.) > I posted Blake's spec at the url he suggested: > http://pyblosxom.sourceforge.net/2.0/plans/archiveaccess.html > I'll follow the conversation as it continues and either Blake or I > will update the spec accordingly. As a side note, do you upload the reST, and have it automatically converted, or should I continue to attach the html? Later, Blake. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ pyblosxom-users mailing list pyblosxom-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
archiveaccess.html
(text/html, 11.8 KB)
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> <title>Archive Access</title> <meta name="author" content="Blake Winton <bwinton plus pyblosxom at latte dot ca>" /> <style type="text/css"> /* :Author: David Goodger :Contact: [email protected] :Date: $Date: 2005-12-18 01:56:14 +0100 (Sun, 18 Dec 2005) $ :Revision: $Revision: 4224 $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to customize this style sheet. */ /* used to remove borders from tables and images */ .borderless, table.borderless td, table.borderless th { border: 0 } table.borderless td, table.borderless th { /* Override padding for "table.docutils td" with "! important". The right padding separates the table cells. */ padding: 0 0.5em 0 0 ! important } .first { /* Override more specific margin styles with "! important". */ margin-top: 0 ! important } .last, .with-subtitle { margin-bottom: 0 ! important } .hidden { display: none } a.toc-backref { text-decoration: none ; color: black } blockquote.epigraph { margin: 2em 5em ; } dl.docutils dd { margin-bottom: 0.5em } /* Uncomment (and remove this text!) to get bold-faced definition list terms dl.docutils dt { font-weight: bold } */ div.abstract { margin: 2em 5em } div.abstract p.topic-title { font-weight: bold ; text-align: center } div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { margin: 2em ; border: medium outset ; padding: 1em } div.admonition p.admonition-title, div.hint p.admonition-title, div.important p.admonition-title, div.note p.admonition-title, div.tip p.admonition-title { font-weight: bold ; font-family: sans-serif } div.attention p.admonition-title, div.caution p.admonition-title, div.danger p.admonition-title, div.error p.admonition-title, div.warning p.admonition-title { color: red ; font-weight: bold ; font-family: sans-serif } /* Uncomment (and remove this text!) to get reduced vertical space in compound paragraphs. div.compound .compound-first, div.compound .compound-middle { margin-bottom: 0.5em } div.compound .compound-last, div.compound .compound-middle { margin-top: 0.5em } */ div.dedication { margin: 2em 5em ; text-align: center ; font-style: italic } div.dedication p.topic-title { font-weight: bold ; font-style: normal } div.figure { margin-left: 2em ; margin-right: 2em } div.footer, div.header { clear: both; font-size: smaller } div.line-block { display: block ; margin-top: 1em ; margin-bottom: 1em } div.line-block div.line-block { margin-top: 0 ; margin-bottom: 0 ; margin-left: 1.5em } div.sidebar { margin-left: 1em ; border: medium outset ; padding: 1em ; background-color: #ffffee ; width: 40% ; float: right ; clear: right } div.sidebar p.rubric { font-family: sans-serif ; font-size: medium } div.system-messages { margin: 5em } div.system-messages h1 { color: red } div.system-message { border: medium outset ; padding: 1em } div.system-message p.system-message-title { color: red ; font-weight: bold } div.topic { margin: 2em } h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { margin-top: 0.4em } h1.title { text-align: center } h2.subtitle { text-align: center } hr.docutils { width: 75% } img.align-left { clear: left } img.align-right { clear: right } ol.simple, ul.simple { margin-bottom: 1em } ol.arabic { list-style: decimal } ol.loweralpha { list-style: lower-alpha } ol.upperalpha { list-style: upper-alpha } ol.lowerroman { list-style: lower-roman } ol.upperroman { list-style: upper-roman } p.attribution { text-align: right ; margin-left: 50% } p.caption { font-style: italic } p.credits { font-style: italic ; font-size: smaller } p.label { white-space: nowrap } p.rubric { font-weight: bold ; font-size: larger ; color: maroon ; text-align: center } p.sidebar-title { font-family: sans-serif ; font-weight: bold ; font-size: larger } p.sidebar-subtitle { font-family: sans-serif ; font-weight: bold } p.topic-title { font-weight: bold } pre.address { margin-bottom: 0 ; margin-top: 0 ; font-family: serif ; font-size: 100% } pre.literal-block, pre.doctest-block { margin-left: 2em ; margin-right: 2em ; background-color: #eeeeee } span.classifier { font-family: sans-serif ; font-style: oblique } span.classifier-delimiter { font-family: sans-serif ; font-weight: bold } span.interpreted { font-family: sans-serif } span.option { white-space: nowrap } span.pre { white-space: pre } span.problematic { color: red } span.section-subtitle { /* font-size relative to parent (h1..h6 element) */ font-size: 80% } table.citation { border-left: solid 1px gray; margin-left: 1px } table.docinfo { margin: 2em 4em } table.docutils { margin-top: 0.5em ; margin-bottom: 0.5em } table.footnote { border-left: solid 1px black; margin-left: 1px } table.docutils td, table.docutils th, table.docinfo td, table.docinfo th { padding-left: 0.5em ; padding-right: 0.5em ; vertical-align: top } table.docutils th.field-name, table.docinfo th.docinfo-name { font-weight: bold ; text-align: left ; white-space: nowrap ; padding-left: 0 } h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { font-size: 100% } tt.docutils { background-color: #eeeeee } ul.auto-toc { list-style-type: none } </style> </head> <body> <div class="document" id="archive-access"> <h1 class="title">Archive Access</h1> <table class="docinfo" frame="void" rules="none"> <col class="docinfo-name" /> <col class="docinfo-content" /> <tbody valign="top"> <tr><th class="docinfo-name">Author:</th> <td>Blake Winton <bwinton plus pyblosxom at latte dot ca></td></tr> <tr class="field"><th class="docinfo-name" colspan="2">Originally published:</th></tr> <tr><td> </td><td class="field-body">September 20, 2007</td> </tr> <tr class="field"><th class="docinfo-name">URL:</th><td class="field-body"><a class="reference" href="http://pyblosxom.sourceforge.net/2.0/plans/archiveaccess.html">http://pyblosxom.sourceforge.net/2.0/plans/archiveaccess.html</a></td> </tr> </tbody> </table> <div class="section"> <h1><a id="history" name="history">History</a></h1> <p>September 20, 2007 - Blake Winton</p> <blockquote> <ul class="simple"> <li>Wrote the initial document, emailed it to pyblosxom-users.</li> <li>Incorporated feedback.</li> </ul> </blockquote> </div> <div class="section"> <h1><a id="summary" name="summary">Summary</a></h1> <p>In previous versions of PyBlosxom, any url which contained a path segment of four digits was treated as a request for the archives for that path. This led to people attempting to create directories named, say, "1234", and having them not work, because the archive handler would take over, and return no entries for the year 1234.</p> <p>There are other plugins which assign different meanings to parts of the path, but they all require the path to start with a prefix, thus allowing the user to name their directories whatever they want.</p> <p>This proposal is intended to sketch out how the archive access for the next version of PyBlosxom should work, with the goals of allowing easy access to the archives, as well as allowing users to name directories whatever they like.</p> </div> <div class="section"> <h1><a id="proposed-design" name="proposed-design">Proposed design</a></h1> <p>Currently, PyBlosxom jumps through some hoops to process numeric directories as years. While it does allow you to more easily view archives of categories, I believe there is a simpler way to achieve the same feature.</p> <p>The path /dev/2003/ always contains the stuff in the /dev/2003 folder.</p> <p>The items in the dev/2003 folder created in 2002 (Note: I'm using 2002 here for disambiguation, so that we know which part is the folder name, and which part is the path.) could be:</p> <ol class="arabic simple"> <li>/archive/2002/dev/2003</li> <li>/archive/2002?dev/2003</li> <li>/dev/2003?archive/2002</li> <li>/archive/2002/entries/dev/2003</li> <li>/dev/2003/2002</li> </ol> </div> <div class="section"> <h1><a id="discussion" name="discussion">Discussion</a></h1> <p>The main failings with options 2 and 3 are the use of the question mark. Due to that, I suggest discounting them.</p> <p>The next two options to consider are 1 and 4. The trade-off between those, as I see it, is that option 1 restricts what I can name my top-level directories, (for instance, if you named your root directory "07", the url "/archive/2002/07", could be either everything in the "07" directory in 2002, or everything in the entire site in July 2002,) whereas option 4 is too verbose for my liking. The verbosity could be fixed by choosing a shorter prefix, such as: /old/2002/@/dev/2003, or /@/2002/in/dev/2003... For that matter, the prefix should probably come out of config.py, like other prefixes, so that if the user decides to have an "old", or "archive" top-level category, they can change the archive's prefix to "previous", or "ancient". (Similarly, if the user uses a different locale, they can name it "Архив", or "vieux", or "vorhergehend".)</p> <p>Another proposed option would be to support filtering on any path by appending date and path arguments. I personally dislike this solution, because it seems too complicated, and introduces more ways to mess up (i.e. having a path with path components and a path argument). It was also noted by its proposer that it doesn't address the issue of wanting to allow a path with a four digit number</p> <p>The fifth option, which I completely forgot about at the time of original writing, is to allow archive-based paths everywhere (if it can't otherwise be construed as a directory). So, /dev/2003 would be the directory "/dev/2003" if it existed, and if not, the 2003 archive for the directory "/dev". If you wanted the 2002 entries for the /dev/2003 directory, you would type "/dev/2003/2002", and if you wanted the 2003 archives for the dev directory, you would be out of luck. (But that would have been a specific choice by the blog author, and so I feel it's not unreasonable to say that.)</p> <p>The thread that got me complaining about this issue is at: <a class="reference" href="http://sourceforge.net/mailarchive/forum.php?thread_name=20070913214155.GB30850%40newred.gradwell.net&forum_name=pyblosxom-users">http://sourceforge.net/mailarchive/forum.php?thread_name=20070913214155.GB30850%40newred.gradwell.net&forum_name=pyblosxom-users</a></p> <p>The thread where I promised to write this spec is at: <a class="reference" href="http://sourceforge.net/mailarchive/forum.php?thread_name=185aeadc0709140845t16b98868s96bcaa1ac86533a3%40mail.gmail.com&forum_name=pyblosxom-users">http://sourceforge.net/mailarchive/forum.php?thread_name=185aeadc0709140845t16b98868s96bcaa1ac86533a3%40mail.gmail.com&forum_name=pyblosxom-users</a></p> </div> <div class="section"> <h1><a id="outstanding-issues" name="outstanding-issues">Outstanding issues</a></h1> <p>1. The main outstanding issue is that I don't know if anyone is interested enough in changing this to actually do the work. ;)</p> </div> </div> </body> </html>
archiveaccess.rest
(text/plain, 4.2 KB)
============== Archive Access ============== :Author: Blake Winton <bwinton plus pyblosxom at latte dot ca> :Originally published: September 20, 2007 :URL: http://pyblosxom.sourceforge.net/2.0/plans/archiveaccess.html History ======= September 20, 2007 - Blake Winton * Wrote the initial document, emailed it to pyblosxom-users. * Incorporated feedback. Summary ======= In previous versions of PyBlosxom, any url which contained a path segment of four digits was treated as a request for the archives for that path. This led to people attempting to create directories named, say, "1234", and having them not work, because the archive handler would take over, and return no entries for the year 1234. There are other plugins which assign different meanings to parts of the path, but they all require the path to start with a prefix, thus allowing the user to name their directories whatever they want. This proposal is intended to sketch out how the archive access for the next version of PyBlosxom should work, with the goals of allowing easy access to the archives, as well as allowing users to name directories whatever they like. Proposed design =============== Currently, PyBlosxom jumps through some hoops to process numeric directories as years. While it does allow you to more easily view archives of categories, I believe there is a simpler way to achieve the same feature. The path /dev/2003/ always contains the stuff in the /dev/2003 folder. The items in the dev/2003 folder created in 2002 (Note: I'm using 2002 here for disambiguation, so that we know which part is the folder name, and which part is the path.) could be: 1. /archive/2002/dev/2003 2. /archive/2002?dev/2003 3. /dev/2003?archive/2002 4. /archive/2002/entries/dev/2003 5. /dev/2003/2002 Discussion ========== The main failings with options 2 and 3 are the use of the question mark. Due to that, I suggest discounting them. The next two options to consider are 1 and 4. The trade-off between those, as I see it, is that option 1 restricts what I can name my top-level directories, (for instance, if you named your root directory "07", the url "/archive/2002/07", could be either everything in the "07" directory in 2002, or everything in the entire site in July 2002,) whereas option 4 is too verbose for my liking. The verbosity could be fixed by choosing a shorter prefix, such as: /old/2002/\@/dev/2003, or /\@/2002/in/dev/2003... For that matter, the prefix should probably come out of config.py, like other prefixes, so that if the user decides to have an "old", or "archive" top-level category, they can change the archive's prefix to "previous", or "ancient". (Similarly, if the user uses a different locale, they can name it "Архив", or "vieux", or "vorhergehend".) Another proposed option would be to support filtering on any path by appending date and path arguments. I personally dislike this solution, because it seems too complicated, and introduces more ways to mess up (i.e. having a path with path components and a path argument). It was also noted by its proposer that it doesn't address the issue of wanting to allow a path with a four digit number The fifth option, which I completely forgot about at the time of original writing, is to allow archive-based paths everywhere (if it can't otherwise be construed as a directory). So, /dev/2003 would be the directory "/dev/2003" if it existed, and if not, the 2003 archive for the directory "/dev". If you wanted the 2002 entries for the /dev/2003 directory, you would type "/dev/2003/2002", and if you wanted the 2003 archives for the dev directory, you would be out of luck. (But that would have been a specific choice by the blog author, and so I feel it's not unreasonable to say that.) The thread that got me complaining about this issue is at: http://sourceforge.net/mailarchive/forum.php?thread_name=20070913214155.GB30850%40newred.gradwell.net&forum_name=pyblosxom-users The thread where I promised to write this spec is at: http://sourceforge.net/mailarchive/forum.php?thread_name=185aeadc0709140845t16b98868s96bcaa1ac86533a3%40mail.gmail.com&forum_name=pyblosxom-users Outstanding issues ================== 1. The main outstanding issue is that I don't know if anyone is interested enough in changing this to actually do the work. ;)