patch to extract license data

Santiago Gala sgala at apache.org
Mon Nov 12 07:40:49 EST 2007


El sáb, 10-11-2007 a las 12:38 -0800, Nathan Kinkade escribió:
> 2007/11/10, Sam Ruby <rubys at intertwingly.net>:
> > Asheesh Laroia wrote:
> > > On Wed, 7 Nov 2007, Nathan Kinkade wrote:
> > >
> > >> I've put together a small patch that will extract license data from
> > >> feeds and then make that data available to the templates.
> > >
> > > Hey, planet folks - any comments on this patch?  It's been a few days
> > > with no response, so I figured I'd reping the list on N. Kinkade's behalf.
> > >
> > > It's pretty simple; I'm attaching it in case that's a preferred format.
> > > Do let us at CC know if it needs some changes or improvement.
> > >
> > > It takes advantage of feedparser's license extraction from feeds and
> > > lets you display that data in the template.
> >
> > I'm not sure why I never saw the original post, but I do have a few
> > comments:
> >
> > Per contributing[1], I would like to see some documentation, and a test.
> >   That could be as simple as a single file in tests/data/filter/tmpl
> > [2], and a table row in docs/templates.html [3].
> >
> > I'd gladly include a new theme that shows off cc, but I would rather the
> > classic fancy theme itself be left unchanged.
> >
> > Finally, I'd rather that the fetching and styling of the license
> > information be moved into a plugin, and not placed inside the venus code
> > itself.  Ideally, the fetching would cache the results, but if it is in
> > an optional plugin, I'm not overly concerned.  You can look at
> > mememe.plugin[4] for examples on how to do all this.
> >
> > - Sam Ruby
> >
> > [1] http://intertwingly.net/code/venus/docs/contributing.html
> > [2] http://intertwingly.net/code/venus/tests/data/filter/tmpl/
> > [3] http://intertwingly.net/code/venus/docs/templates.html
> > [4] http://intertwingly.net/code/venus/filters/mememe.plugin
> 
> I don't think the original email ever made it to the list.  It was
> (is?) stuck waiting for moderator approval, at least that's what an
> email I received told me, but I'm subscribed to the list now.
> 
> I'll be happy to move the changes into a plugin, and I'll take a look
> at the mememe.plugin example you gave.
> 
> Sorry about the lack of documentation.  Submitting these changes back
> to Venus was an after-thought (given to me by Asheesh), so I hadn't
> given much thought to formal documentation, outside of comments inline
> with my changes.
> 
> As far as changes to the templates and/or showcasing a special CC
> template, I believe our custom template is most likely way too CC
> specific to be of much use to anyone else.
> http://planet.creativecommons.org, rather mimics the main
> http://creativecommons.org site.  But maybe I'm wrong about the
> utility of that theme.  I only made the change to classic_fancy theme
> as a simple demonstration of how to insert the license data, which is
> really nothing more than putting <TMPL_VAR license> wherever one
> wants, provided it's inside of the an "Items" loop.  I had initially
> been putting the license data in the "Channels" list as well, but
> later took it out, deeming it unnecessary.
> 
> Let me take a look at moving the small amount of code out of Venus and
> into a plugin, caching CC license name lookups to a local file, and
> also putting together a little more documentation.
> 

While this goes on, and if you have a server out somewhere, setting up a
bazaar-ng setup as the one Sam has (or myself at
http://memojo.com/~sgala/code/venus ) can help showcase your changes,
themes, plugins, etc...

Sam has a feed that aggregates different "branches" of venus, at:
http://planet.intertwingly.net/venus/ ) My changeset points to a trac
that should show cute differences on commits, using a tweaked  bzr-feed
http://memojo.com/~sgala/code/bzr-feed/ that I have not managed to send
back or clean up.

The only non trivial tasks are:
- installing and setup bzr-feed to generate atom from changelog
- having a cgi (as Sam does), to generate a zip or bzip2 of the
"distribution.

Regards
Santiago

> Thanks,
> 
> Nathan



More information about the devel mailing list