Categories
General

Birthdaze 0.4

I’ve been using an embedded Google Calendar instead of this plugin for my family site so it hasn’t been getting much attention lately. Vac posted a comment asking about a couple of changes to make the plugin a little more flexible – having options to show full last names and to remove the “th,” “nd,” and so on from the displayed dates. This release adds those options to the widget and template functions. For extra fun, I also added a shortcode to make adding a birthday list to a page or post much easier. Check the readme for details on how to use it.

Download it: birthdaze_0.4.zip

Categories
General

Converting a PNG to a PDF

Why I wanted to do this: I got an IRS PDF form from someone. Many of the fields on the form were fillable, but obviously it couldn’t be signed – and the date field also wasn’t fillable. So, I could have just printed it out, completed it, then mailed it, but this is 2010 fergawdsakes! I know that Adobe thoughtfully sells just the tool for the job, but that’s no fun at all.

I knew I could import the PDF into Gimp (converting it into a bitmap) and edit it there, dropping in my signature and whatnot. Next I needed to turn the bitmap back into a PDF. Gimp doesn’t make PDFs, so I saved the bitmap as a high-res PNG and went looking for something to convert a PNG into a PDF.

ImageMagick should have immediately occurred to me, but I needed Google to connect the dots. Here’s the command I figured out after some trial-and-error:

convert -page Letter -density 28.3 input.png output.pdf

Note that the 28.3 part was specific to the resolution of my PNG. Using other values, when I checked the PDF’s properties the dimensions weren’t 8.5×11 – so I just tried numbers until I got close enough. I’d imagine there’s an automated way to do the calculation, but for just one PDF trial-and-error worked fine for me.

Categories
General

flickpress 1.4

Jonathan asked if I could add descriptions and EXIF data to the captions so I decided to give it a go. After some wrestling with JavaScript escaping issues I think I’ve got it working correctly. Please let me know if not!

If you’re curious about escaping data to pass from PHP to JavaScript, I used rawurlencode in PHP and then unencode in JavaScript to decode it. I still don’t know if that’s the correct method.

You can style the table of EXIF data using the flickr-exif class in your theme.

You can get flickpress from the WordPress Plugins Directory.

…or right here: flickpress_1.4.zip

Here’s what a photo with caption, description, and EXIF table looks like:

National Christmas Tree

National Christmas Tree by izik

The tree at the Capitol is the Capitol Christmas Tree, and the one at the White House is the National Christmas Tree.

Camera:Canon EOS DIGITAL REBEL XT
Exposure:1/500
Aperture:f/0.0
Focal Length:0 mm
Exposure Bias:-2/3 EV
ISO Speed:100
Flash:Off, Did not fire
Categories
General

flickpress 1.3…

Too soon, I know, but this update actually adds a useful feature. Here’s what’s new:

  • Added an option to set the class for the caption div. It defaults to “alignnone” as before if you don’t set it to anything.
  • Updated phpFlickr to the latest version. Nothing new from that so far, but this may allow me to implement some new features later.

As usual, you can get flickpress 1.3 from the WordPress Plugins Directory.

…or right here: flickpress-1.3.zip

Categories
General

Christmas on the Mall

Our new Christmas day tradition is to make a trip down to the Mall to check out the National and Capitol Christmas trees. There was still plenty of snow left on the grassy parts of the Mall, adding to the festive atmosphere. After getting our fill of mingled church and state we went on a scavenger hunt for someplace open for drinks and snacks. After striking out at a couple of places we ended up Le Bar at Sofitel, exactly where we ended up at last year. Maybe next year we’ll go straight there…

Slushy path near the Capitol Snow on the Mall

Capitol Christmas Tree In front of the Capitol