This is Greg Restall’s website, with news, writings, links, and bite sized updates. For background look below.

On applescript and php, and an archive page

Sunday, June 26, 2005 at 07:24PM

A half hour of php hacking has finally produced a working archive page for the photos I’ve been posting from my phonecam. My little Sony Ericsson T630 phone has a terribly lo-res camera, but it’s fun to take shots now and then when you wouldn’t normally take photos. Now, instead of sliding off the front page when I upload another one, you can see the old photos on the archive page.

What makes the thing fun is that the process of uploading them is so easy. The camera has a bluetooth connection to the computer, so I can get photos from the camera while the camera is still in my pocket. (That’s easy.) Then I drag a photo to an icon on the dock on my computer and the little applescript I wrote pops up a dialogue box to enter a title, and the thing scales the image (the camera takes pictures at 288x352 and I scale them to 180x220 to fit in the sidebar) and uploads the result to the /phonecam directory on consequently.org. The next bit of magic is two php scripts. One on the main page takes the latest jpg file out of the /phonecam directory and puts it in the right sidebar. (The title is the filename with “.jpg” stripped out.) The other is the phonecam page, which uses more php to read the entries in last-to-first order, insert month headers for every new month, and put them on the page.

Let me know if anything looks weird from your end.

About

I’m Greg Restall, and this is my website. I work in Philosophy at the University of Melbourne. Email: greg at consequently.org; Post: School of of Philosophy, Anthropology and Social Inquiry, University of Melbourne, Parkville 3010, Australia.

Start at the home page—a summary of the site. The left column is news, archived on the news archive page. The central column contains recent items from the writing page, which lists my publications. These are also categorised by topic. You can follow my links at my account on delicious and occasional short snarky remarks at @consequently on twitter.

Current CO2 concentration in the atmosphere

To subscribe to this site, either read the full feed  of everything, the feed of news items only , or the feed of writing items only , which is also great for podcasting pdfs automatically.

This site is handcoded: I write text in Textmate, and Webby files things in the right place and uploads them to the server. This page was last modified on 2009-01-07 at 12:15PM.

Thought

I would far rather feel contrition than be able to define it.
— Thomas À Kempis Imitation, Book 1, Chapter 1.