Altijd een leuk klusje, dievenklauwen plaatsen.
Dat wil zeggen, het loopt in 80% van de gevallen uit op gepruts. De werkwijze is bedriegelijk simpel: boor een gat in de deur, vlak onder het bovenste en vlak boven het onderste scharnier. Plaats de pennen en sla ze met een hamer netjes vast.
So far so good.
Dan de deur rustig en voorzichtig sluiten. De pennen moeten dan een afdruk achterlaten in het kozijn. Die afdruk, zo beweert de handleiding enthousiast, is de plaats waar het gat voor de stalen bus moet komen.
Dat klinkt ook niet zo moeilijk en het geval wil dat speedboren m'n favoriet zijn, maar je hoeft het gat maar een millimeter te ver naar binnen te boren, en de pen loopt hopeloos aan. En dat merk je natuurlijk pas, als je de stalen bus netjes op z'n plek hebt geslagen.
Zie die er dan maar uit te wriemelen.
Met wat meer boorgeweld, een waterpomptang en nu een plamuurklus op de agenda, zit de nieuwe bus (iets grotere diameter, ik had gelukkig nog wat liggen, zo zie je maar weer, nooit wat weggooien) op zijn plaats.
Laat de vullende bruislijm zijn werk nu maar doen.
Pyblosxom uses individual files for the blog entries. The file's mtime - or modification time - is used as the 'time of publication'. As a result fixing a typo or so a day after posting an entry basically resets the time of the entry.
Usually this is not what you'd want.
Pyblosxom's 'contrib' package does include a little Python script that wraps around your editor and sets the mtime back to the original time just after saving (and quiting the editor).
Somehow this script didn't work for me and I had the feeling this could be simpler. At least on a Linux box using the Unix toolset. So I came up with this little script:
1 #! /bin/bash 2 3 EDITOR=$1 4 FILE=$2 5 MTIME=`date -r $FILE +%Y%m%e%H%M.%S` 6 $EDITOR $FILE 7 touch -t $MTIME $FILE
I saved this script as ~/bin/preserve , made it executable and now I can edit older entries like so:
$ preserve joe /path/to/datadir/some-entry.rst
Very comfortable!
ps. I found another aproach to solve the same problem on the macosxhints forum. I think I like mine better though :) since it does not involve creating extra files.
Hoewel we al weer meer dan een jaar op de Oude Kleiweg wonen, blijft het thema klussen nog altijd actueel.
Vandaag veel gedaan.
De deur en het kozijn van het dakterras moesten hoognodig een lik verf. En voor verf moet er geschuurd worden. En voor het schuren haal je de deur eruit. En als je deur eruit haalt, blijken de scharnieren en schroeven toch wel erg roestig, zeg maar compleet vergaan... vervangen dus.
Maar zoals met alles in dit huis: de vorige eigenaren hebben niet bepaald nauwkeurig gewerkt. En dat resulteert in een deur die zelfs met nieuwe scharnieren niet goed sluit, waar je dus altijd aan moeten trekken om hem goed dicht te krijgen.
Uiteindelijk (en na hulp inroepen van pa), lag de oplossing in het ophogen van de scharnieren. Omdat deze te diep verzonken lagen, kwam de deur met het sluiten voortijdig tegen het kozijn aan te liggen. En dat wringt. Letterlijk.
En nog ook even tussendoor: de nieuwe raampjes voor de badkamer pas gemaakt, indeling van de garage aangepast ten behoeve van ruimtewinst, het expansievat van de CV installatie hoger opgehangen - het hangt nu dus niet meer in de weg - en de deur van het toilet aan de onderzijde bijgeschaafd. Nu krast ie niet meer over de stenen vloer in de gang.
Het volgende op de agenda: de nieuwe raampjes voor de badkamer verder schuren, glas bestellen, ze grondverfen en lakken. En ze plaatsen natuurlijk. Maar nu even niet...
This is the first 'real' posting to my blog using PyBlosxom!
I migrated my previous entries using the excellent feedparser library and my Newsbruiser installation can now be retired. In a later entry I should explain my reasons for this switch.
Most of the layout has changed too using more of the 'new' n--tree.net styling. This will be tweaked over time.
Some of the features (like comments and trackbacks etc.) are not yet enabled. This will also be tweaked over time.
For now I'm just happy with the switch.
import sys, os, os.path, time, datetime import feedparser """ Quick & dirty migration script for my newsbruiser entries. """ urls = [ 'http://jw.n--tree.net/blog/syndicate/weblog/2005', 'http://jw.n--tree.net/blog/syndicate/weblog/2004' ] outdirectory = '/path/to/datadir/' def createFilePath(basedir, category, filename): path = os.path.join(basedir, category) try: os.makedirs(path) except OSError: pass filepath = os.path.join(path, filename) return filepath def setMtime(filepath, mtime): t = time.mktime(mtime.timetuple()) os.utime(filepath, (t, t)) def writeBlosxomEntryFile(dir, entry): # date for entry datetime_parts = entry.modified_parsed[:6] entrydate = datetime.datetime(*datetime_parts) # filename based on date of entry datetime_parts = [str(part) for part in entry.modified_parsed[:6]] filename = '-'.join(datetime_parts) + '.txt' title = entry.title body = entry.description # newsbruiser puts body in the description(?) category = entry.get('category', '') filepath = createFilePath(dir, category, filename) file = open(filepath, 'w') print >> file, title + '\n\n' + body file.close() setMtime(filepath, entrydate) if __name__ == '__main__': for url in urls: entries = feedparser.parse(url)['entries'] for entry in entries: writeBlosxomEntryFile(outdirectory, entry)
For migrating blog entries, feedparser should be very useful...
I rediscovered and I'm reconsidering pyblosxom for my little blog. Newsbruiser seems not really active, a bit too idiosyncratic and seems somewhat sluggish too.
Pyblosxom seems much more active, has a understandable architecture and can easily be configured to be run in a mod_python environment. Its also in Debian which make installation somewhat easier.
Now I only need to find an easy way to migrate existing entries...
Friday I returned from a 'business trip' to Vienna.
Since the work was planned for wednesday and thursday, and the plane would onlu depart friday late afternoon, I had a couple of hours to spend in Vienna.
I decided to basically walk around in the center of Vienna and I was lucky to be able to store most of my luggage in a locker in one of the main train stations (which had a direct connection to the airport too!)
St. Stephen's Cathedral became the 'epicenter' for this walk and of course I had a coffee just in front of it too.
I took a couple of pictures - not too many - mainly of some statues I found during my walk. Statues may actually become some sort of photographic theme I might like to explore more...
The day before yesterday we returned from Glamondans, France. We spend two weeks on a nice farmer's campsite. I just uploaded two (preliminary) selections of the pictures I took: 'sverre in glamondans' and 'glamondans'.
As I wrote before I'm using exiftran for rotating images taken with my digital camera. Since I do not have a new PC yet and thus still use the Powerbook. So, I needed exiftran to work on OS X for rotating the images taken during our summer holidays in France.
This proofed not to be completely trivial though.
The exiftran sources can be found via packages.debian.org and it depends on libjpeg and libexif.
I found some hints for installing libjpeg on OS X here:
http://www.bigbold.com/snippets/posts/show/38
Applying these instructions worked just fine for me. I downloaded the libjpeg sources from the Debian repositoriy too.
Building and installing libexif was more involved. After downloading the latest sources from sourceforge.net, my first attempt was trying the usual ./configure && make && sudo make install dance.
Compiling failed on some 'static' declaration of a function. Walco helped me out and suggested to just remove this declaration from libexif/exif-utils.c, line 88. This simple fix made compling and installing work (and I even did my duty by submitting a bugreport and the fix to the libexif project's bugtracker :)!
Compiling exiftran was not to difficult. Exiftran is part of a larger package called fbida. And again, I downloaded the exiftran sources from the Debian repository. Do not forget to first issue make config before issuing make exiftran && sudo make install. There's no ./configure round in this dance.
Exiftran works like a charm now.