RSS Feed for Timelines?
darryl
Registered Users Posts: 997 Major grins
Hi...
I have about 7000+ photos uploaded mainly by other parents in my son's preschool that I wanted to quickly scan through and find "keepers" for our bulletin board and end of year slideshow.
I'd *love* to use something like CoolIris (formerly PicLens) to do this, but using the Recent Photos feed with an ImageCount of 7000 seems irresponsible (if it would work at all), and actually too overwhelming. (Here's an example with the last 500 photos I've uploaded: http://rudebadmood.com/darryllatest/)
Ideally it'd be awesome if there were a hidden RSS feed that could take a date range, a la the timeline galleries:
http://darryl.smugmug.com/date/2008-07-1/2008-12-1
Interestingly, Shizam's full-screen slideshow can display these images, but I can't see what it's reading for a datasource variable.
So, Dev, Shiz -- is there a hidden RSS feed for timelines?
In another thread related to this, I once encouraged somebody to try to set the TemplateID in a cookie file and then scrape the page.
Alas, I get a big cup of FAIL when I try to do this with an account that has a site-wide password. For whatever reason, even after logging in and getting a valid session cookie, my call to the http://site.smugmug.com/date/2008-07-1/2008-12-1 results in:
Which is *not* what I get when I hit the same URL in a browser.
Any ideas on that problem?
Alternately, it'd be superawesome if you simply added multipage support to your existing MediaRSS feeds. I hadn't heard of this before, but this would be quite nice: http://dannythorpe.com/2008/01/29/piclens-161-adds-search/
Hrm, upon closer inspection I guess the implementation would be a bit weird. I was hoping you could simply specify an Offset or Start variable when calling feed.mg. But apparently multipage RSS looks more like:
I have about 7000+ photos uploaded mainly by other parents in my son's preschool that I wanted to quickly scan through and find "keepers" for our bulletin board and end of year slideshow.
I'd *love* to use something like CoolIris (formerly PicLens) to do this, but using the Recent Photos feed with an ImageCount of 7000 seems irresponsible (if it would work at all), and actually too overwhelming. (Here's an example with the last 500 photos I've uploaded: http://rudebadmood.com/darryllatest/)
Ideally it'd be awesome if there were a hidden RSS feed that could take a date range, a la the timeline galleries:
http://darryl.smugmug.com/date/2008-07-1/2008-12-1
Interestingly, Shizam's full-screen slideshow can display these images, but I can't see what it's reading for a datasource variable.
So, Dev, Shiz -- is there a hidden RSS feed for timelines?
In another thread related to this, I once encouraged somebody to try to set the TemplateID in a cookie file and then scrape the page.
Alas, I get a big cup of FAIL when I try to do this with an account that has a site-wide password. For whatever reason, even after logging in and getting a valid session cookie, my call to the http://site.smugmug.com/date/2008-07-1/2008-12-1 results in:
There are no photos for date range 2008-07-1 to 2008-12-1
Which is *not* what I get when I hit the same URL in a browser.
Any ideas on that problem?
Alternately, it'd be superawesome if you simply added multipage support to your existing MediaRSS feeds. I hadn't heard of this before, but this would be quite nice: http://dannythorpe.com/2008/01/29/piclens-161-adds-search/
Hrm, upon closer inspection I guess the implementation would be a bit weird. I was hoping you could simply specify an Offset or Start variable when calling feed.mg. But apparently multipage RSS looks more like:
<channel> <atom:link rel="previous" href="http://mysite.com/feed1.rss" /> <atom:link rel="next" href="http://mysite.com/feed2.rss" />
0
Comments
Some of our feeds do in fact support paging (ie. gallery and search feed: keywords, etc) and some the ones that do actually include the atom:link rel=next element if you set a specific ImageCount on the feed.
This was hacked in to support Cooriis, and I need to go back and add rel=previous, as well as adding paging for a few more feeds.
The timeline feed sounds kinda cool, but we don't have one atm.
Cheers,
David
SmugMug API Developer
My Photos
Appreciate your consideration of a Timeline feed. The obvious other variable you'd want is whether it is sorted by DateTaken or DateUploaded.
BTW, is there a way to encode that in the URL for a date-based URL, or is it a cookie-setting somewhere? I can't remember and am too lazy to look at your code for automatically generated Timeline links.
Hey Dev:
Huh, is the Search RSS feed broken?
http://dgrin.smugmug.com/hack/feed.mg?Type=usersearch&NickName=dgrin&Data=winner&format=rss200
Also, I'm not seeing atom:link rel=next for this keyword search:
http://www.smugmug.com/hack/feed.mg?Type=keyword&Data=baby&format=rss200&ImageCount=20
(I also tried this on my own galleries, but they're behind a site password, so I figured I'd test on public galleries just to make sure it wasn't an authentication issue. I'm hitting the feeds with the same instance of Firefox, so cookies shouldn't be an issue.)
Do you know what the paging format is supposed to look like? Would the link be something like: Page=2? If so, that'd be plenty good for at least letting me skip past the last 500 photos to browse photos from a few weeks back.
ok, I have spent some time today, adding paging to the majority of our feeds. So all modified feeds with have both previous and next atom:links (as appropriate).
I also fixed the bug with the search, as your outlined.
Hopefully, this stuff will go live later this week.
In regard to the format of the paging, you add &start=X, where x is the position of the image within the feed that you want to start at.
Cheers,
David
SmugMug API Developer
My Photos
SmugMug API Developer
My Photos
This should make browsing through big chunks of photos *much* easier. Now if CoolIris would just give me a link to the photos that I've tagged as "Favorites", I could go through and tag all of my favorites, and then have a script go and download the originals for me to send off to Costco for printing.
The feed changes are live (including the new Timeline feed).
The Timeline feed is available from the /date page, it's parameters are...
- StartDate
- StopDate
- DateBy.... DateUploaded or DateTaken, if omitted it defaults to the user's selection in the control panel
- SortDirection... asc or dsc
Cheers,
David
SmugMug API Developer
My Photos
Now you may say, "Well, that's because your site has a site-wide password, why would you need an RSS feed?"
But but... the Recent Photos feed works fine with site-wide passwords. Recent Galleries does too.
I need the feed to work if the user has the site-password cookie because my Recent Galleries hack (Javascript) relies on being able to read that feed.
And to my end goal of running CoolIris against a timeline feed, I need that feed to work on password-protected sites.
Ideally I'll be able to do this with my son's school site:
http://www.rudebadmood.com/cooldate/
Note that page will seem broken if you don't have the CoolIris plug-in installed because the feeds still reference http://gladlee.smugmug.com instead of http://api.smugmug.com and there's no crossdomain.xml file on personal sites, and since the PicLens "lite" plug-in uses Flash, we get a small cup of FAIL. So I guess that's another request -- can there be an option for RSS feeds to have all image links point to api.smugmug.com instead of domains?
(Interesting that thumbnails work ok. I guess there's a fairly open crossdomain.xml file on the thumbnail servers from Akamai?)
I'm looking into why it's not working for sites with a SitePassword set, it seems to be lower in our class code than the feed code itself.
In regard to crossdomain.xml stuff, we have an existing parameter (&Sandboxed=1) that will return all image urls from http://photos.smugmug.com (which also has an crossdomain.xml file) instead of http://nickname.smugmug.com.
Cheers,
David
SmugMug API Developer
My Photos
As dxvisual said in this thread, changing "Hello Smuggers" at the account level from "Yes" to "Only on my SmugMug site" will fix your issues with both the timeline and feed.
I'm following up with Don to determine if this is in fact the correct operation.
Cheers,
David
SmugMug API Developer
My Photos
Hrm. I thought this was working shortly after trying it Friday, but after writing some scripts just now, it seems to be failing for the feed, but working for the timeline page. :-{
As this is a password-protected site I've sent you some sample links directly. THanks!
Sorry this is off topic, but a quick question about normal user feeds - why do i sometimes get a different photo listed as the first photo on the nicknameRecentPhotos feed when I add ImageCount=?? option (for example, 1, 2 or 5)
Does this modify the sort direction or the selection of photos displayed? Shouldn't it just truncate the full listing and not modify the order of photos?
Possible bug?
Happy to PM you example URL which demonstrates this symptom.
Cheers
Felix
http://rudebadmood.com/cooldate
To use with a password-protected site, you must go to the site and login in the usual way. This sets a cookie that will then allow the CoolIris Embedded Wall (and plug-in) to allow you to "see" your photos.
I suppose I should probably trap for this instance and redirect you to the your SmugMug site login, but I'm too lazy, as this was really a proof of concept more than anything.
When you use the Size parameter, it changes the size of the image in as well as sets the isDefault flag to 1 (which technically is supposed to be "true") for the appropriate element.
That's all good.
But then you go and change to that same size? That makes no sense!
Thumbnail should always be the thumbnail.
There's a few minor bugs with the <atom:link rel="next"> that you added to the feeds.
1. In the "next" feed, you are not passing through the Size parameter of the original request. So while the first 100 images will have the properly sized image in <enclosure> and <media:content> (isDefault), the subsequent 101+ images will go back to the Thumbnail size.
2. For the "next" feed, you're setting the start=100, and then 199, and then 298, but the count is always 100. So there's a mismatch. I think if you're going to go with 100 images at a time as the default, you need to bump the start to 101, 202, etc.
Is there any way to restrict the timeline feed a particular gallery?
Thanks,
Ben
Your thoughts, Dev? I think having the thumbnail set to the Size parameter messes with the orientation of thumbnails in CoolIris, which is a bummer. Or well, maybe that's a CoolIris bug, but it's still silly that thumbnail should change.
Also...
Did you already fix this? It wasn't a major deal to me, but I was just curious.
Thanks.