Re: pyarchives_enhanced.py updated package
Ryan Barrett <pyblosxom-6sb6M7qyT/[email protected]> Fri, 3 Oct 2008 09:44:28 -0700 (PDT)
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
awesome, thank you! (sorry for the delay.) overall, this looks great. i have a few comments and requests, and i made a couple minor stylistic changes, but nothing major. let me know if you'd like to address the feedback first, or if i should check this in as is and you'll send more patches later. first, it looks like pyarchives_enhanced.py is no longer used. i should delete that from trunk, right? i like that you made the html customizable through the config variables. it's complex enough that it's probably worth using a full-blown flavour template instead. a couple other plugins do this, e.g. comments, which you could use as an example. we've started leaning harder on unit testing recently, e.g. http://pyblosxom.sourceforge.net/wiki/index.php/Tests and http://pyblosxom.sourceforge.net/wiki/index.php/Framework_for_testing_plugins . would you mind adding some unit tests? finally, thanks for the detailed file docstring in pyarchives.py! it's really useful. i'd actually maybe even consider putting more of it in the README. on a similar note, would you mind adding docstrings to the new functions? they don't have to be big. On Sat, 20 Sep 2008, Klaus Trainer wrote: > [after a loong delay...] > > On Mon, 28 Jul 2008, Ryan Barrett wrote: > >> one request: i'd like to see the common code in pyarchives.py and >> pyarchives_enhanced.py enhanced. ideally, pyarchives_enhanced users would >> install both, and pyarchives_enhanced.py would enable itself, disable >> pyarchives.py, and reuse the common pieces. >> > > I've finally realized your proposal. The plugin is now 100% backward > compatible with the old pyarchives.py plugin. People using the newer > pyarchives_enhanced.py plugin just need to define > py['archives_enhanced'] = True > in their config.py, so it's also 100% backward compatible to the former > pyarchives_enhanced.py then. > > What I've done in pyarchives_enhanced.py was to rename the method > "genLinearArchive" to "genEnhancedArchive" and paste the method > "genLinearArchive" from pyarchives.py into it. Then I added a check > whether "archives_enhanced" is set True, depending on this, > "genEnhancedArchive" or "genLinearArchive" will be invoked. > After all I've renamed pyarchives_enhanced.py to pyarchives.py, so there > will be no separate enhanced version anymore. > > I've also made minor changes to pyarchives.js, the toggling > functionality is now even more similar to blogspot, i.e. the most recent > archives are now open by default. > > example.css (the version from the previous attached package) has been > renamed to pyarchives.css. > > README has also been updated according to the changes. > > > Regards, > > Klaus > -Ryan -- http://snarfed.org/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/