Skip to main content

Posts

Showing posts with the label api

Automatically Creating Google Homework Sites

We had an interesting Google Sites idea for teaching get floated yesterday.... Q. Could you automatically create a Google Site for a list of students that only they and their tutor can see? Also, at a given time could the students' permission be changed from "writer" to "reader" when the deadline had arrived? It'd be good if you could use a Template Site so that the site could be set up with the right pages and prompts to begin with. With the GData API it is possible. Here's an example python script that shows how... First, load the libraries. You may need to download these if you don't have them already. import atom.data import gdata.sites.client import gdata.sites.data from time import sleep I then created lots of stub functions in the hope that I could better understand how the API works. The problem ( for me ) here was that ... a. This code uses a now old fashioned means of connecting to the API. If this was going to be ...

Scraping The Festival of Ideas, June 2012

I noticed something on Twitter about the University's Festival of Ideas and thought I'd take a look at the events listing . Not long ago, the Web Office used to put microformat information in web pages so that I could easily add events to my calendar... Either they've stopped doing that, or it's stopped working, so I thought how easy would it be to grab the events listed and add them to my (or a separate calendar). In order to do this, I'd need to... Scrape the HTML from the web page and find the event data Connect to Google Calendar and add the events found Because I like programming in python, the first thing I did was to go get the latest copy of  BeautifulSoup , which is a library that is unbelievably handy for scraping data out of HTML and also Google GData  which lets me talk to Google Calendar. I so I began... import urllib, urlparse, gdata, time, datetime from bs4 import BeautifulSoup import atom import gdata.calendar import gdata.calen...