Screenshot of On This Flickr Day webpage

On This Flickr Day There is a bit more work on making this look nice, but it is a start.

I’ve been thinking about this for a while. A way to show Flickr photos taken “on this day”.

I’ve used the Flickr API occasionally over the years, but calling it directly would take too much time. You would need to page through all the photos 500 at a time until you had all the photos.

So I thought I might build a personal database with the information I needed. This could be updated weekly. I then could pull the information from that in one go. Especially if I store the days and months individually for each photo.

This is somewhat outside my skill set. I’ve used the Flickr Api but do not really know much about databases. In the dim past I think I’ve created them once or twice and used from PHP but with lots of searching.

I planned:

  • Create a local sqlite database on my mac
  • Move it to a server
  • access it from a web page with JavaScript via a PHP file to read the database.

I’ve got some way toward that. I did need a bit of help from claude.ai to get the bash sorted. I’ve just used simple PHP on the webpage so far and managed that with the odd search when I’ve hit an error.

I’ve been thinking a bit about using AI for this sort of thing. My current approach is to use it for specific questions. For example, asking is this a sensible approach, or asking for hep with a line. Rather than write me a whole script to do x, y or z. So I start a script then ask for help when stuck. In the same way I’d have to look up docs or search for the answer to a problem.

Hopefully my next step will be to, after a short interval, go through any files and comment as to what is going on to reinforce my learning.

As I am a complete amateur and do not have anyone to chat about this with, I find using AI quite good fun if I make sure to tell it not to give me whole solutions.

The other thing I’ve been trying with AI is to run any files through asking for them to give any security recommendations.

Next Steps

  • Create a way to produce JSON rather than a web page with PHP. I could then bring the thumbnails into this site using JavaScript.
  • Add some sort of lightbox to see the images larger, change the layout & appearance.
  • Figure out a simple way to update the database without completely rebuilding it.
  • Decide on any extra fields and recreate the database.
  • Figure out why I can’t get location information from the database with PHP I can with bash.

2 thoughts on “On This Flickr Day

  1. I quite like this, it is very johnjohnston-ish. And I smiled knowing I was pinging your pi server.

    You’d think and you did that the flickr API should do this, but its date stored seems to be unix time stamps. The lonly way I found to do via API ir here as a search, is to cycle through all years you’ve had flickr, and bracket for min-date taken and max date-taken. That seems like a lot to run through!

    https://www.flickr.com/search/?user_id=37996646802%40N01&view_all=1&min_taken_date=2025-12-01&max_taken_date=2025-12-02

    https://www.flickr.com/search/?user_id=37996646802%40N01&view_all=1&min_taken_date=2024-12-01&max_taken_date=2024-12-02

    https://www.flickr.com/search/?user_id=37996646802%40N01&view_all=1&min_taken_date=2023-12-01&max_taken_date=2023-12-02

    https://www.flickr.com/search/?user_id=37996646802%40N01&view_all=1&min_taken_date=2022-12-01&max_taken_date=2022-12-02

    I am curious and also remembering I have an left over Pi from a closed project, and maybe I should see about doing what you are doing.

    Happy days of photos during the holidays!

    • Hi Alan,
      I am strangely interested in taking these sorts of view of my memories. I suspect My ‘On this day page’ is the one I look at most on my blog.

      It would be nice if Flickr provided days & months via the api. I was pleasantly surprised as to how fast I get the pages up. But perhaps being on the same network as the Pi;-)
      It did take a few minutes to build the database in the first place.I did this on my mac. For my Flickr I had to make 23 calls getting 500 photos at a time. I think yours would take a lot longer.
      I’m just using the pi cause it is easy. I am sure you could do it on any hosting with php. Also you could do it with a MySQL database I am sure. I’ve only used on a couple of times and in each used your wrappers for accessing the database.

      happy holidays to you and yours!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)