On applescript and php, and an archive page

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 personal website. I am the Shelby Cullom Davis Professor of Philosophy at the University of St Andrews, and the Director of the Arché Philosophical Research Centre for Logic, Language, Metaphysics and Epistemology I like thinking about – and helping other people think about – logic and philosophy and the many different ways they can inform each other.

subscribe

To receive updates from this site, subscribe to the RSS feed in your feed reader. Alternatively, follow me at  @consequently@hcommons.social, where most updates are posted.

contact

This site is powered by Netlify, GitHub, Hugo, Bootstrap, and coffee.   ¶   © 1992– Greg Restall.