Morton Fox (mortonfox) wrote,
Morton Fox
mortonfox

Ravine Ramble

The Ravine

Visited the Ravine geocache this afternoon. "The Ravine", located in Wyckoff, is a deep gorge carved by a glacier. This natural site has been threatened by development. See SaveTheRavine.org.

Had another mooncake from the gift pack.

And then I continued work on the script for cleaning up the views groups at Flickr. A views group is a group where members can post photos with view counts within a certain range. So, for example, the 75-100 Views group is for photos that have been viewed anywhere from 75 to 100 times. I guess the point of these groups is for people to post and promote pictures that have hit certain milestones. (It's not just views. There is yet another set of groups for photos that have been favorited X number of times.)

The problem is some group members do not remove their photos once those photos have graduated from the group. There are also quite a number of photos that have been posted to the wrong views group. So I was one of a dozen or so members promoted to admin to help clean up those groups. That was half a year ago. Since then, I haven't had much time to look through the group pool and so I haven't been doing enough of my share of photo deleting. But I figured this ought to be something that can be automated using the Flickr API anyway. So, over the course of the past few days, I've been updating the ActivePerl installation on my computer and reading up on the Flickr API.

The good news: The sample code in Flickr Hacks gets to within 90% of what I want to do.

The bad news: The Flickr API doesn't seem to provide the view count in the photo info. So I need to do some screen-scraping to get that number.

The good news: With some experimentation, I found that reading the photo page without loading the picture leaves the view count unchanged. That's good because I was worried that screen-scraping would affect the very piece of info that I was attempting to get. Since it does not, I can run and rerun the script on the same photos without changing the result.

So this evening, I got the script to the point where it can scan a batch of photos from the group and produce a list of rejects. I'm not going to have the script do the actual deletion until I'm sure that it works, but I'm planning to put that feature in later. (It'll require authentication.) Once that is done then I may check to see if one of the other admins can cron this script to automate the group pool cleaning.
Subscribe

  • Virtual Conventions

    The COVID-19 pandemic has forced a number of furry conventions to cancel this year due to state and local emergency regulations and also out of…

  • FA United 2019

    Last weekend was FA United 2019 in Northern Virginia. That was my fourth and last furry convention for the year. It'll be hard to cut one convention…

  • Metro Gathering 2019

    The last few years, Metro Gathering was in October and had a Halloween theme. This year though, the geocaching mega event is in September and has a…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments