Development
Tumblr Calendar – Initial Progress
13 years, 2 months ago Posted in: Development 0

So I’ve made decent progress tonight!  It’s not real pretty (and neither is the code…), but it is working!  Here is what this does:

  1. It goes to your tumblr blog and gets 31 posts right now (I still have to work around the innability to search by date)
  2. It looks to see if the post is a photo post.  If it is, it adds it to a map of posts
  3. Then we pass the array of photos to a calendar generator.
  4. We iterate over the photos map and build the calendar for the month you asked for by mapping the day to the photo.
  5. Clicking on a photo will take you to the post on tumblr.

I started out looking into resizing the images because I swear when I first looked at the tumblr read response the other day, it did not have a small square image.  So I started playing with timthumb and just about got it working when I noticed that there WAS a 75×75 square image size coming back from tumblr!  So I’m using that which simplified things a bit.  timthumb is extremely easy to use if you need to resize images ever.

There is still a lot to figure out like what do you do if there are multiple pictures a day (for me, there aren’t so far), getting all the posts for a particular month, and then what to do with the calendar.  Ultimately it’d be cool to add this as another page on your tumblr blog, but I’m not sure how possible that is…we’ll see.

That’s about it for now.  Here is a screen shot of what I’ve got so far!  Let me know what you think.

Tumblr Calendar Day 1

Tumblr Calendar Day 1