2013-10-20

The following is a summary of some tinkering to develop a script that will help me appropriately attribute use of Creative Commons licensed images in presentations. Beyond addressing a long-standing problem of mine, this bit of tinkering is an attempt to feel a bit productive.

The problem

When I give presentations I use Powerpoint (not inherently the problem). I use it in a particular way. Lots of slides, little if any text, and each slide with an interesting photo related to the point I’m trying to make. What follows is an example. (Move beyond the first slide for a feel).

The images are all licensed with a Creative Commons licence and I source them from Flickr via the Creative Commons search. According to this source

All Creative Commons licences require that users of the work attribute the creator. This is also a requirement under Australian copyright law. This means you always have to acknowledge the creator of the CC work you are using, as well as provide any relevant copyright information.

The document continues with “For many users of CC material, attribution is one of the hardest parts of the process”. My current practice is to include the URL of the original image on Flickr on each slide. This has three problems

It adds text to each slide, taking away some of the impact of the image.

Doesn’t fulfil the requirements of the CC licence.

With this style of presentation, most 20/30 minutes presentations are getting close to 100 slides often with the same number of images to attribute.

The requirements are

you should:

Credit the creator;

Provide the title of the work;

Provide the URL where the work is hosted;

Indicate the type of licence it is available under and provide a link to the licence (so others can find out the licence terms); and

Keep intact any copyright notice associated with the work.

There are a range of online services that help with attribution. ImageCodr generates HTML, which I use often. flickr storm does a similar task somewhat differently. The Flickr CC helper will generate HTML or text.

To fit with the workflow I use when creating presentations, I’m after something that will

Parse a text file of the format

1 http://my.flickr.com/photo

2 http://my.flickr.com/photo2

Use the Flickr API to extract the information necessary for an appropriate CC attribution.

Add that to a text/HTML file that will form a “credits” slide at the end of a presentation.

As per the advice from this source

Alternatively, you can include a ‘credits’ slide at the end of the show, that lists all the materials used and their attribution details. Again, you should indicate the slide or order so people can find the attribution for a specific work.

Optionally, add a message to the photo on Flickr summarising how/where the photo has been used.

Tinkering process

What follows is the planned/actual tinkering process toward implementation of a solution as a Perl script. The script will use the Flickr API to extract the licence information and hopefully add a comment.

Flickr API working – extracting information

Perl has a range of Flickr related modules. Flickr::API2 seems to be the current standard.

The flickr.photos.licences.getInfo method gives a list of all the licenses. When you get a photo by id (part of the URL) Flickr returns a licence id with which you can find the URL and name of the licence for the photo.

Some limitations of the information

Flickr doesn’t provide the abbreviation for the CC licences.

hard-coded into the script.

The url_l method for Flickr::API2 doesn’t seem to be working.

that’s because it’s not a method – page_url works.

The owner_name method for Flickr::API2 doesn’t seem to always reliably return the owner’s name.

Use the username as a supplement.

Generating credits page

Initially, I was going to copy the format used by the flickr cc attribution helper i.e.

cc licensed ( *ABBR* ) flickr photo by *username*:

*URL*

But this suggests that the title of the work and a link to the licence is also required (though it does mention flexibility). The format they’re using is

*title* by *name* available at *url*

under a *licence name*

*licence url*

Will do this as simple text, single reference to a line. Will also add in the slide number.

After a bit of experimentation the following is what the script is currently generating

Slide 2, 3: “My downhill run!” by Mike Mueller available at http://flickr.com/photos/mike912mueller/6407874723 under Attribution-NonCommercial-ShareAlike License http://creativecommons.org/licenses/by-nc-sa/2.0/

Slide 4: “Question Mark Graffiti” by zeevveez available at http://flickr.com/photos/zeevveez/7095563439 under Attribution License http://creativecommons.org/licenses/by/2.0/

Slide 1: “Greyhound Half Way Station” by Joseph available at http://flickr.com/photos/josepha/4876231714 under Attribution-NonCommercial-ShareAlike License http://creativecommons.org/licenses/by-nc-sa/2.0/

Modified to recognise that I sometimes use an image on multiple pages. I should perhaps add a bit of smarts into the code to order the slides correctly, but time is short.

Adding comment on Flickr

The flickr.photos.comments.addComment method seems to offer what I need. Of course it’s not that simple. To make a comment the script needs to be authenticated with flickr. i.e. as me.

The documentation for Flickr::API2 is not 100% clear on this and the evolution of authentication means that flickr is moving on, but the following process seems to work

Get a “frob”

Get a special URL to tell Flickr to authorise the script

Get the token

Copy the token that’s displayed and hard code that into subsequent scripts, including adding a comment using my flickr account.

Put it all together

I’m going to use a small presentation I use in my teaching as a test case. I’ll hardcode the link between image and slide number into the initial script. Longer term the script will rely on there being a text file of the format

1,flickr photo url

2,flickr photo url

(see below for some ideas of how I’ll do this)

It all works. Up above you can see the credit text produced based on a small presentation I use in my teaching. The following is one of the images used in that presentation. If you click on the image you can see the comment that was added by the script.


  by  joseph a 

What follows are various bits of the script, happy to share the file, but I don’t imagine that there’s a lot of folk with Perl installed and configured that would want to use it. There needs to be some more work tidying up and adding in error checking. But it works well enough for now.

The main logic of the script is

To add the comments (I’m guessing the extraction of the Flickr ID will break eventually)

And finally generating the attribution information

Getting the URLs of images

The final script assumes I have a text file of the format

The question of how to generate this text file remains open. I can see three possible options

Construct the file manually.

This would be painful and have to wait until after the presentation file is complete. Manual is to be avoided.

Extract it from the Slideshare transcript.

As well as producing an online version of a presentation, Slieshare also produces a transcript of all the text. This includes flickr photo URLs. This currently works because of my practice of including the URLs on each slide, something I’d like to avoid. As a kludge, I could probably include the URL on each slide but place it behind the image. i.e. make it invisible to the eye, but still to slideshare?

Extract it from the pptx file.

Powerpoint files are now just zip file collections of xml files. I could draw on perl code like this to extract the URLs. Perhaps the best way is to insert the Flickr URL of the photos used in the notes section (as they too are XML files).

#3 is the long term option. Will use #2 as my first test.

Filed under: thesis Tagged: Creative Commons, Creative Commons licence

Show more