I've been doing some more work on expandRss, as I find new feeds that need tweaking I'm either delighted to find expandRss handles them easily, or I need to revamp it to make it better.
The pretty o.k. fark.com feed over at pluck stopped working and now redirects to the fark feed which sucks. Every article in the fark feed points to the inane comments board when you really want to go off to the actual link location. The exception to this is with photoshop or captions contests where you really want to go to the voting results not the raw comments section. expandRss now has a custom feedexpander to do all this. Non Photoshop/Captions items now point to the destination and add a link to the comments to the description (incase you think someone may have something interesting to add. Photoshop/Captions entries send you right to the voting results.
You can now also find start and end tags using regular expressions which is useful for some feeds (penny arcade). You can also reference some of the local variables in your matching strings too (like anchor).
I also added the sourcing of ~/.expandRssrc.py since I have some feeds I modify that I don't want to share with you (sorry folks) so I put them in here, this means I don't need to edit expandRss from my bin directory to my website when I publish a new version.
Download the new version of expandRss.
Edit: I should note that I find the fark feed to be too noisy to actually subscribe, I just keep a mozilla keyword set up for farkrss and when I feel like wasting time I read it in google reader like this
http://www.google.com/reader/preview/*/feed/URL_OF_RSS_FEED
as you can see I'm keeping the location of my feeds out of this blog.
The new expandRss also has a simple example of producing full article content for diaryland journals.
Friday, December 30, 2005
Tuesday, December 27, 2005
iPhoto is a piece of shit
This blog is mostly about the scripts that I write, I'm trying to give back... but I reserve the right to talk about other techy things every now and again and today is one of those days...
I've spent the best part of a day splitting my iPhoto library into 6 separate libraries. Why? Because if I don't, iPhoto is slower than mole-asses. How hard is it to display an image and let me give it a star rating and move onto the next image without locking up my machine for 10 seconds. How hard is it to select a bunch of images and give them a keyword. This isn't rocket science. Well since I've split up my libraries it doesn't look like it's going to be easy to update my iPod Photo with photos from all libraries
which is a shame. However this does seem to have solved my iPhoto performance
problems.
I had 15K photos from about 5 years, mostly all 1-2 Megapixels That was about 9Gigs of photos with another 6 Gigs used by the iPod Photo Cache.
Here's how to do it... Copy your iPhoto Library directory to a new directory e.g. "2005 Library" (if you're feeling fancy you can skip copying the iPod Photo Cache directory.
Open up iPhoto and hold down alt/option while it starts, you can now select your 2005 Library and open it. Use the calendar to select all images that are not in 2005 and erase them (I hold down option, cmd and delete) and then empty the trash (command, shift, delete), remove all unused/empty albums. kill iPhoto. Restart iPhoto, but this time hold down option AND command, select to rebuild everything. Let it run for 10 minutes.
Now if you're feeling fancy you can go into your 2005 Library in a Terminal and do a
find 19* 200[^5] | fgrep .
this will show you all the files that have periods and are in years you supposedly just erased. Hopefully there will only be a bunch of DS_Store directories. As long as there are no images in those directories replace fgrep with rm -rf in that above command line to clear them up.
Do this for each year, or whatever natural split would make sense for you. You can get fancy by copying the whole library only twice and then splitting the difference repeatedly to avoid the amount of file copying.
If only Picasa was available for OSX. I hear aperture is even more of a machine grinder.... and what's up with not letting me fix a wonky horizon in iPhoto?
And while I'm bitching, I'm still super pissed that Apple stole my smart playlist updating on my iPod, you see I mostly use my iPod to rate my music, I have a playlist with genre == whatever and my rating == nostars. Then I can listen to it, rate my songs and I know all songs on that playlist need rating, It's nice to see the number of songs on the playlist go down as I revisit it and rate more songs. Well they stole it from me, an iPod update took that functionality away and I had to reimage the entire iPod (60 gigs!) with an older firmware which I still had lying around (a miracle!) and now I miss the nicer menu navigation in the newer firmware. Bastards.
Apple Tech Note, SmartPlaylists.com rants. Believe me I've sent plenty of feedback to Apple on this one...
These two experiences are really making me wonder about my OSX fandom, I love love love the window manager in OSX (wish it had focus follows mouse, but love the transient window behavior). I love that almost everything can be keyboard shortcuts (even selecting different Firefox windows (command-tilde), and I really like the arrow keys on my powerbook and how you can page up/down with a modifier key (I really miss that when I use a windows laptop now). I love running X windows from my Linux box at work right here at home on my Mac and it's almost seamless. I love how built in everything is (address book/calendar) and I even got used to the command-C/V/X pasting. But when these applications break, or suck, I'm stuck with them and I need to get used to it, this lock-in really worries me. Not that windows would solve my iPod problems...
I've spent the best part of a day splitting my iPhoto library into 6 separate libraries. Why? Because if I don't, iPhoto is slower than mole-asses. How hard is it to display an image and let me give it a star rating and move onto the next image without locking up my machine for 10 seconds. How hard is it to select a bunch of images and give them a keyword. This isn't rocket science. Well since I've split up my libraries it doesn't look like it's going to be easy to update my iPod Photo with photos from all libraries
which is a shame. However this does seem to have solved my iPhoto performance
problems.
I had 15K photos from about 5 years, mostly all 1-2 Megapixels That was about 9Gigs of photos with another 6 Gigs used by the iPod Photo Cache.
Here's how to do it... Copy your iPhoto Library directory to a new directory e.g. "2005 Library" (if you're feeling fancy you can skip copying the iPod Photo Cache directory.
Open up iPhoto and hold down alt/option while it starts, you can now select your 2005 Library and open it. Use the calendar to select all images that are not in 2005 and erase them (I hold down option, cmd and delete) and then empty the trash (command, shift, delete), remove all unused/empty albums. kill iPhoto. Restart iPhoto, but this time hold down option AND command, select to rebuild everything. Let it run for 10 minutes.
Now if you're feeling fancy you can go into your 2005 Library in a Terminal and do a
find 19* 200[^5] | fgrep .
this will show you all the files that have periods and are in years you supposedly just erased. Hopefully there will only be a bunch of DS_Store directories. As long as there are no images in those directories replace fgrep with rm -rf in that above command line to clear them up.
Do this for each year, or whatever natural split would make sense for you. You can get fancy by copying the whole library only twice and then splitting the difference repeatedly to avoid the amount of file copying.
If only Picasa was available for OSX. I hear aperture is even more of a machine grinder.... and what's up with not letting me fix a wonky horizon in iPhoto?
And while I'm bitching, I'm still super pissed that Apple stole my smart playlist updating on my iPod, you see I mostly use my iPod to rate my music, I have a playlist with genre == whatever and my rating == nostars. Then I can listen to it, rate my songs and I know all songs on that playlist need rating, It's nice to see the number of songs on the playlist go down as I revisit it and rate more songs. Well they stole it from me, an iPod update took that functionality away and I had to reimage the entire iPod (60 gigs!) with an older firmware which I still had lying around (a miracle!) and now I miss the nicer menu navigation in the newer firmware. Bastards.
Apple Tech Note, SmartPlaylists.com rants. Believe me I've sent plenty of feedback to Apple on this one...
These two experiences are really making me wonder about my OSX fandom, I love love love the window manager in OSX (wish it had focus follows mouse, but love the transient window behavior). I love that almost everything can be keyboard shortcuts (even selecting different Firefox windows (command-tilde), and I really like the arrow keys on my powerbook and how you can page up/down with a modifier key (I really miss that when I use a windows laptop now). I love running X windows from my Linux box at work right here at home on my Mac and it's almost seamless. I love how built in everything is (address book/calendar) and I even got used to the command-C/V/X pasting. But when these applications break, or suck, I'm stuck with them and I need to get used to it, this lock-in really worries me. Not that windows would solve my iPod problems...
Sunday, December 18, 2005
blog moved
I've moved this blog to wtwf.com my pseudo anonymous domain.
I'll get all the redirects working sometime soon...
Apologies if this all looks like new articles, shouldn't happen again...
I'll get all the redirects working sometime soon...
Apologies if this all looks like new articles, shouldn't happen again...
Sunday, December 04, 2005
Blogger Templates and php files
So I love blogger (dot com), it rocks, my biggest problem with it is the pain in the ass template system. I think I've found a solution I'm happy with, it allows me to edit a template on my own machine and see results instantly and then copy it over to publish it on my site. It's a lot better (for me) than using the editing textarea on the blogger site and waiting for a publish that may, or may not, work. Since it requires PHP on your server you have to be publishing to your own server via ftp or sftp. If you don't have PHP get it and continue reading...
A word of warning... If you've already started on your blog and have posts and everything then you'll need to change the filename of your main page to index.php and then it's always good to rename your archive page to be a .php too. Republishing your entire blog wont rename all your old entries to .php, you need to go and pretend to edit, then publish every single one of them to make them all .php files. Start at the bottom of your list of posts to the links to previous articles is all correct (this is the voice of experience talking here).
So Here's how you do it...
Save template.txt as your template in the blogger.com UI. Make sure the paths in the include point at the file location of your blog.template.php file.
Save blog.template.php in the place you pointed your blogger.com template at on your server. You'll see a pattern where the includes in your blogger.com template match the strings in the blog.template.php. You'll notice I called mine blog.template.txt on my server, so you can view the source correctly and download it. You must call yours blog.template.php.
So here's the almost clever bit, you can point your browser at blog.template.php and you should see what your blog looks like. You should make a copy of it, call it blog.template.dev.php in the same directory as blog.template.php. Now you can view your blog with ?template=dev and it will load your other file, this will allow you to work on the look of your blog and then when you're happy with it you just copy blog.template.dev.php over blog.template.php and you've 'pushed' your new look.
So I can hear you wondering... If he has all this fancy pants template stuff, how come his site still looks like shite? Well, I'm afraid it doesn't come with any boost in graphic design skillz. Hope you find this useful.
A word of warning... If you've already started on your blog and have posts and everything then you'll need to change the filename of your main page to index.php and then it's always good to rename your archive page to be a .php too. Republishing your entire blog wont rename all your old entries to .php, you need to go and pretend to edit, then publish every single one of them to make them all .php files. Start at the bottom of your list of posts to the links to previous articles is all correct (this is the voice of experience talking here).
So Here's how you do it...
Save template.txt as your template in the blogger.com UI. Make sure the paths in the include point at the file location of your blog.template.php file.
Save blog.template.php in the place you pointed your blogger.com template at on your server. You'll see a pattern where the includes in your blogger.com template match the strings in the blog.template.php. You'll notice I called mine blog.template.txt on my server, so you can view the source correctly and download it. You must call yours blog.template.php.
So here's the almost clever bit, you can point your browser at blog.template.php and you should see what your blog looks like. You should make a copy of it, call it blog.template.dev.php in the same directory as blog.template.php. Now you can view your blog with ?template=dev and it will load your other file, this will allow you to work on the look of your blog and then when you're happy with it you just copy blog.template.dev.php over blog.template.php and you've 'pushed' your new look.
So I can hear you wondering... If he has all this fancy pants template stuff, how come his site still looks like shite? Well, I'm afraid it doesn't come with any boost in graphic design skillz. Hope you find this useful.
Friday, December 02, 2005
CHP Highlight interesting Greasemonkey script
If you drive around California you'll find the CHP website very very useful. You can see all the CHP dispatches and see where the problems are. The custom region option is really nice to pare down the reports to areas you actually drive.
I made a small greasemonkey script to take that to the next level and make the roads or events your interested in highlight and move to the top of the list. Just enter the road names, or keywords you want in the top of the script and tah dah, you're golden.
chphighlight.user.js
If I was feeling really fancy I would have allowed you to edit the wods in a UI (like Mihai's gmail saved searches does) but I'm really not in the mood for that right now. Perhaps version 2?
I made a small greasemonkey script to take that to the next level and make the roads or events your interested in highlight and move to the top of the list. Just enter the road names, or keywords you want in the top of the script and tah dah, you're golden.
chphighlight.user.js
If I was feeling really fancy I would have allowed you to edit the wods in a UI (like Mihai's gmail saved searches does) but I'm really not in the mood for that right now. Perhaps version 2?
Subscribe to:
Posts (Atom)