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:
- It goes to your tumblr blog and gets 31 posts right now (I still have to work around the innability to search by date)
- It looks to see if the post is a photo post. If it is, it adds it to a map of posts
- Then we pass the array of photos to a calendar generator.
- We iterate over the photos map and build the calendar for the month you asked for by mapping the day to the photo.
- 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.
This entry was posted on Sunday, January 23rd, 2011 at 12:03 am
You can follow any responses to this entry through the RSS 2.0 feed.