<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Pyblosxom on Random notes from mg</title>
    <link>https://mg.pov.lt/blog/tags/pyblosxom.html</link>
    <description>Recent content in Pyblosxom on Random notes from mg</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>marius@gedmin.as (Marius Gedminas)</managingEditor>
    <webMaster>marius@gedmin.as (Marius Gedminas)</webMaster>
    <copyright>Copyright © 2004–2020 Marius Gedminas</copyright>
    <lastBuildDate>Sat, 16 May 2009 06:13:33 +0300</lastBuildDate>
    <atom:link href="https://mg.pov.lt/blog/tags/pyblosxom/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Enabling comments in PyBlosxom</title>
      <link>https://mg.pov.lt/blog/blog-comments.html</link>
      <pubDate>Sat, 16 May 2009 06:13:33 +0300</pubDate>
      <author>marius@gedmin.as (Marius Gedminas)</author>
      <guid>https://mg.pov.lt/blog/blog-comments.html</guid>
      <description>
&lt;p&gt;I&#39;ve just spent the whole night setting up blog comments.  PyBlosxom doesn&#39;t
make it painless, sadly, more like the opposite.&lt;/p&gt;

&lt;p&gt;First: don&#39;t be scared by the list of comment-related plugins on the
PyBlosxom site.  There&#39;s only one important plugin: comments.  All others
depend on it and enhance its functionality. The last three or four times I was
about to add comments to my blog I got scared at step one: evaluate the
available plugins.  Don&#39;t repeat my mistake!&lt;/p&gt;

&lt;p&gt;Second, follow the instructions carefully.  There&#39;s no shortcut.&lt;/p&gt;

&lt;p&gt;Third, fix what&#39;s broken.  Be prepared to debug the source code.  &lt;tt&gt;print
  &amp;gt;&amp;gt; sys.stderr, &#34;message&#34;&lt;/tt&gt; is your friend.&lt;/p&gt;

&lt;p&gt;Fourth, fiddle with the look (CSS and HTML).&lt;/p&gt;

&lt;p&gt;Fifth, write a blog post and eagerly await your first comments.&lt;/p&gt;

&lt;p&gt;Step 3 screams for an explanation, doesn&#39;t it?  Problem 1: the comments
plugin requires that you use categories in your blog.  I&#39;m not (I&#39;m holding out
for tags).  Workaround: comment out &lt;tt&gt;if entry[&#39;absolute_path&#39;]&lt;/tt&gt; check in
cb_story and cb_story_end.&lt;/p&gt;

&lt;p&gt;Problem 2: the AJAX post returns &#34;Empty response from server&#34;.  Workaround:
modify cb_story_end to call readComments directly if &lt;tt&gt;entry[&#39;num_comments&#39;]
  is
  None&lt;/tt&gt;, since cb_story, which usually does the read, is not called during
the AJAX post.&lt;/p&gt;

&lt;p&gt;Problem 3: if you enable comment moderation (by setting comment_draft_ext to
a different value from comment_ext), the AJAX post returns &#34;Empty response from
server&#34; once more.  Workaround: modify cb_prepare to notice this case and set
&lt;tt&gt;data[&#39;moderated&#39;] = True&lt;/tt&gt;, create a new template comment-moderated and
render it in cb_story_end just like the preview template is rendered; also modify
__shouldOutput to return True when rendering comment-moderated.&lt;/p&gt;

&lt;p&gt;I&#39;ll post patches to the pyblosxom mailing tomorrow, unless I forget.  It&#39;s
6 am already, and I&#39;m kind of sleepy.  I just hope I haven&#39;t inadvertently
broken my RSS feed or flooded any planets.&lt;/p&gt;

&lt;p&gt;Oh, and a helpful hint: don&#39;t name the post you&#39;re writing
&lt;tt&gt;comments.txt&lt;/tt&gt;, or the #comments anchor will point to the start of the
story instead of the comments.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Baking CSS into RSS</title>
      <link>https://mg.pov.lt/blog/baking-css-into-rss.html</link>
      <pubDate>Fri, 03 Apr 2009 09:37:40 +0300</pubDate>
      <author>marius@gedmin.as (Marius Gedminas)</author>
      <guid>https://mg.pov.lt/blog/baking-css-into-rss.html</guid>
      <description>
&lt;p&gt;Wanted: PyBlosxom plugin to bake CSS styles into the RSS feed, i.e.
replace things like &amp;lt;span style=&#34;keyword&#34;&amp;gt; in the main blog pages with
things like &amp;lt;span style=&#34;color: #ff7700&#34;&amp;gt; in the RSS.&lt;/p&gt;

&lt;p&gt;Also wanted: a spam-resistant comments plugin.  (Maybe some/all of them are?
I was always afraid to try.)   And a tags plugin (categories are too limiting).
And useful page titles.  And a pony.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Laurence Rowe and Alexander Artemenko suggested I
check out &lt;a href=&#34;http://code.google.com/p/cssutils/&#34;&gt;cssutils&lt;/a&gt;.  Alexander
also pointed out that &lt;a
  href=&#34;http://stackoverflow.com/questions/118685/how-can-i-apply-my-css-stylesheet-to-an-rss-feed&#34;&gt;a
  similar question was asked on stackoverflow&lt;/a&gt;.  &lt;!-- Sadly, most of the answers
there are variations &#34;you shouldn&#39;t do that you impurely-thinking person&#34;, with
some exceptions that allow as to how this may sometimes be a valid need, but
don&#39;t point to any tools achieving that.--&gt;  Peter Bengtsson recently posted &lt;a
  href=&#34;http://www.peterbe.com/plog/premailer.py&#34;&gt;a similar tool&lt;/a&gt; built with
lxml and regexps.  Meanwhile, I took the plunge and installed a comments
plugin, and even somehow managed not to get drowned in spam.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>More on PyBlosxom</title>
      <link>https://mg.pov.lt/blog/pyblosxom-setup.html</link>
      <pubDate>Sun, 16 Jan 2005 21:38:25 +0200</pubDate>
      <author>marius@gedmin.as (Marius Gedminas)</author>
      <guid>https://mg.pov.lt/blog/pyblosxom-setup.html</guid>
      <description>
&lt;p&gt;I want to store my blog in Subversion.  Problem: &lt;a
href=&#34;http://subversion.tigris.org/issues/show_bug.cgi?id=1256&#34;&gt;Subversion does
not preserve mtimes of files&lt;/a&gt;.  Solution: a plugin like &lt;a
href=&#34;http://pyblosxom.sourceforge.net/blog/registry/files/pyfilenamemtime&#34;&gt;pyfilenamemtime&lt;/a&gt;,
but different (I do not want to rename existing blog entries).  Since I want to
import my existing blog entries without renaming them, I wrote a &lt;a
href=&#34;https://mg.pov.lt/timestamps.py&#34;&gt;plugin that reads timestamps from a
separate text file&lt;/a&gt;.  This should suffice, in addition to adding&lt;/p&gt;
&lt;pre&gt;
[miscellany]
### Set use-commit-times to make checkout/update/switch/revert
### put last-committed timestamps on every file touched.
use-commit-times = yes
&lt;/pre&gt;
&lt;p&gt;to &lt;tt&gt;~/.subversion/config&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Now I want to have an RSS or Atom feed that &lt;a
href=&#34;http://feedvalidator.org/&#34;&gt;validates&lt;/a&gt;.  Answer: &lt;a
href=&#34;http://pyblosxom.sourceforge.net/blog/registry/syndication/rss2renderer&#34;&gt;rss2renderer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I&#39;d like to have browsable archives for entries that do not fit on the front
page (and then make the front page contain fewer entries).  There are plugins
in the &lt;a
href=&#34;http://pyblosxom.sourceforge.net/blog/registry?sortby=path&#34;&gt;PyBlosxom
plugin registry&lt;/a&gt; that look promising: pyarchives, wbgpager.&lt;/p&gt;

&lt;p&gt;More wishes: I want to be able to post blog entries with images.  I&#39;d like
to be able to be able to add new blog entries with gnome-blogger and via a web
form.  And I want to have drafts that I can look at until I become satisfied
and publish.  &lt;/p&gt;

&lt;p&gt;Stay tuned, if I figure out how to accomplish what I want, I&#39;ll blog about
it.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Pyblosxom badness</title>
      <link>https://mg.pov.lt/blog/pyblosxom-badness.html</link>
      <pubDate>Thu, 30 Sep 2004 01:29:24 +0300</pubDate>
      <author>marius@gedmin.as (Marius Gedminas)</author>
      <guid>https://mg.pov.lt/blog/pyblosxom-badness.html</guid>
      <description>
&lt;p&gt;I&#39;ve just discovered that Pyblosxom&#39;s default (i.e. builtin) RSS template
does not include dates nor IDs.  I&#39;m disappointed.  This kind of breaks
the whole &#34;usable out of the box&#34; feeling.&lt;/p&gt;

&lt;p&gt;Google to the rescue: after a brief look at &lt;a
href=&#34;http://www.lychnis.net/blosxom/debian/blosxom-pubDate.lychnis&#34;&gt;Blosxom
and RSS&lt;/a&gt; and &lt;a href=&#34;http://fooishbar.org/~daniel/pyblosxom-rss/&#34;&gt;Daniel&#39;s
pyblosxom RSS templates&lt;/a&gt; I&#39;ve borrowed Daniel&#39;s &lt;a
href=&#34;http://fooishbar.org/~daniel/pyblosxom-rss/story.rss&#34;&gt;story.rss&lt;/a&gt;
with a different timezone substituted.  Doesn&#39;t pyblosxom have a variable
that would expand into the server&#39;s time zone?  What about daylight savings
time -- do I have to edit story.rss twice a year, or what?&lt;/p&gt;

&lt;p&gt;I&#39;m disappointed.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
