<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Craig Loftus</title>
	
	<link>http://craigloftus.net/blog</link>
	<description />
	<lastBuildDate>Tue, 25 Oct 2011 09:55:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/craigloftus_blog" /><feedburner:info uri="craigloftus_blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Open Data consultations – Answers to the Data Policy Consultation</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/BQxLuDS75lg/</link>
		<comments>http://craigloftus.net/blog/2011/10/25/open-data-consultations-part-1/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 09:55:58 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Social]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[consultation]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[government]]></category>
		<category><![CDATA[open]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=114</guid>
		<description><![CDATA[I am currently responding to 2 Government public consultations, the Data Policy Consultation on the form and role of the Public Data Corporation and the Making Open Data Real consultation on the &#8220;culture of openness and transparency in our public services&#8221;. In this post I copy my answers to Chapter 4 of the consultation document, [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently responding to 2 Government public consultations, the <a href="http://discuss.bis.gov.uk/pdc/">Data Policy Consultation</a> on the form and role of the Public Data Corporation and the <a href="http://data.gov.uk/opendataconsultation">Making Open Data Real</a> consultation on the &#8220;culture of openness and transparency in our public services&#8221;. In this post I copy my answers to Chapter 4 of the consultation document, on charging for information, this was the section I felt most able to answer. I omit my answers to the other questions as I either skipped them or only gave cursory answers. The answers below are not particularly well considered either, but it felt better to contribute than to sit back and hope for the best.</p>
<p>I am not entirely convinced by the data utility argument which I support in my answer to question 1, however, there is nothing that gets my ire up more than when people limit the spectrum of acceptable opinion with hand wavy arguments (Section 4.17). Not to mention the hypocrisy of doing so whilst at the same time suffixing each question with &#8220;Please provide evidence to support your answer where possible.&#8221;</p>
<h4>Charging for Public Data Corporation information</h4>
<h5>1. How do you think Government should best balance its objectives around increasing access to data and providing more freely available data for re-use year on year within the constraints of affordability? Please provide evidence to support your answer where possible.</h5>
<p>The Government and its organisations should provide services for society, the assumption that the &#8220;constituent parts&#8221; targeted for absorption into the PDC should act as businesses, requiring &#8220;sustainable business model[s]&#8221; is a subversion of their place and role in society. To go further down that route rather than retreat from it is a mistake.</p>
<p>The remit of the constituent parts should be restricted to providing the services necessary for the country to operate effectively, and such services should be funded from the budgets of the organs of Government that use them (ultimately the tax payer). Those service should then be provided at marginal cost to any non-Governmental users. Although there is an obvious advantage to the tax payer in having the services subsidised by non-Governmental users such a funding device is regressive, in that it restricts the services to those who can afford the charges. Outstanding issues of affordability should be reconsidered in terms of the net benefit to Society of those services being made available.</p>
<p>The consultation describes this position as the &#8220;&#8216;data utility&#8217; pricing model&#8221; (S. 4.17) and without evidence or discussion deems it &#8220;currently unaffordable&#8221; and therefore not for discussion. Further it spuriously argues that a &#8220;lack of investment&#8221; would result in degraded quality and accessibility of the data, despite said level investment being entirely at the Government&#8217;s discretion, and the remit for the production of value-added services also being at its discretion. By discounting a model which they acknowledge without more detailed consideration the authors make their bias clear.</p>
<h5>2. Are there particular datasets or information that you believe would create particular economic or social benefits if they were available free for use and re-use? Who would these benefit and how? Please provide evidence to support your answer where possible.</h5>
<p>The 2008 &#8220;Models of Public Sector Information Provision via Trading Funds&#8221; report by Newbery, Bently and Pollock commissioned by the last Government found that changing two OS product categories to a marginal cost regime would result in a net benefit to Society of £168m, for a cost to Government of £30m. Because of the lack of category breakdowns provided to the authors of the report, it is not possible to analyse which of the specific products covered by those categories were produced for use by Government and which are primarily consumed by other users. This report seems like a perfect starting point for identifying such datasets.</p>
<h5>3. What do you think the impacts of the three options would be for you and/or other groups outlined above? Please provide evidence to support your answer where possible.</h5>
<ol>
<li>The status quo already includes some commitment to continue to open up more sources of data, so as there is no perceived change it is difficult to talk about impacts. If the commitments are honoured and carried out in the true spirit of opening up useful data to the public then it would have an impact, but it would seem likely to be less than the other 2 options.</li>
<li>Cost is an absolute barrier to any use by me and most community organisations I have involvement with and therefore this option would continue to exclude me from data use. Section 4.24 seems to be an arbitrary addition to this option and as explained in my answer to question 4 would naturally lead to a less fair competition with existing providers and act as a barrier to innovation and start-ups.</li>
<li>The feature limited freemium options seems to be already tacitly used by organisations such as the OS, who give away some low detail data sets such as StreetView but charge for more detailed ones, which has made it useful to a limited extent for community mapping but seems to have been carried out without a real consideration of what would be off value to society. Limiting within certain geographical bounds would seem like a good approach to providing useful data to community and local interest groups whilst persuading commercial users to pay for nationwide access. On a similar theme, a limit based on non-profit usage would provide for mine and many other community use cases whilst still satisfying the Governments need to &#8216;encourage&#8217; private investment.</li>
</ol>
<h5>4. A further variation of any of the options could be to encourage PDC and its constituent parts to make better use of the flexibility to develop commercial data products and services outside of their public task. What do you think the impacts of this might be?</h5>
<p>Unless all the public task data were released for free (re)use such a variation would see the PDC compete unfairly with private organisations, and would likely stifle innovation. If one assumes they would act like a conventional commercial entity when developing such products they would have the ability to erect barriers to entry by weakening or obfuscating the public task data. This variation would run counter to the &#8220;stimulat[ion of] the development of an information market&#8221;.</p>
<p>It is worrying that this particular &#8216;issue&#8217; is being raised so prominently within the consultation.</p>
<h5>5. Are there any alternative options that might balance Government’s objectives which are not covered here? Please provide details and evidence to support your response where possible.</h5>
<p>One such alternative consideration is the impact free access will have if combined with efforts to encourage volunteer and commercial contribution to the services. A prime example is the role the OpenStreetMap project plays in providing up to date information about the condition and route of rights of way; something which is currently not maintained with any degree of consistency or appropriate quality by either local councils or the Ordnance Survey.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2011/10/25/open-data-consultations-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2011/10/25/open-data-consultations-part-1/</feedburner:origLink></item>
		<item>
		<title>Changing the S3 bucket region with Déjà Dup</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/qmnP_12pmbg/</link>
		<comments>http://craigloftus.net/blog/2011/10/13/changing-the-s3-bucket-region-with-deja-dup/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 18:03:59 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[back-up]]></category>
		<category><![CDATA[dconf]]></category>
		<category><![CDATA[deja-dup]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[s3]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=103</guid>
		<description><![CDATA[Déjà Dup is a simplified back-up tool for Gnome that lets you use a variety of storage options for backing up your computer. However, its handling of Amazon S3 is a little simplistic as it does not let you set the region of the bucket that it will automatically create for you or use a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://launchpad.net/deja-dup">Déjà Dup</a> is a simplified back-up tool for Gnome that lets you use a variety of storage options for backing up your computer. However, its handling of <a href="http://aws.amazon.com/s3/">Amazon S3</a> is a little simplistic as it does not let you set the region of the bucket that it will automatically create for you or use a pre-existing bucket. Amazon charges based on where data is sent and got from, so if you do not live in the US Déjà Dup will cost you extra. There is <a href="https://bugs.launchpad.net/deja-dup/+bug/548632">a bug report</a> of course, but that does not seem to be getting attention, so below are instructions for a work around.</p>
<p>I have not tested the instructions exhaustively, but it works for me on Fedora 16 Beta with Déjà Dup version 19.90, having initially let Déjà Dup create a default bucket. They are based on an <a href="https://answers.launchpad.net/deja-dup/+question/81409">answer</a> to a different problem. Essentially the fix is to manually specify the bucket used in the dconf data for Déjà Dup, after which it just magically carries on working.</p>
<ul>
<li>Using an S3 tool&hellip;</li>
<ol>
<li>Create a bucket with the correct region specified</li>
<li>If applicable, copy the contents from the default Déjà Dup bucket into the new one</li>
</ol>
<li>On your computer&hellip;</li>
<ol>
<li>You will need to use the <em>dconf</em> tool, which is probably already installed</li>
<li><code>$ dconf write /org/gnome/deja-dup/s3/bucket \'<var>bucket-name</var>\'</code></li>
<li>Also, you may want to change or reset the folder key, <code>$ dconf reset /org/gnome/deja-dup/s3/folder</code></li>
</ol>
</ul>
<p>Note that the escaped quote marks are required but I have no idea why. If you are not comfortable putting magic incantations into the terminal there is a GUI editor for dconf which you should be able to find in a package with a name like <em>dconf-editor</em>, or <em>dconf-tools</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2011/10/13/changing-the-s3-bucket-region-with-deja-dup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2011/10/13/changing-the-s3-bucket-region-with-deja-dup/</feedburner:origLink></item>
		<item>
		<title>Letter to Nicola Blackwood MP on Theresa May’s comments about Anti-Cuts protestors</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/buGEXLztYbY/</link>
		<comments>http://craigloftus.net/blog/2011/04/01/letter-to-nicola-blackwood-mp-on-theresa-mays-comments-about-anti-cuts-protestors/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 14:39:13 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Letters]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Social]]></category>
		<category><![CDATA[anti-cuts]]></category>
		<category><![CDATA[banning]]></category>
		<category><![CDATA[banning-orders]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[oxford]]></category>
		<category><![CDATA[protest]]></category>
		<category><![CDATA[theresa may]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=94</guid>
		<description><![CDATA[The following is a copy of the letter I sent to my MP (Nicola Blackwood, CON, Oxford West and Abingdon) regarding the comments in parliament made by Theresa May with regard to the anti-cuts protests in London on 2011-03-26. Dear Nicola Blackwood, Of the ~200 thugs Theresa May stated had been arrested during and after [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a copy of the letter I sent to my MP (<a href="http://www.theyworkforyou.com/mp/nicola_blackwood/oxford_west_and_abingdon">Nicola Blackwood, CON, Oxford West and Abingdon</a>) regarding the comments in parliament made by Theresa May with regard to the <a href="https://secure.wikimedia.org/wikipedia/en/wiki/2011_anti-cuts_protest_in_London">anti-cuts protests in London</a> on 2011-03-26.</p>
<blockquote><p>
Dear Nicola Blackwood,</p>
<p>Of the <a href=" http://www.theyworkforyou.com/debate/?id=2011-03-28a.25.2">~200</a> thugs Theresa May stated had been arrested during and<br />
after the recent protests in London, <a href="http://www.guardian.co.uk/uk/2011/mar/28/cuts-protest-uk-uncut-fortnum">138</a> were the &#8220;<a href="http://www.theyworkforyou.com/debate/?id=2011-03-28a.30.5">mindless thug[s]</a>&#8221; involved in occupying Fortnum &#038; Mason.</p>
<p>I direct your attention to a <a href="http://www.guardian.co.uk/uk/video/2011/mar/28/fortnum-mason-protesters-uk-uncut-video">video (published by the Guardian)</a> taken by<br />
&#8216;legal observers&#8217; within the Fortnum &#038; Mason store [4]. The video shows<br />
a police chief inspector calmly telling the protesters that they: are<br />
free to go, will be safely escorted from the building, and had not been<br />
involved in violent thuggery. So, Theresa May made a political<br />
statement which contradicted the legal opinion of a police chief<br />
inspector (or the inspector was lying when addressing the public);<br />
either is distressing.</p>
<p>In all likelihood the charges against the individuals arrested will be<br />
minor or will be dropped entirely; However, it is a concern if a<br />
trumped up charge for a public order offence could in future results in<br />
having you banned from attending protests.</p>
<p>In the mean time the figures are being used to fuel a cross party zeal<br />
for authoritarian measures. I would like your assurances that you will<br />
act to ensure that stereotyping and knee jerk reactions do not drive<br />
policy. You seem to be a keen question writer and I&#8217;m generally happy<br />
with the tone you&#8217;ve taken on the Protection of Freedoms Bill; perhaps<br />
you&#8217;d consider a question to the home secretary on this issue?</p>
<p>(I have no involvement with UK Uncut or know anyone personally effected<br />
by the events in question; I&#8217;m simply concerned by the tone taken by<br />
MPs on this issue)</p>
<p>Yours sincerely,<br />
Craig Loftus</p>
<p>P.S. I request the right to publish (on my blog) your response to my letter.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2011/04/01/letter-to-nicola-blackwood-mp-on-theresa-mays-comments-about-anti-cuts-protestors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2011/04/01/letter-to-nicola-blackwood-mp-on-theresa-mays-comments-about-anti-cuts-protestors/</feedburner:origLink></item>
		<item>
		<title>Letter to Nicola Blackwood MP on site-blocking proposals</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/pIwcyYu6BGI/</link>
		<comments>http://craigloftus.net/blog/2011/04/01/letter-to-nicola-blackwood-mp-on-site-blocking-proposals/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 14:27:02 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Letters]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Social]]></category>
		<category><![CDATA[dmca]]></category>
		<category><![CDATA[letter]]></category>
		<category><![CDATA[mp]]></category>
		<category><![CDATA[oxford]]></category>
		<category><![CDATA[site-blocking]]></category>
		<category><![CDATA[vaizey]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=89</guid>
		<description><![CDATA[The following is a copy of the letter I sent to my MP (Nicola Blackwood, CON, Oxford West and Abingdon) regarding the proposal for a UK version of the US DMCA take-down notices.

As a <a href="http://www.theyworkforyou.com/pbc/2010-11/Protection_of_Freedoms_Bill/06-0_2011-03-29a.2.0?s=speaker%3A24842#g2.86">self confessed civil libertarian</a> I'm sure you react as badly as I do to extra-legal authoritarian solutions such as the site-blocking that Vaizey clearly supports. I urge you to voice dissatisfaction with such a proposal, and question the overly narrow remit of the Working Group.]]></description>
			<content:encoded><![CDATA[<p>The following is a copy of the letter I sent to my MP (<a href="http://www.theyworkforyou.com/mp/nicola_blackwood/oxford_west_and_abingdon">Nicola Blackwood, CON, Oxford West and Abingdon</a>) regarding the proposal for a UK version of the US DMCA take-down notices.</p>
<blockquote><p>
Dear Nicola Blackwood,</p>
<p>Ed Vaizey, MP Minister for Culture, Communications and Creative Industries recently wrote in <a href="http://www.openrightsgroup.org/blog/2011/minister-confirms-voluntary-site-blocking-discussions">reply to a letter from the Open Rights Group</a>:</p>
<blockquote><p>
Jeremy and I met with key players from the digital economy<br />
on 23 February to discuss developing new ways for people to<br />
access content online. Coming out of this meeting was a<br />
proposal for a Working Group to be formed to look at<br />
industry self-regulatory measures to tackle online<br />
copyright infringement through site-blocking.</p>
<p>I recognise that it is very important that consumer<br />
Interests are considered very carefully, and we will<br />
be inviting consumer representative groups to participate<br />
 in future discussions on the issue.
</p></blockquote>
<p>As a <a href="http://www.theyworkforyou.com/pbc/2010-11/Protection_of_Freedoms_Bill/06-0_2011-03-29a.2.0?s=speaker%3A24842#g2.86">self confessed civil libertarian</a> I&#8217;m sure you react as badly as I do to extra-legal authoritarian solutions such as the site-blocking that Vaizey clearly supports. I urge you to voice dissatisfaction with such a proposal, and question the overly narrow remit of the Working Group.</p>
<p>&#8220;Industry self-regulatory&#8221; measures such as the US DMCA support for take-down notices are prone to abuse by aggressive rights-holders; particularly with regard to social media sites such as Youtube. It should be clear to anyone why they are popular with large corporate rights holders and unpopular with (legally) creative individuals.</p>
<p>Yours sincerely,<br />
Craig Loftus
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2011/04/01/letter-to-nicola-blackwood-mp-on-site-blocking-proposals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2011/04/01/letter-to-nicola-blackwood-mp-on-site-blocking-proposals/</feedburner:origLink></item>
		<item>
		<title>Wireless on Shuttle XS35GT with Fedora 13</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/JnmM6Y7uNuU/</link>
		<comments>http://craigloftus.net/blog/2010/09/21/wireless-on-shuttle-xs35gt-with-fedora-13/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 17:18:38 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=85</guid>
		<description><![CDATA[Wireless won&#8217;t work out of the box on the Shuttle XS35GT with Fedora 13 because it does not include a kernel driver for the Realtek 8171 network controller. The instructions by Bill Giannikos for 8172 and 8192se controllers work for the 8171 as well&#8230; using the same driver as in the guide. Also, remember to [...]]]></description>
			<content:encoded><![CDATA[<p>Wireless won&#8217;t work out of the box on the Shuttle XS35GT with Fedora 13 because it does not include a kernel driver for the Realtek 8171 network controller. The <a href="http://www.linwik.com/wiki/using+the+realtek+8172+and+8192se+wireless+controller+with+fedora+12">instructions by Bill Giannikos</a> for 8172 and 8192se controllers work for the 8171 as well&hellip; using the same driver as in the guide.</p>
<p>Also, remember to watch out for kernel upgrades because you will need to recompile the module each time there is an upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2010/09/21/wireless-on-shuttle-xs35gt-with-fedora-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2010/09/21/wireless-on-shuttle-xs35gt-with-fedora-13/</feedburner:origLink></item>
		<item>
		<title>Google Books android script</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/vot8udv8V1o/</link>
		<comments>http://craigloftus.net/blog/2010/07/29/google-books-android-script/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 08:49:02 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Distractions]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=71</guid>
		<description><![CDATA[The script below lets you scan multiple book barcodes and add the books directly to your Google Library. Since getting a Nexus One I&#8217;ve been wanting to dabble with programming something for it, Java seemed far too hard. However, I quickly came across Scripting Layer for Android (SL4A) which lets you write quick scripts in [...]]]></description>
			<content:encoded><![CDATA[<p>The script below lets you scan multiple book barcodes and add the books directly to your Google Library.</p>
<p>Since getting a Nexus One I&#8217;ve been wanting to dabble with programming something for it, Java seemed far too hard. However, I quickly came across <a href="http://code.google.com/p/android-scripting/">Scripting Layer for Android</a> (SL4A) which lets you write quick scripts in a variety of languages; including my favourite, Python. The next challenge was to actually come up with a simple project to get my hands dirty.</p>
<p>Matt Cutts wrote a <a href="http://www.mattcutts.com/blog/android-barcode-scanner/">simple script</a> that scans a barcode and pulls up its Google Books page, from which you can then click the &#8216;add to my library&#8217; button, but this seemed far too clumsy and slow to me, so I settled on improving it. The script now lets you scan multiple books in series and then add them to your Google library by making use of the <a href="http://code.google.com/apis/books/">Google Books Search API</a>.</p>
<p>See the code (public domain) below:</p>
<blockquote>
<pre>
import android
from gdata.books.service import BookService
import gdata.books

email = 'youremail@gmail.com'
password = 'yourpassword'

droid = android.Android()

def dialog(items):
  title = 'Another?'
  droid.dialogCreateAlert(title)
  droid.dialogSetItems(items)
  droid.dialogSetPositiveButtonText('Add')
  droid.dialogSetNegativeButtonText('Exit')
  droid.dialogSetNeutralButtonText('Upload')
  droid.dialogShow()
  response = droid.dialogGetResponse().result
  return response['which']

def add_from_queue(self):
   for k,b in self.queue.items():
      self.add_item_to_library(b)
   return(True)

def get_by_barcode(self):
   (id, result, error) = droid.scanBarcode()
   if result is not True:
      return(False)
   isbn = int(result['extras']['SCAN_RESULT'])
   q = 'ISBN'+str(isbn)
   b = self.search(q, feed=self.ITEM_FEED).entry[0]
   self.queue[b.dc_title[0].text] = b
   return(True)

gdata.books.service.BookService.get_by_barcode = get_by_barcode
gdata.books.service.BookService.add_from_queue = add_from_queue
gdata.books.service.BookService.queue = {}
gdata.books.service.BookService.ITEM_FEED = gdata.books.service.ITEM_FEED

service = gdata.books.service.BookService()
service.ClientLogin(email, password)

service.get_by_barcode()

i = True
while i:
  response = dialog(service.queue.keys())

  if response == 'positive':
     service.get_by_barcode()

  elif response == 'neutral':
     service.add_from_queue()
     service.queue = {}

  else:
     i = False

droid.exit()
</pre>
</blockquote>
<p><strong>Updated:</strong> Thanks to sjb for <a href="http://groups.google.com/group/android-scripting/browse_thread/thread/6bcda21978b49f2#msg_73ecc35dec8b0d8d">pointing out</a> a bug in the code; now fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2010/07/29/google-books-android-script/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2010/07/29/google-books-android-script/</feedburner:origLink></item>
		<item>
		<title>Digital Economy Bill Letter</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/So2RTr3CKdE/</link>
		<comments>http://craigloftus.net/blog/2010/03/17/digital_economy_bill_letter/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 14:58:18 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Letters]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=67</guid>
		<description><![CDATA[The following is a copy of the letter I sent to my MP regarding the Digital Economy Bill. Dear Don Foster, I have read of your position on the Digital Economy Bill and I am mostly pleased by it; we all like carrots over sticks. I am writing to first add another voice to the [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a copy of the letter I sent to my MP regarding the Digital Economy Bill.</p>
<blockquote><p>
Dear Don Foster,</p>
<p>I have read of your position on the Digital Economy Bill and I am mostly pleased by it; we all like carrots over sticks.</p>
<p>I am writing to first add another voice to the mêlée pressuring MPs to ensure any self serving items introduced at the behest of lobbies are removed and that Labour&#8217;s draconian approach is resisted. Aside from any discussion on the societal cost of copyright, an act that press-gangs one group of companies into acting as policemen for another group is a many faced abomination.</p>
<p>Second; to give you the perspective of a PhD student at the University of Bath; one of the stereotyped targets for this bill. I can tell you we would dodge any stick you might try to hit us with. Without meaning to sound arrogant; I and my peers are more familiar with IT than you and yours. We know of and can use technology, to make ourselves anonymous and to encrypt the data we send.</p>
<p>Third, I fully believe the whole system of copyright in this country has lost sight of its original intentions and now solely benefits copyright holders while preventing creative endeavour. Not unsurprisingly, the current argument playing out is framed entirely as a dichotomy, &#8216;stricter controls&#8217; or &#8216;what we have now&#8217;? But I&#8217;m sure an intelligent and interested man such as yourself will already be fully aware of arguments for the drawing-back of copyright. I would be thrilled to see you make your peers just as aware.</p>
<p>On this topic I recommend Jamie Boyle&#8217;s book The Public Domain: Enclosing the Commons of the Mind (ISBN:978-0300137408).</p>
<p>Finally, I am extremely disappointed in the behaviour of the Lib. Dem. lords in introducing an amendment such as they did.</p>
<p>Yours sincerely,<br />
Craig Loftus</p>
<p>P.S. I never download music or films; I buy CDs and rent DVDs. I do however enjoy the occasional YouTube clip.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2010/03/17/digital_economy_bill_letter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2010/03/17/digital_economy_bill_letter/</feedburner:origLink></item>
		<item>
		<title>UK electricity consumption</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/O2Hb51dRCCI/</link>
		<comments>http://craigloftus.net/blog/2009/07/19/uk-electricity-consumption/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 13:38:28 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Social]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=56</guid>
		<description><![CDATA[I recently got one of these household electricity display devices things and being the information fiend that I am I&#8217;ve started studiously recording how much electricity I use. That lead to the obvious question, How much is normal electricity consumption in the UK. The Internet did not provide me with reliable and consistent answer to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got one of these household <q>electricity display devices</q> things and being the information fiend that I am I&#8217;ve started studiously recording how much electricity I use. That lead to the obvious question, <q>How much is normal electricity consumption in the UK</q>. The Internet did not provide me with reliable and consistent answer to this question, so after not inconsiderable rooting for information, I derived the answer from the most up to date available:</p>
<p><strong>1&thinsp;860&nbsp;kWh</strong> (per person per year, UK, 2007). I&#8217;ll write about how my consumption compares once I have more lovely data to play with.</p>
<p>That is based on data from <a href="http://www.berr.gov.uk/">The Department of Business Innovation and Skills</a> on the UK domestic electricity consumption in 2007 (117&thinsp;126.2&nbsp;GWh) and the associated number of domestic meters (26&thinsp;670.3&times;10<sup>3</sup>)<sup>&thinsp;<a href="#note_1">1</a></sup>. For the per person figure, the UK 2001 Census provides a persons per household figure of 2.36<sup>&thinsp;<a href="#note_2">2</a></sup>.</p>
<ol>
<li id="#note_1"><a href="http://www.berr.gov.uk/energy/statistics/regional/regional-local-electricity/page36213.html">Electricity Consumption Data at Regional and Local Authority Level</a></li>
<li id="#note_2"><a href="http://www.statistics.gov.uk/census2001/profiles/commentaries/housing.asp">Census 2001 &#8211; People and their homes in England and Wales</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2009/07/19/uk-electricity-consumption/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2009/07/19/uk-electricity-consumption/</feedburner:origLink></item>
		<item>
		<title>Coroners and Justice Bill: Clause 152</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/IJ-rD0_dr2s/</link>
		<comments>http://craigloftus.net/blog/2009/03/03/coroners-and-justice-bill-clause-152/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 11:06:49 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Letters]]></category>
		<category><![CDATA[bill]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[letter]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=47</guid>
		<description><![CDATA[My letter to my MP, Don Foster, regarding Clause 152 of the Coroners and Justice Bill. Dear Don Foster, I would like to draw your attention to Clause 152 of the Coroners and Justice Bill. The Bill is currently in the committee phase. I am not very familiar with reading legislation or interpreting it, but [...]]]></description>
			<content:encoded><![CDATA[<p>My letter to my MP, Don Foster, regarding <a href="http://www.publications.parliament.uk/pa/cm200809/cmbills/009/09009.100-106.html#j22_005">Clause 152</a> of the <a href="http://services.parliament.uk/bills/2008-09/coronersandjustice.html">Coroners and Justice Bill</a>.</p>
<blockquote><p>
Dear Don Foster,</p>
<p>I would like to draw your attention to Clause 152 of the Coroners and<br />
Justice Bill. The Bill is currently in the committee phase. I am not<br />
very familiar with reading legislation or interpreting it, but having<br />
read the clause, I would summarise as follows.</p>
<p>The clause amends the Data Protection Act 1998 to allow ministers to<br />
break the act (by sharing personal information) when it is &#8220;necessary<br />
to secure a relevant policy&#8221; i.e. whenever they like. No restriction is<br />
placed on who the information may be shared with, or for what purposes.</p>
<p>Part B, subsection (2) also allows for the creation of offences through<br />
the issuing of information sharing orders&#8230; I don&#8217;t know how these<br />
things are normally done, but that just doesn&#8217;t sound right.</p>
<p>I fear this is a &#8220;get out clause&#8221; for those who feel tied by the Data<br />
Protection Act. It also seems to clear barriers to sharing of personal<br />
information between government departments&#8230; but further places no<br />
restriction on sharing with the private sector.</p>
<p>Yours sincerely,<br />
Craig Loftus
</p></blockquote>
<p>My letter was sent with the aid of <a href="http://www.writetothem.com/">WriteToThem.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2009/03/03/coroners-and-justice-bill-clause-152/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2009/03/03/coroners-and-justice-bill-clause-152/</feedburner:origLink></item>
		<item>
		<title>Ever more blind</title>
		<link>http://feedproxy.google.com/~r/craigloftus_blog/~3/gTErlE5B8ts/</link>
		<comments>http://craigloftus.net/blog/2009/02/19/ever-more-blind/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 21:05:24 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[eyes]]></category>
		<category><![CDATA[glasses]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[optician]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/?p=33</guid>
		<description><![CDATA[For the last few days my eyes have been feeling strained and I&#8217;ve had a constant low-level headache. I&#8217;m usually pretty good at knowing what is wrong, and I was sure that my prescription was off. I wasn&#8217;t wrong. Although the optometrist said that the relatively sudden onset of headaches was probably the result of [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few days my eyes have been feeling strained and I&#8217;ve had a constant low-level headache. I&#8217;m usually pretty good at knowing what is wrong, and I was sure that my prescription was off.</p>
<p>I wasn&#8217;t wrong. Although the optometrist said that the relatively sudden onset of headaches was probably the result of working too hard (most of my few readers are probably laughing now).</p>
<table>
<caption>This table compares today&#8217;s prescription with my last one.</caption>
<thead>
<tr>
<th rowspan="2">
<th colspan="2">2007-06-11</th>
<th colspan="2">2009-02-19</th>
</tr>
<tr>
<th>Right</th>
<th>Left</th>
<th>Right</th>
<th>Left</th>
</tr>
</thead>
<tbody>
<tr></th>
<th><abbr title="Sphere">SPH</abbr></th>
<td>-4.75</td>
<td>-4.50</td>
<td>-5.25</td>
<td>-5.00</td>
</tr>
<tr>
<th><abbr title="Cylinder">CYL</abbr></th>
<td>-0.25</td>
<td>-0.25</td>
<td>-0.25</td>
<td>-0.25</td>
</tr>
<tr>
<th><abbr>AXIS</th>
<td>90</td>
<td>85</td>
<td>85</td>
<td>95</td>
</tr>
</tbody>
</table>
<p>Basically, I am more myoptic (short sighted, represented by SPH), but my astigmatism (none spherical-ness of the eye, CYL) is the same. Oddly, the ways my eyes are pointing (Axis) has reversed&hellip; either that or someone wrote them down the wrong way around!</p>
<p>To cut a boring story off quickly, I ended up shelling out £309 for a new pair of frames and lenses! My current frames have last for about 5 years (with 3 prescription changes), so hopefully it will be money well spent.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2009/02/19/ever-more-blind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://craigloftus.net/blog/2009/02/19/ever-more-blind/</feedburner:origLink></item>
	</channel>
</rss>
