It’s also example of doing something that only I would want to do and yet having that thing echo into eternity without any additional effort.

from: API Nirvana – The Content – Bionic Teaching

Tom Woodward writing about his love of APIs, one of a series of posts. I love the idea of playing with things that do something that only I would want to do.

If you have a slightly geeky interest in technology & edu tech Bionic Teaching is a great blog to read.

I’ve a long term casual interest in playing with APIs, and love trying out some of the stuff Tom blogs about. In a timely fashion wordPress 4.7 came out today, including:

WordPress 4.7 comes with REST API endpoints for posts, comments, terms, users, meta, and settings.

from: WordPress 4.7 “Vaughan”.

This is the same API that Tom blogged about (I guess he was using a plugin). The opening up of WordPress sites via an API that an amateur like myself can use it welcome. Over the past few years several sites with interesting APIs move to make them harder to access with out a deeper knowledge than I have (twitter, instagram…).

I had a quick play with the WordPress api making a page that lists recent posts on 3 of my blogs, including this one. 1

wp-json-render

I guess this sort of thing is a minority interest, but I find it enjoyable and although I am never going to be a programmer, helpful in getting a better understanding of how technology can work.

Featured image on this post, one of my own turned up in a search for echo. test1-echo.tif | Using Image Bending in Audacity – CogDogBlo… | John Johnston | Flickr

 

  1. I added the Better REST API Featured Images WordPress Plugin to et the images following a hint on Tom’s post.

I’ve got a few IFTTT recipes on the go. IFTT is a useful service from linking up and pushing information around online services.

In the last week or so I’ve seen a couple of posts about the service, received an email and had an interesting incident so though it worth a post.

First I read this:

Kin Lane mentioned that IFTTT, a service entirely built on APIs, doesn’t have an API. That bothered Kin and the more I thought about it it bothered me. So I figured I’d start disentangling myself from IFTTT.

from: Shifting out of IFTTT – Bionic Teaching

I then had the problem illustrated by the screenshot at the side of the post. I have a recipe that posts my instagram photos to a blog. The blog then tweets them out and another recipe posts the images on to Flickr. This seemed to go a bit off the wall posted multiple times for a couple of photos and therefore my twitter timeline was filled with repeats.

I would rather this did not happen.

Next this:

Imagine if your sewer pipe started demanding that you make major changes in your diet.

Now imagine that it got a lawyer and started asking you to sign things.

from: My Heroic and Lazy Stand Against IFTTT (Pinboard Blog).

Pinboard is one of my favourite online services. I got an email from IFTTT saying that they would no longer be supporting pinboard unless pinboard made changes to their service.

All this got me thinking that there might be a way to do this without IFTTT. Most of my recipes are for pinboard, but I though to start with something that might be simpler.

Photo Flow

A while back I blogged Make you own SPLOT about a flow powered by IFTTT from instagram to blog to flickr. I like the system, but wonderd if I could DIY without IFTTT.

A while back I’d made a page to grab my instagram photos so I thought I could reuse that to create an RSS feed and then pull that into the photo blog using the FeedWordPress plugin. It was not too hard.

The feed is produced with php file and basically is this( I’ve taken out some caching code):

echo '<?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel>  <title>Insta john</title>  <description>some instagrams</description>  <link>https://www.instagram.com/troutcolor/</link> <atom:link href="http://johnjohnston.info/oddsandends/instarss/" rel="self" type="application/rss+xml" />';    
$url="https://api.instagram.com/v1/users/7835090/media/recent/?client_id_=CLIENT-ID-HERE&count=2"
$json =file_get_contents($url);
$jsonA=json_decode($json, TRUE);
foreach ($jsonA['data'] as $post) {
 echo '<item>';
    echo '<title>'.($post['caption']['text']).'</title>';
    echo'<description><![CDATA[ <img src="'.($post['images']['standard_resolution']['url']).'"> from <a href="'.$post['link'].'">instagram</a> ]]> </description>';
    echo '<link>'.$post['link'].'</link> <guid>'.$post['link'].'</guid>  </item>';
}
echo ' </channel> </rss>';

I’d guess this is not the prettiest piece of code but it produces a short (2 items) RSS feed that FeedWordPress can use.

I’ve also installed the FeedWordPress Advanced FiltersPlugin after reading about it here: Field Botany WordPress Site Breakdown – Bionic Teaching. This allows me to copy the image onto the WordPress site as opposed to keeping it in instagram. It also lets me add it as the featured image which works well with the theme on that blog. Until I am sure it is all working I am posting the photos as pending review, but if it all looks good after a few more pictures I’ll flick the switch and let it run.

There may be trouble ahead

I had just grabbed the code from my old page, including the info needed to connect to instagram’s api which I had set up before. So I checked out the Instagram API page where I read:

Any app created before Nov 17, 2015 will continue to function until June 2016. After June 2016, the app will automatically be moved to Sandbox Mode if it wasn’t approved through the review process.

from: Instagram Developer Documentation

Which sort of sounds like the API will be for more professional sorts than myself. I guess I’ll find out in June.

The other news was that IFTTT has backtracked allowing users to continue to use pinboard recipes without asking pinboard change its system. Hello Pinboard Customers, From Linden Tibbets, the CEO of IFTTT a blog post by Kin Lane, has the details. The post also repeats the waring that IFTTT, by not having an API itself IFTTT might not be something to depend on.

All of this change reminds me of how shaky a foundation we are building our online worlds on. This makes IndieWeb idea even more attractive.

Also on:

I’ve read a lot of interesting things on Medium over the last couple of years. It seemed to start as an online space to write longer-than tweet posts, and evolved.

I’ve never written more than a few comments and one test post on Medium before this. I’ve been excited about blogging in a Domain of One’s Own and the ideas around that and those coming from the IndieWeb. A lot of the IndieWeb technology goes a wee bit over my head but I’ve installed a bunch of plugins here and thing about it a bit.

One of the IndieWeb ideas is POSSE Publish (on your) Own Site, Syndicate Elsewhere. This site auto posts links to twitter and G+ as do many blogs. I can now send posts to Medium too.

Medium now have an API and there is a Medium/WordPress plugin which allows you to push blog posts to Medium. There are also Medium IFTTT recipes that will do the same thing from other blogging systems. I’ve installed the plugin here.

I don’t suppose I’ll send posts to Medium often, it seems a little too writerly for me, but it is fun to play with and think about a further extension of blogging.

The WordPress plugin attaches the Medium account to your profile, so if you have more than one person posting to a blog they all could posse to different medium accounts. There are settings for copyright and for posting links to the posts in different spaces. The API does not allow you, as of now, to update posts on Medium from your blog. There is a Meta Box on the WordPress post editor to set the status of Medium posts as you go.

medium-settings

 

Technical note: I had a bit of trouble getting  plugin to work as it uses php short echo tags and I had to do a bit of find-and-replace in the plugin files. I am not sure if that will effect many folk.

I read about this first not in medium but my RSS reader, followed through to these interesting links:

 

Update, multiple  Also published on Medium lines appear at the top of this post, I do not know why?

Also on:

I’ve made a updates to a couple of simple web pages/apps aimed at pupils and teachers using iOS and images.

Photoblitzer

photoblitzer is a really simple page that just gives a list of ideas for taking photos. I originally made it for a #ds106 project (20 Minute Photo Challenge: ds106 Photoblitz – CogDogBlog) and blogged about it on my 106 blog 106 drop in – Photoblitzin.

Since then I’ve used it as a starting activity on a couple of iPad training courses for staff and it worked well.

Originally I was thinking of this as being used on an iphone or ipod touch, but we have seen a lot of schools buying iPads and running a fair number of training twilights on useing these so I updated the app to look a bit better on an iPad:

Staying the same on an iphone or ipod touch:

The idea of the app is to generate a list of ideas for taking photos from a list of over 106 and let people mark them off as they take them. This seems to get people started in thinking about making interesting photos even in the rather limited places we run training courses in. This leads in turn to more interesting possibilities later when working with application to use the photos, say SonicPics, comic makers, iMovie and the like.

FlickrStampr

After I had played with photoblitzer I though I’d do the same sort of thing for FlickrStampr ( a new slightly catchier name for flickrcctouch). I made this way back when I first looked into using iPod Touches in class and neglected it after that.

The idea behind FlickrStampr is to give pupils an easy way to use creative commons images with the required attribution. The app lets the user search for flickr photos by tag. and provides a set of thumbnails. Clicking on a thumbnail creates (on the server, a copy of the image with a strip at the bottom with a simple attribution text. The means the user can download the image and use it on blog posts or presentations and the attribution is on the image, easier, I hope, for pupils than copying both the image and the attribution and then useing them together.

I started by cleaning up the iPhone interface a wee bit, before it did a fair amount of hiding and showing, now it just shows everything: flickrstamper iphone I messed about with the CSS a little and the page looks a bit different on an iPad screen; FlickrStampr iPad The main problem with the interface as it stands is that if you want to just see a bigger version of the image the image is processed on the server adding the text. This is, I suspect, a little inefficient but it makes for ease of use: you don’t need to preview them click a create button, then download the result. Just press the ‘preview’ and choose save. 

Not exactly responsive

The design improvements falls quite short of what is normarly thought of as responsive. In FlickrStampr the layout just squishes as the screen gets smaller, pushing one secion below the other. I photoblitzer I’ve used a media query in the css for the first time: @media screen and (max-width: 480px) there are a lot of possibilities for improvment. I am slowly learning hopefully more improvements to come.

Icons

I’ve now given both an icon to make it look a bit nicer when added as a bookmark on your homescreen, Ive also use a useful bit of javascript that alerts folk to the fact they can do this:Add to home screen, you can see it in action on some of the screenshots above. iOS web apps are a lot less powerful that native apps, especially ones developed by peole like myself with pretty limited knowledge, but they do offer the possibility of simply addressing niche uses. I hope that some folk will find these things of interest or even useful. I’ve had a ton of fun working/playing with this stuff and am open to suggestions for improvments.

The value of free

As an aside, testing the flickr API, and some recent play with the freesound API reniforce for me the value of sharing under a CC license with the proviSion of a powerful API, there are some amazing people sharing wonderful captures and creations freely, this need to be vslued, used and protected.


A decade ago, metadata was all the rage among the geeks. You could tag, geo-tag, or machine-tag Flickr photos. Flickr is from the old community. That’s why you can still do Creative Commons searches at Flickr. But you can’t on Instagram. They don’t care about metadata. From an end-user point of view, RSS is out of favor. The new companies are not investing in creating metadata to make their work discoverable and shareable.

from: Joho the Blog – [berkman] Anil Dash on “The Web We Lost”

Some great reading this morning starting at How the Web is being body-snatched ~ Stephen’s Web through Doc Searls Weblog – How the Web is being body-snatched to the post with the above quote.

This quote really jumped out at me, I’ve loved the flickr API for a long time and used it for lots of fun. I enjoy Instagram too, for its easy, quick hit, and lightweight community.

I really hope that we are not drifting away from such valuable resources with apis and rss feeds to the easy and locked in.

One of the things that makes the huge gap between sites like flickr and facebook is who has access to data and how they access it. When you share on flickr you are doing something quite different, and potentially much more valuable than sharing on facebook or google+.

I hope that open never gets old.

Woke up this morning to a barrage of tweets about Posterous turning off on April 30.

We use posterous for EDUtalk and I have a few other posterous blogs too.

This is not too unexpected, I bloged about it a couple of times, Posterous Worries and More Posterous Worries but it is still disappointing, who doesn’t like great stuff for free.

I’ve blogged enough about how good posterous is and the features that make it great for EDUtalk. I am going to make a list here of what is needed with some possible solutions and hopefully get some feedback.

  • Cost, posterous is free. I am not opposed to paying for stuff on the web, I pay for hosting here and elsewhere, the icecast part of Radio EDUtalk, flickr, pinboard and other stuff but we don’t want to pay too much for EDUtalk.
  • Space, last year at some point I downloaded everything from EDUtalk (There is a mac app for that) and it was well over 1GB then, there are >1000 posts. We need to move to a flexible hosting, or to use the Internet Archive for hosting our larger files.
  • Upload size, posterous allows upload of fairly large audio files through a browser. Other options may mean ftp, not a hugh problem but.
  • Media handling, folk can email in all sort of audio to edutalk and posterous deals with it and displays it nicely.
  • Open posting by email, I’ve not seen this else where, folk can email an audio file to EDUtalk and it is posted to the moderation queue, this makes for a very easy entry to podcasting, covering events by lots of folk easy, My favourite feature about posterous.
  • The Posterous API, recently broken, this allowed us easily to pull in audioBoos and ipadio phlogs. The MetaWeblogAPI or the FeedWordpress plugin (not sure how it handles attachments) would let us do this with WordPress.

From my knowledge and experience the simplest fit would be self hosted WordPress, ftp upload of Radio EDUtalk episodes (either to the sit or to the Internet Archive), forget the submission via email, or do this manually. Use the MetaWebLogAPI or FeedWordpress to bring in other content.

An Opportunity?

I’d like better, I’d love to keep all the features of EDUtalk and even get back the old phone in feature (that used to be handled by gabcast). I’ve also got some interest in using something else from the ubiquitous wordPress (ironic since I’ve spent a ton of time arguing for WP in Glow recently).

I wonder too how well the various WordPress posterous import solutions would handle our content, for example some of our ipadio and audioboos use the players from these sites, some use just a lonk that posterous turned into a posterous player and most recently we have been downloading and reposting the files to fix a feedburner/audioboo problem!

I’d love to hear some ideas of the best way to move this forward.

Update: just see this: Posthaven is the safe place for all your posts forever

When will Posthaven be able to do _______?

Everything you expected and liked about Posterous will eventually be in Posthaven. Things like post by email, multiple users, pages and links, full HTML theming, and the bookmarklet.

We’ll deploy the features and let you know as soon as they’re available.

from: Posthaven is the safe place for all your posts forever

I’ve reserved edutalk on www.posthaven.com for $5 as a possibility.


I’ve been aware of the Primary Games Arena 1 for a while. I only noticed yesterday that it had an API The api lets you search for games and returns some xml. XML makes me think of Glow 2. Glow handle xml quite nicely, unfortunately for most teachers this needs a knowledge of XSL, which I do not think is common. I’ve managed in the past to figure out way of displaying RSS using XLS so though I’d try to do the same with the Primary Games search results. It turned out to be pretty straightforward as the xml returned by Primary Games is nice and simple.

Displaying a set of Primary Games in Glow

Glow xml Webpart Empty

You use the xml webpart. This part has 4 main fields: xml link, xml editor, xsl link and xsl editor, of these you only use 2, using either the link the direct editor field for both xml or xsl.

The way it work is that the xml is loaded and modified by the XSL. The XML webpart can be usefully used to display any html fragment without any XSL at all, but in the case of RSS or xml from the primary games arena it need to be formatted.

For example the url:
http://primarygamesarena.com/
searchapi.php?q=money

in the XML Link field produces an XML list of games tagged money. Clicking that link will show you what you would get in glow if you do not use XSL, not pupil friendly at the moment. We can use XSL to transform this. As a first test I used this xsl in the XSL Editor field.

This produces this: (click for flickr page):

primary games in glow

On the glow page the images launch the Primary games page with the game in an iFrame.

It then becomes simple to repeat this for other searches and give pupils sets of games, just replace money in the xml link with another word.

We can also pass around webparts already loaded with the xml address and the xsl and these can be imported onto a glow page. Here is a the money one. You could import that onto a glow page and just change the search string at the end of the url to get a different set of games to display.

Taking it a bit further

After doing the above brief test with glow I asked @johnmclear, one of the folk behind Primary Games, if there were any other parameters that could be used on the search, this is what I got back:

johnmclear
John McLear

@johnjohnston can add it. Email me an ideal request/response
Sat Jul 09 12:19:28 +0000 2011 from HootSuite captured: Mon, 11 Jul 11 16:11:04 +0100

A few hours, a couple of email and some tweets later John had updated the Primary Games API to include subject, year, keystage, topic, unit and gametype!

This man we can now use, for example: ?q=money&y=3&g=Strategy as a query and get all the money games suitable for year 3 (=primary 4 in Scotland) that are categorised as Strategy games.

Of course the API can also be used outside Glow on the web via php. Here is a page that lets you search and display games: Primary Games Arena API and here is the Source.

I’ve extended this a little to create a page that can search and display games in the same way but also supplies an embed code to embed the code on webpages, blogs or glow.

Primary Games API with Embed codes

To embed in a blog you just need to switch to the html view in the editor and paste in the code. In Glow you can use an XML webpart and past into the xml editor field.

Simulation

Can you organise the planets in our solar system?

The embed code here was edited to make the background yellow.

Of course you could simply create a screenshot of a game page, upload it and make it a link, but this is quicker and loads the games inside the Primary Games ecosystem this has a nice wee toolbar allowing pupils to gain achievements by playing games, rate games anonymously and get links to other games. You also get the advantage of the folk at Primary games having already categorised a huge range of games suitable for primary aged pupils. Many thanks to @johnmclear for the extremely quick additions ot the API.

Footnotes:

1. Primary Games Arena run by Primary Technology an company who run a fleet of commercial and free ICT services for primary schools.

2.When Glow was introduced I was one of the many folk who were very disappointed that Glow did not have tools for handling RSS: At the Scottish Learning Festival, on RM developer was asked about RSS and answered, ‘What is RSS?’! It turns out glow did and does support RSS and XML in general.

The footnotes are a wee experiment to make my posts a little less verbose, I used a technique describe on Daring Fireball: About the Footnotes.

One of the interesting things about twitter is the speed that tweets flow past, always something different to look at and always something to miss. I quite often use the favourite tool in twitter, especially on my phone, to ‘bookmark’ tweets of interest. some of these are ones that just amuse me:

Examplefavs

And some contain links I am interested in following up later. I sometimes use TweetDeck‘s filter to filter out links containing links. A while back I made a wee web page to do the same thing:

Favtweetlinks

Fav tweets with links

This joins one or two almost useful twitter toys I’ve made, as opposed to a few more useless ones.

Warning, little educational content ahead, this is a holiday post.

I’ve been messing around a wee bit with the twitter api, twitter tester, Tweets to TeachMeetPerth and twitter presenter, the last in response to Ewan’s tweet: Can one present by Twit?.

None of these are what could be called polished jobs even given my limitations but the TwitterApi Documentation is pretty straightforward.

I have also created a few of rss twitter bots the most useful of which is ScotEduBlogs which tweets the blogs post title as they arrive on ScotEduBlogs this uses the twitterfeed.com : feed your blog to twitter – post RSS to twitter automatically I think.

So it seems time for my first twitterbot ObliqueTweet, tweet anything @ObliqueTweet and it will reply with a random Oblique Strategy (currently the 4th edition).

The Oblique Strategies are a set of cards devised by Brian Eno and artist Peter Schmidt to solve (artistic) problems by drawing a card randomly. There is a lot of information at The Oblique Strategies. There have been a number of computer programs to show Strategies at random, web and download versions. (I even made a supercard project back in 2002). There is a nice php version, minimal design | Oblique Strategies, which you can download.

The ObliqueTweet twitterbot, just grabs the most recent @ replies to ObliqueTweet and then grabs a random Oblique Strategies and sends it back as a reply.

The script is automatically run using http://www.webbasedcron.com once every minute.

I am wondering now if I can think of a useful twitterbot, any ideas?