However, the default tag cloud isn't sorted, so finding things in it is, well, hard.
Here is a patch that will sort your tag cloud alphabetically.
Sun, 08 Apr 2007Pyblosxom sorted tag cloud patch
wxs has this neat tag cloud thing on
his site. I like it so much, I wanted it here on this site, so I installed
plugin last night and put it in place of the 'categories' section of the
sidebar.
However, the default tag cloud isn't sorted, so finding things in it is, well, hard. Here is a patch that will sort your tag cloud alphabetically.
Comments: 1 (view comments)
Sun, 23 Jul 2006Antispam pyblosxom plugin, followup!REJECT: Comment attempt by 210.113.83.6 rejected. Reason: Invalid secret token: 'pleaseDontSpam' REJECT: Comment attempt by 210.120.79.179 rejected. Reason: Invalid secret token: 'pleaseDontSpam' REJECT: Comment attempt by 200.156.25.4 rejected. Reason: Invalid secret token: 'pleaseDontSpam' REJECT: Comment attempt by 220.125.164.243 rejected. Reason: Invalid secret token: 'pleaseDontSpam' REJECT: Comment attempt by 69.57.136.39 rejected. Reason: Invalid secret token: 'pleaseDontSpam' ...The list goes on. Well over 50 invalid tokens were found. The 'pleaseDontSpam' was the original secret token I used. Just goes to show that, for the moment, most spam bots don't review the page before submitting. Admittedly, 2 spams got through, I have not investigated why, yet.
Comments: 1 (view comments)
Pyblosxom comment antispam plugin
Ever since I added comments to this site, I've started getting comment spam. To
combat this, I hacked together a comment management system using jquery and
python. It lets me search comments and delete them via web interface.
I'm bored of deleting comments by hand. So, I wrote a little antispam plugin. This plugin creates a token that expires after a given period of time. This token is used as a hidden item in the comment form. If this token is expired when the form is submitted, the comment is rejected. Spam seems to come entirely from solo-connection POST requests. This means that the bots don't bother viewing the page first. In theory, the bots will be using a cached idea of the form, which will be expired. We'll see how well this works. Right now it just uses a timestamp. If that fails, I'll add other tokens such as source IP, etc. Perhaps cookies too? This should be simple to filter out, becuase the spam bots don't act anything like humans with regards to browsing behavior. I have enabled the plugin on this site. I'll post the source when I see it actually working correctly. Waiting for spam bots to come by is boring :(
Comments: 3 (view comments)
Tue, 11 Jul 2006Pyblosxom single-entry page title plugin
The page titles pyblosxom provides are usually great. However, when there is
only one entry displayed, I feel it would be better to rely on that entry's
title.
I wrote a very short plugin to do just that. Turns out the plugin api for pyblosxom is quite easy to understand, and this hack was only about 10 lines. pagetitle.py adds a new variable which will contain the standard page title, unless there is only one entry in view. If there is only one entry in view, the page title is augmented with the story title aswell. This makes search engine results and browsers happier, as they can recognize what your page is about by the title. User experience good, also good for search engines. The new variable you want to use is: $blog_title_or_entry_title If you want to get a better idea of what this plugin does, you can click the permalink below to view only this entry. The page title (in the url bar) should now reflect this entry's title.
Comments: 1 (view comments)
Fri, 30 Jun 2006Pyblosxom contributed plugins for 1.3.x finally out
Subject says it all. I've really wanted comments working in pyblosxom 1.3 for quite some time. However, all googling points to old versions of the comments plugin that only works on the older versions. I checked the pyblosxom page tonight and was pleasantly surprised that a contributed plugin set had been released early this month.
If you use pyblosxom 1.3.x, plugin updates are ready for your use. On that note, comment functionality is FINALLY here on this site. To those of you reading this site, feel free to comment! I love feedback.
Comments: 0 (view comments)
Fri, 07 Apr 2006All known-broken entries now fixed
Thanks to my handy
vim-pybloxsom hack, I took time today to go back through all entries I had
marked broken during the move from my old site to here.
Those entries should now be good now with fixed links, etc. Ahh, sweet productivity.
Comments: 0 (view comments)
Vim hack for Pyblosxom entry backdating
Hurray! I finally got around to hacking a little script for vim that will
automatically track posting dates for pyblosxom entries. It does the following:
My "vim scripting"-fu is not strong, so there's probably a cleaner/fancier way to do this. Anyhoo, you'll need the following in your .vimrc:
" PyBlosxom stuff
augroup pyblosxom
autocmd BufReadPost /home/jls/public_html/entries/*/*.txt call Pyblosxom_checkdate()
autocmd BufNewFile /home/jls/public_html/entries/*/*.txt call Pyblosxom_putdate()
autocmd BufWritePost /home/jls/public_html/entries/*/*.txt call Pyblosxom_fudgedate()
augroup end
function Pyblosxom_checkdate()
" Look in the file for '#mdate foo' metadata
normal 1G
let dateline = search("^#mdate")
" If not found, append the mdate of the file to line 2
if dateline < 1
let dateline = 1
let date = system("stat -f '#mdate %Sm' " . expand("%"))
" Add the date to the file on line 1
1put=date
endif
endfunction
function Pyblosxom_putdate()
let date=strftime("#mdate %b %e %H:%M:%S %Y")
1put=date
goto 1
endfunction
function Pyblosxom_fudgedate()
let l=search("^#mdate")
let l=strpart(getline(l), 7)
let cmd="date -j -f '%b %e %H:%M:%S %Y' '" . l . "' +%y%m%d%H%M"
let touchtime=system(cmd)
let touchcmd="touch -t '" . strpart(touchtime,0,strlen(touchtime)-1) . "' '" . expand("%") . "'"
call system(touchcmd)
e
endfunction
Comments: 0 (view comments)
Thu, 23 Mar 2006Site move almost done
Spent a bit playing with pyblosxom and such. It's crazy easy to setup. It meets my requirements in that it lets me post things, has useful plugins I want to use, and doesn't require a massive database system.
There's still lots to do:
Comments: 1 (view comments)
|
Search this siteNavigationMetadataHome About Resume My Code (SVN Web)ArticlesARP Security Dynamic DNS with DHCP OpenLDAP+Kerberos+SASL PPP over SSH SSH Security: /bin/false Week of Unix Tools Work EfficiencyProjectsfex firefox tabsearch firefox urledit grok keynav liboverride newpsm (FreeBSD) nis2ldap pam_captcha poor man's backup Solaris audio utility xboxproxy xdotool xmlpresenter xpathtool misc scriptsPresentationsYahoo! Hack Day '06 Unix Essentials Vi/Vim EssentialsTag CloudCalendar
FriendsBarCamp Kent Brewster Tantek Çelik John Resig Wesley Shields Tyler ShieldsTechnorati |
|||||||||||||||||||||||||||||||||||||||||||||||||