Skip to content

Instantly share code, notes, and snippets.

@troutcolor
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troutcolor/3101ef63213e3f0fe8ae to your computer and use it in GitHub Desktop.
Save troutcolor/3101ef63213e3f0fe8ae to your computer and use it in GitHub Desktop.
Script menu script for Fargo. inserts last 10 flickr photos from user (replace my id for yours) into a series of headlines below current.
My Flickr-medium
var theurl = "https://api.flickr.com/services/feeds/photos_public.gne?id=71428177@N00&format=opml";
http.readUrl(theurl,
function(data) {
xmlDoc = $.parseXML(data);
var ii = 0;;
$xml = $(xmlDoc),
$xml.find("entry").each(function() {
ii++;
if (ii > 10) {
return true;
};
var kittenhtml = $(this).find("content").text();
var wpar = 'width=\"[0-9][0-9][0-9]\"';;
op.insert(string.replaceAll(string.replaceAll(string.replaceAll(string.replaceAll(trimWhitespace(kittenhtml), "<p>", ""), "</p>", ""), "_m.jpg", ".jpg"), wpar, ""), 'down');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment