<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Parerga und Paralipomena</title>
	<atom:link href="http://www.michelepasin.org/techblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michelepasin.org/techblog</link>
	<description>At the core of all well-founded belief lies belief that is unfounded - Wittgenstein</description>
	<lastBuildDate>Thu, 17 May 2012 11:28:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>DJFacet 0.9.7: MPTT hierarchical facets now supported!</title>
		<link>http://www.michelepasin.org/techblog/2012/05/16/djfacet-0-9-7-mptt-hierarchical-facets-now-supported/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=djfacet-0-9-7-mptt-hierarchical-facets-now-supported</link>
		<comments>http://www.michelepasin.org/techblog/2012/05/16/djfacet-0-9-7-mptt-hierarchical-facets-now-supported/#comments</comments>
		<pubDate>Wed, 16 May 2012 17:25:02 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[softwareTools]]></category>
		<category><![CDATA[faceted]]></category>
		<category><![CDATA[mptt]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1898</guid>
		<description><![CDATA[DJFacet is a pluggable module for the Django web application framework that allows you to navigate the data in your webapp using an approach based on &#8216;facets&#8217;. I&#8217;ve already written about DJFacet in the past; now the good news is that I&#8217;ve released a major update to the software, as now there is complete support [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.michelepasin.org/artifacts/software/djfacet/">DJFacet</a> is a pluggable module for the <a href="https://www.djangoproject.com/">Django</a> web application framework that allows you to navigate the data in your webapp using an approach based on &#8216;facets&#8217;. I&#8217;ve <a href="http://www.michelepasin.org/techblog/2011/06/09/djfacet-a-django-faceted-browser/">already written</a> about DJFacet in the past; now the good news is that I&#8217;ve released a major update to the software, as now there is complete support for hierarchical facets too. </p>
<p><a href="http://en.wikipedia.org/wiki/Faceted_search">Wikipedia</a> describes faceted search as </p>
<blockquote><p>&#8220;a technique for accessing a collection of information represented using a faceted classification, allowing users to explore by filtering available information. A faceted classification system allows the assignment of multiple classifications to an object, enabling the classifications to be ordered in multiple ways, rather than in a single, pre-determined, taxonomic order&#8221;.</p></blockquote>
<p>Although faceted search systems aim at providing search interfaces that go beyond the model of a single, rigid, top-down catalogue for an information space, <strong>taxonomical classifications remain always one of the most useful ways to organise a dataset</strong>, as they implicitly provide support for &#8216;zoom in&#8217; and &#8216;zoom out&#8217; search operations. A good compromise then is to allow the simultaneous selection of search filters coming from different taxonomical schemas &#8211; or mixing  them with non-taxonomical ones. </p>
<p>Version 0.9.7 of Djfacet, among several other things, includes full support for displaying and navigating through hierarchical facets as long as they are expressed in the DB via <a href="http://code.google.com/p/django-mptt/">django-MPTT</a>. A <strong>demo</strong> is available <a href="http://demos.michelepasin.org/djfacet/">here</a> (just browse into the &#8216;religion&#8217; facet to see what I mean). </p>
<p><a href="http://www.flickr.com/photos/mikele/7210452232/" title="Djfacet: support for hierarchies by MagIcReBirth, on Flickr"><img src="http://farm6.staticflickr.com/5238/7210452232_528c1e14be.jpg" width="500" height="455" alt="Djfacet: support for hierarchies"></a></p>
<p>There are still a few things to sort out before reaching version 1.0 (including updating the online docs), but it&#8217;s getting closer &#8211; stay tuned!</p>
<h3>Links:</h3>
<p></p>
<li>Source code on Bitbucket: <a href="https://bitbucket.org/magicrebirth/djfacet">bitbucket.org/magicrebirth/djfacet</a></li>
<li>Documentation: <a href="http://michelepasin.org/support/djfacet/docs/">michelepasin.org/support/djfacet/docs/</a></li>
<li>Demo installation: <a href="http://demos.michelepasin.org/djfacet/">demos.michelepasin.org/djfacet/</a></li>
<li>Project page: <a href="http://www.michelepasin.org/artifacts/software/djfacet/">www.michelepasin.org/artifacts/software/djfacet/</a></li>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2012/05/16/djfacet-0-9-7-mptt-hierarchical-facets-now-supported/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting hold of your Flickr collections with Python</title>
		<link>http://www.michelepasin.org/techblog/2012/05/07/getting-hold-of-your-flickr-collections-with-python/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=getting-hold-of-your-flickr-collections-with-python</link>
		<comments>http://www.michelepasin.org/techblog/2012/05/07/getting-hold-of-your-flickr-collections-with-python/#comments</comments>
		<pubDate>Mon, 07 May 2012 12:11:52 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1889</guid>
		<description><![CDATA[Recently I&#8217;ve been a little disappointed with Flickr, the popular online photo-sharing service. Photos gone missing, entire albums disappeared. Not really what you&#8217;d like to happen to your photo collection, especially when it&#8217;s very large and therefore it&#8217;s difficult to be always on top of what&#8217;s there and what&#8217;s not.. Time to change strategy: use [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been a little disappointed with <a href="http://www.flickr.com/">Flickr</a>, the popular online photo-sharing service. Photos gone missing, entire albums disappeared. Not really what you&#8217;d like to happen to your photo collection, especially when it&#8217;s very large and therefore it&#8217;s difficult to be always on top of what&#8217;s there and what&#8217;s not.. Time to change strategy: use flickr for sharing and my local HD for backup! </p>
<p>I emailed the customer service people at Flickr, they promptly replied that it wasn&#8217;t their fault but most likely a bug with other apps I had previously authorised to edit my Flickr collection (e.g. iPhoto or Aperture). Bad news: apparently whatever happened now what&#8217;s lost is lost forever. Not much to my consolation, the same happened to other people, for example check this <a href="http://amateurtraveler.com/2010/03/27/photos-disappearing-from-flickr-when-the-cloud-fails/">post</a> or this <a href="http://thomashawk.com/2007/03/flickr-users-photos-disappearing-from.html">post</a> to see alternative versions of the problem from 2010 and 2007. </p>
<p>So I&#8217;ve suddenly realised the cloud isn&#8217;t that secure a place, as yet. It&#8217;s time to change strategy: use flickr for sharing and my local HD for backup! </p>
<p>The good news is that if you know a little programming you can download your entire Flickr collection without having to pay a cent, for example by using Python. There are a few free libraries out there for accessing the <a href="http://www.flickr.com/services/api/">Flickr API</a>s, such as <a href="http://halotis.com/2009/09/08/download-images-from-flickr-with-python/">flickrpy</a> and <a href="http://stuvel.eu/media/flickrapi-docs/documentation/">FlickrAPI</a>. They both require you to fiddle a little with the code (at the very least, get a personalised passkey from Flickr and add it to the python program) in order to get what you want. </p>
<p>The one I&#8217;ve gone for instead is a little package called <a href="https://github.com/dan/hivelogic-flickrtouchr">flickrtouchr</a>, which is even easier to use. After downloading you just have to run it from the command line and it&#8217;ll begin browsing your whole Flickr collection and download pictures at the highest resolution available. I have more than 8000 photos, and it worked like a charm  &#8211; beware though &#8211;  it took more than 10 hours on my TalkTalk connection. </p>
<p>Thanks Dan@<a href="http://hivelogic.com/">hivelogic.com</a> for writing this code &#8211; couldn&#8217;t be asking for more!</p>
<pre style='color:#d1d1d1;background:#000000; overflow:auto; font-size:12px;'><span style='color:#d2cd86; '>[</span>mac<span style='color:#d2cd86; '>]</span>@mike<span style='color:#d2cd86; '>:</span><span style='color:#d2cd86; '>~</span><span style='color:#d2cd86; '>/</span>Dropbox<span style='color:#d2cd86; '>/</span>code<span style='color:#d2cd86; '>/</span>python<span style='color:#d2cd86; '>/</span>_libs<span style='color:#d2cd86; '>/</span>dan<span style='color:#d2cd86; '>-</span>hivelogic<span style='color:#d2cd86; '>-</span>flickrtouchr<span style='color:#d2cd86; '>-</span>9ba645b<span style='color:#d2cd86; '>></span>python flickrtouchr<span style='color:#d2cd86; '>.</span>py <span style='color:#d2cd86; '>~</span><span style='color:#d2cd86; '>/</span>Desktop<span style='color:#d2cd86; '>/</span>FlickrBackupFolder

In order to allow FlickrTouchr to read your photos <span style='color:#e66170; font-weight:bold; '>and</span> favourites
you need to allow the application<span style='color:#d2cd86; '>.</span> Please press <span style='color:#e66170; font-weight:bold; '>return</span> when you've
granted access at the following url <span style='color:#d2cd86; '>(</span>which should have opened
automatically<span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>.</span>

http<span style='color:#d2cd86; '>:</span><span style='color:#d2cd86; '>/</span><span style='color:#d2cd86; '>/</span>api<span style='color:#d2cd86; '>.</span>flickr<span style='color:#d2cd86; '>.</span>com<span style='color:#d2cd86; '>/</span>services<span style='color:#d2cd86; '>/</span>auth<span style='color:#d2cd86; '>/</span><span style='color:#d2cd86; '>?</span>api_key<span style='color:#d2cd86; '>=</span>e2245325378b5675b4af4e8cdb0564716fa9bd<span style='color:#d2cd86; '>&amp;</span>perms<span style='color:#d2cd86; '>=</span>read<span style='color:#d2cd86; '>&amp;</span>frob<span style='color:#d2cd86; '>=</span>8856734hhgbbhsksd19443<span style='color:#d2cd86; '>-</span>caa77e89367asbbhfa2ba<span style='color:#d2cd86; '>-</span><span style='color:#008c00; '>600258</span><span style='color:#d2cd86; '>&amp;</span>api_sig<span style='color:#d2cd86; '>=</span>a4aasdbbnb345c7fb46bdd33cfa65ec17bb32a

Waiting <span style='color:#e66170; font-weight:bold; '>for</span> you to press <span style='color:#e66170; font-weight:bold; '>return</span>

Egypt <span style='color:#008c00; '>1</span> <span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> <span style='color:#e66170; font-weight:bold; '>in</span> set <span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> Sharm el Sheik<span style='color:#d2cd86; '>,</span> Dec <span style='color:#008c00; '>2011</span>
Egypt <span style='color:#008c00; '>2</span> <span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> <span style='color:#e66170; font-weight:bold; '>in</span> set <span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> Sharm el Sheik<span style='color:#d2cd86; '>,</span> Dec <span style='color:#008c00; '>2011</span>
Egypt <span style='color:#008c00; '>3</span> <span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> <span style='color:#e66170; font-weight:bold; '>in</span> set <span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> Sharm el Sheik<span style='color:#d2cd86; '>,</span> Dec <span style='color:#008c00; '>2011</span>
Egypt <span style='color:#008c00; '>4</span> <span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> <span style='color:#e66170; font-weight:bold; '>in</span> set <span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> Sharm el Sheik<span style='color:#d2cd86; '>,</span> Dec <span style='color:#008c00; '>2011</span>

<span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span><span style='color:#d2cd86; '>.</span> etc…<span style='color:#d2cd86; '>.</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2012/05/07/getting-hold-of-your-flickr-collections-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conference: Computer Applications and Quantitative Methods in Archeology</title>
		<link>http://www.michelepasin.org/techblog/2012/03/28/conference-computer-applications-and-quantitative-methods-in-archeology/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=conference-computer-applications-and-quantitative-methods-in-archeology</link>
		<comments>http://www.michelepasin.org/techblog/2012/03/28/conference-computer-applications-and-quantitative-methods-in-archeology/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 13:59:02 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[digitalHumanities]]></category>
		<category><![CDATA[justBlogging]]></category>
		<category><![CDATA[semanticWeb]]></category>
		<category><![CDATA[archeology]]></category>
		<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1875</guid>
		<description><![CDATA[Yesterday I went to the CAA 2012 conference in Southampton, one of the top conferences in the world in the field of computational archaeology. I couldn&#8217;t stay for longer than a day, but I&#8217;ve seen enough to say that archaeologist definitely know their way around when it comes to combining IT with their discipline. I [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I went to the <a href="http://caaconference.org/">CAA 2012</a> conference in Southampton, one of the top conferences in the world in the field of <a href="http://en.wikipedia.org/wiki/Computational_archaeology">computational archaeology</a>. I couldn&#8217;t stay for longer than a day, but I&#8217;ve seen enough to say that archaeologist definitely know their way around when it comes to combining IT with their discipline. </p>
<p>I presented a poster about the <a href="http://www.artofmaking.ac.uk/">Art of Making project</a> (which deals with categorising and making available online a collection of images of ancient Roman sculpture). In particular I was there for the <strong>Data Modelling and Sharing</strong> session: the formal ontology we&#8217;re working on in the Art of Making (and the accompanying dataset) is likely going to become one of the first in its kind. So I was quite interested in finding out who&#8217;s doing what, when it comes to sharing data about the the ancient world. </p>
<p>The answer is, there are a lot of people doing very interesting things (btw please get in touch if you know of other relatable datasets). Here&#8217;re a brief report on some the papers that struck me (for the full list of the talks I would have liked to attend, check out <a href="http://caaconference2012.sched.org/mpasin">my interactive schedule</a>.)</p>
<li>A <a href="http://caaconference2012.sched.org/event/b8dba5f531a7d2c41faebf303865357e">paper on the Pelagios project</a> by Leif Isaksen. Pelagios is a consortium that <strong>brings together</strong> an impressive number of other <strong>datasets</strong> on the ancient world. I&#8217;d say each of them is worth taking a look at: <a href="http://arachne.uni-koeln.de/drupal/">Arachne</a>; <a href="http://explore.clarosnet.org/XDB/ASP/clarosHome/">CLAROS</a>; <a href="http://www.fastionline.org/">Fasti Online</a>; <a href="http://googleancientplaces.wordpress.com/">Google Ancient Places</a>; <a href="http://nomisma.org/">Nomisma</a>; <a href="http://opencontext.org/">Open Context</a>; <a href="http://www.perseus.tufts.edu/hopper/">Perseus</a>; <a href="http://pleiades.stoa.org/">Pleiades</a>; <a href="http://ptolemymachine.appspot.com/">Ptolemy Machine</a>, <a href="http://spqr.cerch.kcl.ac.uk/">SPQR</a>; <a href="http://www.reading.ac.uk/Ure/index.php">Ure museum</a></li>
<li>A <a href="http://caaconference2012.sched.org/event/5cbf48abc47a735213ea2f95e5b55fce">paper titled &#8220;When, What, Where, How and Who?&#8221;</a> by Sarah May. She reported about a <strong>user-study aimed at understanding how archeologist search for information online</strong>, and whether an more integrated web of data would match their current information seeking behaviours. </li>
<li>The paper &#8220;<a href="http://caaconference2012.sched.org/event/efe75fbdd784b8c73d0938e4591af1b0">Exploring Semantic Web-based research questions for the spatio-temporal relationships at Çatalhöyük</a>&#8220;, by <a href="http://www.york.ac.uk/archaeology/research/research-students/holly-wright/">Holly Wright</a>. She presented an archeological data-modeling scenario that calls for <strong>more powerful knowledge representation approaches to time and events</strong>. There are two broad approaches to solve this problem, she said: <strong>temporal reification</strong> (apparently this is mostly done using SWRL rules, e.g. <a href="http://www.inf.unibz.it/krdb/events/swap2010/paper-04.pdf">here</a> and <a href="http://www.google.co.uk/url?sa=t&#038;rct=j&#038;q=&#038;esrc=s&#038;source=web&#038;cd=1&#038;ved=0CCoQFjAA&#038;url=http%3A%2F%2Fbmir.stanford.edu%2Ffile_asset%2Findex.php%2F1534%2FBMIR-2010-1414.pdf&#038;ei=9BZzT7WaFYfB0QWvn9T5Dw&#038;usg=AFQjCNFwmhf_HaJxEQMq1lI-hl-B8YpSww">here</a>) and <strong>temporal fluents</strong> (some info <a href="https://www.google.co.uk/search?ix=sea&#038;sourceid=chrome&#038;ie=UTF-8&#038;q=temporal+fluents">here</a>, and also in the context of the <a href="http://www.defeasible.org/ruleml2011ijcai/files/Batsakis.pdf">SOWL</a> project). I don&#8217;t know much on this topic, but surely this paper got me interested in it!</li>
<li>A paper presenting the <a href="http://caaconference2012.sched.org/event/394231b4c4a4ad537ce3cf314e983fb2">SAWS</a> project, which looks at defining and <strong>linking related units of text in original manuscripts</strong> using semantic web technologies.</li>
<li>The <a href="http://data.archaeologydataservice.ac.uk/page/">Archeology Data Services</a>, a York-based organisation that aims at &#8216;<strong>preserving digital data in the long term</strong>, and by promoting and disseminating a broad range of data in archaeology&#8217;. In particular one of their project, <a href="http://archaeologydataservice.ac.uk/research/stellar/">Stellar</a>, has produced a <a href="http://hypermedia.research.glam.ac.uk/resources/STELLAR-applications/">number of software tools</a> that facilitate the manipulation of archeological data and their transformation into rdf-compliant formats.    </li>
<p>&nbsp;</p>
<p>Finally, this is the schedule for the whole conference (notice the slick widget &#8211; it&#8217;s powered by a new service <a href="http://sched.org/">sched.org</a>)  :</p>
<p><iframe src="http://caaconference2012.sched.org/mobile/?embed=true&#038;bg=transparent" frameborder="0" allowTransparency="true"  width="300" height="300"></iframe></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2012/03/28/conference-computer-applications-and-quantitative-methods-in-archeology/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Future of the Book</title>
		<link>http://www.michelepasin.org/techblog/2012/03/01/the-future-of-the-book/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-future-of-the-book</link>
		<comments>http://www.michelepasin.org/techblog/2012/03/01/the-future-of-the-book/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 15:16:32 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[digitalHumanities]]></category>
		<category><![CDATA[justBlogging]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[ebook]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1846</guid>
		<description><![CDATA[In the last weeks I happened to run into a few online products that look at the future of the book, that is, at how reading (and the things we normally do when we read) will change, now that the digital world is so pervasive and accessible. To be fair, I&#8217;ve been intrigued by this [...]]]></description>
			<content:encoded><![CDATA[<p>In the last weeks I happened to run into a few online products that look at the <em>future</em> of the book, that is, at how reading (and the things we normally do when we read) will change, now that the digital world is so pervasive and accessible. To be fair, I&#8217;ve been intrigued by this topic for a long time, although probably with a much less academic interest than the one many people in the digital humanities community often have. </p>
<p>In short, I&#8217;d say I care more about designing <em>applications</em> that can change the way people read online, rather than taking on biblical text-encoding enterprises that at the end of the day result in just another, more complicated, html page.</p>
<p>So I was happy to see that there&#8217;s lots going on in this area outside academia; in this post (which is a work-in-progress) I&#8217;ll start collecting a few examples of this kind of digital tools.</p>
<h2>Findings</h2>
<p><a href="https://findings.com/">Findings</a> is a &#8220;groundbreaking tool for collecting, sharing and discussing clips you find on your Amazon Kindle and from any website on the internet. Just import your Amazon Kindle Highlights with Findings and you can start sharing and discussing them with others instantly&#8221;.</p>
<p>The key idea here seems to be that since a lot of the reading we do nowadays is online (or on digital devices) we may as well start sharing the &#8216;highlights&#8217; we create by using a social network architecture (e.g. share, vote, comment on etc.). The idea definitely makes sense, and, quite interestingly, it reminds us of what used to be common practice in a time when the book (as we know it nowadays) wasn&#8217;t yet an established form of writing (check out <a href="https://findings.com/john/finding/12308">Robert Darnton</a>: &#8220;<em>early modern Englishmen … broke texts into fragments and assembled them into new patterns by transcribing them in different sections of their notebooks</em>&#8220;)</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/cRklCSSx_eA" frameborder="0" allowfullscreen></iframe></p>
<h2>Small Demons:</h2>
<p><a href="https://www.smalldemons.com/">Small Demons</a>. The blurb is catchy: &#8220;suppose someone took every meaningful detail from all the books you love. Every song mentioned, every person, every food or place or movie title. And what if they did that for all the books everyone else loves, too. The ones you’ve never heard of. Suddenly you’ve got a whole world of seemingly random people, places and things, all gathered in one place. Together they create something vast, wonderful and entirely new. A Storyverse. A place where details touch, overlap and lead you further. To new music to listen to. New movies to watch. Places to visit. People to know. And of course, new books to read. Getting started is simple. Just choose a book. See where it takes you.&#8221;</p>
<p>Here there seems to be some level of <a href="http://www.ontotext.com/kim/semantic-annotation">semantic annotation</a> of the texts, which produces a thick layer of metadata that can be used to create unusual and interesting interconnections among the materials published. Definitely worth keeping an eye on &#8211; in particular I wonder how &#8216;deep&#8217; is the semantic annotation process, and on which scale!</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/DSlY74J6iH8" frameborder="0" allowfullscreen></iframe></p>
<h2>Readmill</h2>
<p><a href="http://readmill.com/">Readmill</a> is a &#8220;curious community of readers, sharing and highlighting the books they love. Highlight your favorite passages and share them with your reading community. Follow people you like and find out what your friends are reading. Explore a world of reading and keep a list of books you want to read. Read with Readmill for iPad, and sync highlights from Amazon Kindle with the Readmill Bookmarklet.&#8221; </p>
<p>The <em>read-highlight-share</em> idea is the same as in Findings (above); the main difference, at first sight, is that this Berlin-based startup is also producing mobile apps (e.g. iPhone, android) that will make the &#8216;Readmill experience&#8217; much more integrated and, supposedly, powerful. We&#8221;ll see!</p>
<p><iframe src="http://player.vimeo.com/video/33250586?byline=0" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<h2>Quote.fm</h2>
<p><a href="">Quote.fm</a> is presented as &#8220;the best way to discover, read and share great texts that have the power to convey ideas, provoke emotions or change your entire life. It&#8217;s all about texts truly worth reading.&#8221;</p>
<p>This is another German company that in the spirit of Findings (above) has put up a service for saving and sharing quotations taken from online resources. The site look is quite appealing, there&#8217;s no support for Kindle yet by it appears from the <a href="http://quote.fm/about">Timeline</a> that soon we&#8217;ll see a whole bunch of new features on this site..</p>
<h2>Read and Note</h2>
<p><a href=""><a href="http://readandnote.com/index.html">Readandnote.com</a> system &#8220;has the ability to annotate digital versions of books and many types of different assets, add any asset and the capability of linking references through the annotation process. The e-publication suddenly becomes more than a &#8216;read-only&#8217; document&#8221;.</p>
<p>This technology seems very promising; the website talks about supporting iPad and mobile devices too, which is always a plus. Unfortunately there isn&#8217;t any demo or screencast available at the moment, but we&#8217;ll keep an eye on this (you can <a href="http://readandnote.com/contact.php">sign up</a> to receive news from them if you like). </p>
<p>&nbsp;</p>
<h3>That&#8217;s all for now..</h3>
<p>Which of the ones above will succeed? I&#8217;ll try to keep adding pointers to this list as I run into them in the next weeks, so come back for more. </p>
<blockquote><li>Tip: the recently finished <a href="http://www.ifbookthen.com/?cat=11">ifBookThen</a> conference had a lot of interesting talks (also, you can read an overview of it on <a href="http://storify.com/ifbookthen/ifbookthen-2012">Storify</a>)</li>
</blockquote>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2012/03/01/the-future-of-the-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Canvas Cookbook</title>
		<link>http://www.michelepasin.org/techblog/2012/02/08/html5-canvas-cookbook/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=html5-canvas-cookbook</link>
		<comments>http://www.michelepasin.org/techblog/2012/02/08/html5-canvas-cookbook/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 17:34:12 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1815</guid>
		<description><![CDATA[HTML5 Canvas Cookbook is a new publication from Packt publishing that discusses in details the new drawing functionalities the html5 canvas element makes available; in the last weeks I've been looking at this book in more details and since it's been a quite useful learning experience I wanted to mention it here too. The book [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.packtpub.com/html5-canvas-cookbook-recipes-to-revolutionize-web-experience/book">HTML5 Canvas Cookbook</a> is a new publication from Packt publishing that discusses in details the new drawing functionalities the html5 canvas element makes available; in the last weeks I've been looking at this book in more details and since it's been a quite useful learning experience I wanted to mention it here too.</p> 

<p>The book (which is <a href="http://www.packtpub.com/html5-canvas-cookbook-recipes-to-revolutionize-web-experience/book">available online here</a> )is simple and well organized; it spends quite a bit of time on both introductory topics and more advanced ones, so it'll probably fit both the beginner and the more experienced programmer. </p>

<p>Here's a list of the chapters available: </p>

<div style="height: 400px; overflow: auto;"><pre>
CHAPTER 1: GETTING STARTED WITH PATHS AND TEXT
Introduction
Drawing a line
Drawing an arc
Drawing a Quadratic curve
Drawing a Bezier curve
Drawing a zigzag
Drawing a spiral
Working with text
Drawing 3D text with shadows
Unlocking the power of fractals: Drawing a haunted tree

CHAPTER 2: SHAPE DRAWING AND COMPOSITES
Introduction
Drawing a rectangle
Drawing a circle
Working with custom shapes and fill styles
Fun with Bezier curves: drawing a cloud
Drawing transparent shapes
Working with the context state stack to save and restore styles
Working with composite operations
Creating patterns with loops: drawing a gear
Randomizing shape properties: drawing a field of flowers
Creating custom shape functions: playing card suits
Putting it all together: drawing a jet

CHAPTER 3: WORKING WITH IMAGES AND VIDEOS
Introduction
Drawing an image
Cropping an image
Copying and pasting sections of the canvas
Working with video
Getting image data
Introduction to pixel manipulation: inverting image colors
Inverting video colors
Converting image colors to grayscale
Converting a canvas drawing into a data URL
Saving a canvas drawing as an image
Loading the canvas with a data URL
Creating a pixelated image focus

CHAPTER 4: MASTERING TRANSFORMATIONS
Introduction
Translating the canvas context
Rotating the canvas context
Scaling the canvas context
Creating a mirror transform
Creating a custom transform
Shearing the canvas context
Handling multiple transforms with the state stack
Transforming a circle into an oval
Rotating an image
Drawing a simple logo and randomizing its position, rotation, and scale

CHAPTER 5: BRINGING THE CANVAS TO LIFE WITH ANIMATION
Introduction
Creating an Animation class
Creating a linear motion
Creating acceleration
Creating oscillation
Oscillating a bubble
Swinging a pendulum
Animating mechanical gears
Animating a clock
Simulating particle physics
Creating microscopic life forms
Stressing the canvas and displaying the FPS

CHAPTER 6: INTERACTING WITH THE CANVAS: ATTACHING EVENT LISTENERS TO SHAPES AND REGIONS 
Introduction
Creating an Events Class
Working With Canvas Mouse Coordinates
Attaching Mouse Event Listeners to Regions
Attaching Touch Event Listeners to Regions on a Mobile Device
Attaching Event Listeners to Images
Dragging-And-Dropping Shapes
Dragging-And-Dropping Images
Creating an Image Magnifier
Creating a Drawing Application

CHAPTER 7: CREATING GRAPHS AND CHARTS
Introduction
Creating a pie chart
Creating a bar chart
Graphing equations
Plotting data points with a line chart

CHAPTER 8: SAVING THE WORLD WITH GAME DEVELOPMENT
Introduction
Creating sprite sheets for the heroes and enemies
Creating level images and boundary maps
Creating an Actor class for the hero and enemies
Creating a Level class
Creating a Health Bar class
Creating a Controller class
Creating a Model class
Creating a View class
Setting up the HTML document and starting the game

CHAPTER 9: INTRODUCING WEBGL
Introduction
Creating a WebGL wrapper to simplify the WebGL API
Creating a triangular plane
Rotating a triangular plane in 3D space
Creating a rotating cube
Adding textures and lighting
Creating a 3D world that you can explore

</pre></div>

<p>The last chapters about animations and game developments are probably the most interesting ones, especially they all include detailed walk-through of the techniques discussed. Here's for example an example from Chapter 5, 'Oscillating a bubble': </p>


<canvas id="myCanvas" width="400" height="250" style="border:1px solid black;">
</canvas>




<script type="text/javascript">


var Animation = function(canvasId){
    this.canvas = document.getElementById(canvasId);
    this.context = this.canvas.getContext("2d");
    this.t = 0;
    this.timeInterval = 0;
    this.startTime = 0;
    this.lastTime = 0;
    this.frame = 0;
    this.animating = false;
    
    // provided by Paul Irish
    window.requestAnimFrame = (function(callback){
        return window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.oRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        function(callback){
            window.setTimeout(callback, 1000 / 60);
        };
    })();
};

Animation.prototype.getContext = function(){
    return this.context;
};

Animation.prototype.getCanvas = function(){
    return this.canvas;
};

Animation.prototype.clear = function(){
    this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
};

Animation.prototype.setDrawStage = function(func){
    this.drawStage = func;
};

Animation.prototype.isAnimating = function(){
    return this.animating;
};

Animation.prototype.getFrame = function(){
    return this.frame;
};

Animation.prototype.start = function(){
    this.animating = true;
    var date = new Date();
    this.startTime = date.getTime();
    this.lastTime = this.startTime;
    
    if (this.drawStage !== undefined) {
        this.drawStage();
    }
    
    this.animationLoop();
};

Animation.prototype.stop = function(){
    this.animating = false;
};
Animation.prototype.getTimeInterval = function(){
    return this.timeInterval;
};

Animation.prototype.getTime = function(){
    return this.t;
};

Animation.prototype.getFps = function(){
    return this.timeInterval > 0 ? 1000 / this.timeInterval : 0;
};

Animation.prototype.animationLoop = function(){
    var that = this;
    
    this.frame++;
    var date = new Date();
    var thisTime = date.getTime();
    this.timeInterval = thisTime - this.lastTime;
    this.t += this.timeInterval;
    this.lastTime = thisTime;
    
    if (this.drawStage !== undefined) {
        this.drawStage();
    }
    
    if (this.animating) {
        requestAnimFrame(function(){
            that.animationLoop();
        });
    }
};



window.onload = function(){
    // instantiate new animation object
    var anim = new Animation("myCanvas");
    var context = anim.getContext();
    var canvas = anim.getCanvas();
    
    anim.setDrawStage(function(){
        // update
        var widthScale = Math.sin(this.getTime() / 200) * 0.1 + 0.9;
        var heightScale = -1 * Math.sin(this.getTime() / 200) * 0.1 + 0.9;

        // clear
        this.clear();
        
        //draw
        context.beginPath();
        context.save();
        context.translate(canvas.width / 2, canvas.height / 2);
        context.scale(widthScale, heightScale);
        context.arc(0, 0, 65, 0, 2 * Math.PI, false);
        context.restore();
        context.fillStyle = "#8ED6FF";
        context.fill();
        context.lineWidth = 2;
        context.strokeStyle = "#555";
        context.stroke();
        
        context.beginPath();
        context.save();
        context.translate(canvas.width / 2, canvas.height / 2);
        context.scale(widthScale, heightScale);
        context.arc(-30, -30, 15, 0, 2 * Math.PI, false);
        context.restore();
        context.fillStyle = "white";
        context.fill();
    });
    
    anim.start();
};

</script>



<p>&nbsp;</p>

In a nutshell, this is what is going on (note that the 'animation' library is discussed in a previous chapter of the book): 

<p>&nbsp;</p>

<pre style='color:#000020;background:#f6f8ff; overflow: auto;'><span style='color:#308080; '>&lt;</span>script src<span style='color:#308080; '>=</span><span style='color:#800000; '>"</span><span style='color:#1060b6; '>animation.js</span><span style='color:#800000; '>"</span><span style='color:#308080; '>></span><span style='color:#308080; '>&lt;</span><span style='color:#308080; '>/</span>script<span style='color:#308080; '>></span>
<span style='color:#308080; '>&lt;</span>script<span style='color:#308080; '>></span>
    window<span style='color:#308080; '>.</span>onload <span style='color:#308080; '>=</span> <span style='color:#200080; font-weight:bold; '>function</span><span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>{</span>
        <span style='color:#595979; '>// instantiate new animation object</span>
        <span style='color:#200080; font-weight:bold; '>var</span> anim <span style='color:#308080; '>=</span> <span style='color:#200080; font-weight:bold; '>new</span> Animation<span style='color:#308080; '>(</span><span style='color:#800000; '>"</span><span style='color:#1060b6; '>myCanvas</span><span style='color:#800000; '>"</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
        <span style='color:#200080; font-weight:bold; '>var</span> context <span style='color:#308080; '>=</span> anim<span style='color:#308080; '>.</span>getContext<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
        <span style='color:#200080; font-weight:bold; '>var</span> canvas <span style='color:#308080; '>=</span> anim<span style='color:#308080; '>.</span>getCanvas<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
        
        anim<span style='color:#308080; '>.</span>setDrawStage<span style='color:#308080; '>(</span><span style='color:#200080; font-weight:bold; '>function</span><span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>{</span>
            <span style='color:#595979; '>// update</span>
            <span style='color:#200080; font-weight:bold; '>var</span> widthScale <span style='color:#308080; '>=</span> <span style='color:#007d45; '>Math</span><span style='color:#308080; '>.</span><span style='color:#200080; font-weight:bold; '>sin</span><span style='color:#308080; '>(</span><span style='color:#200080; font-weight:bold; '>this</span><span style='color:#308080; '>.</span><span style='color:#200080; font-weight:bold; '>getTime</span><span style='color:#308080; '>(</span><span style='color:#308080; '>)</span> <span style='color:#308080; '>/</span> <span style='color:#008c00; '>200</span><span style='color:#308080; '>)</span> <span style='color:#308080; '>*</span> <span style='color:#008000; '>0.1</span> <span style='color:#308080; '>+</span> <span style='color:#008000; '>0.9</span><span style='color:#406080; '>;</span>
            <span style='color:#200080; font-weight:bold; '>var</span> heightScale <span style='color:#308080; '>=</span> <span style='color:#308080; '>-</span><span style='color:#008c00; '>1</span> <span style='color:#308080; '>*</span> <span style='color:#007d45; '>Math</span><span style='color:#308080; '>.</span><span style='color:#200080; font-weight:bold; '>sin</span><span style='color:#308080; '>(</span><span style='color:#200080; font-weight:bold; '>this</span><span style='color:#308080; '>.</span><span style='color:#200080; font-weight:bold; '>getTime</span><span style='color:#308080; '>(</span><span style='color:#308080; '>)</span> <span style='color:#308080; '>/</span> <span style='color:#008c00; '>200</span><span style='color:#308080; '>)</span> <span style='color:#308080; '>*</span> <span style='color:#008000; '>0.1</span> <span style='color:#308080; '>+</span> <span style='color:#008000; '>0.9</span><span style='color:#406080; '>;</span>

            <span style='color:#595979; '>// clear</span>
            <span style='color:#200080; font-weight:bold; '>this</span><span style='color:#308080; '>.</span>clear<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            
            <span style='color:#595979; '>//draw</span>
            context<span style='color:#308080; '>.</span>beginPath<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>save<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>translate<span style='color:#308080; '>(</span>canvas<span style='color:#308080; '>.</span>width <span style='color:#308080; '>/</span> <span style='color:#008c00; '>2</span><span style='color:#308080; '>,</span> canvas<span style='color:#308080; '>.</span>height <span style='color:#308080; '>/</span> <span style='color:#008c00; '>2</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>scale<span style='color:#308080; '>(</span>widthScale<span style='color:#308080; '>,</span> heightScale<span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>arc<span style='color:#308080; '>(</span><span style='color:#008c00; '>0</span><span style='color:#308080; '>,</span> <span style='color:#008c00; '>0</span><span style='color:#308080; '>,</span> <span style='color:#008c00; '>65</span><span style='color:#308080; '>,</span> <span style='color:#008c00; '>0</span><span style='color:#308080; '>,</span> <span style='color:#008c00; '>2</span> <span style='color:#308080; '>*</span> <span style='color:#007d45; '>Math</span><span style='color:#308080; '>.</span>PI<span style='color:#308080; '>,</span> <span style='color:#0f4d75; '>false</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>restore<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>fillStyle <span style='color:#308080; '>=</span> <span style='color:#800000; '>"</span><span style='color:#1060b6; '>#8ED6FF</span><span style='color:#800000; '>"</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>fill<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>lineWidth <span style='color:#308080; '>=</span> <span style='color:#008c00; '>2</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>strokeStyle <span style='color:#308080; '>=</span> <span style='color:#800000; '>"</span><span style='color:#1060b6; '>#555</span><span style='color:#800000; '>"</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>stroke<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            
            context<span style='color:#308080; '>.</span>beginPath<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>save<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>translate<span style='color:#308080; '>(</span>canvas<span style='color:#308080; '>.</span>width <span style='color:#308080; '>/</span> <span style='color:#008c00; '>2</span><span style='color:#308080; '>,</span> canvas<span style='color:#308080; '>.</span>height <span style='color:#308080; '>/</span> <span style='color:#008c00; '>2</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>scale<span style='color:#308080; '>(</span>widthScale<span style='color:#308080; '>,</span> heightScale<span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>arc<span style='color:#308080; '>(</span><span style='color:#308080; '>-</span><span style='color:#008c00; '>30</span><span style='color:#308080; '>,</span> <span style='color:#308080; '>-</span><span style='color:#008c00; '>30</span><span style='color:#308080; '>,</span> <span style='color:#008c00; '>15</span><span style='color:#308080; '>,</span> <span style='color:#008c00; '>0</span><span style='color:#308080; '>,</span> <span style='color:#008c00; '>2</span> <span style='color:#308080; '>*</span> <span style='color:#007d45; '>Math</span><span style='color:#308080; '>.</span>PI<span style='color:#308080; '>,</span> <span style='color:#0f4d75; '>false</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>restore<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>fillStyle <span style='color:#308080; '>=</span> <span style='color:#800000; '>"</span><span style='color:#1060b6; '>white</span><span style='color:#800000; '>"</span><span style='color:#406080; '>;</span>
            context<span style='color:#308080; '>.</span>fill<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
        <span style='color:#406080; '>}</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
        
        anim<span style='color:#308080; '>.</span>start<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
    <span style='color:#406080; '>}</span><span style='color:#406080; '>;</span>
<span style='color:#308080; '>&lt;</span><span style='color:#308080; '>/</span>script<span style='color:#308080; '>></span>
</pre>

<p>&nbsp;</p>

<p>All in all, a book definitely worth reading!</p>

<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2012/02/08/html5-canvas-cookbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up the new &#8216;staticfiles&#8217; app on Django 1.3</title>
		<link>http://www.michelepasin.org/techblog/2012/01/24/setting-up-the-new-staticfiles-app-on-django-1-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setting-up-the-new-staticfiles-app-on-django-1-3</link>
		<comments>http://www.michelepasin.org/techblog/2012/01/24/setting-up-the-new-staticfiles-app-on-django-1-3/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 10:26:09 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[static]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1734</guid>
		<description><![CDATA[Even if I've been using Django 1.3 for a while now, I've been holding off on some of it new features, such as the new way to handle static files via a new app called (guess what) staticfiles . Essentially, what the new static app does is allowing you to leave all static files within [...]]]></description>
			<content:encoded><![CDATA[Even if I've been using Django 1.3 for a while now, I've been holding off on some of it new features, such as the new way to handle static files via a <a href="https://docs.djangoproject.com/en/dev/howto/static-files/">new app</a> called (guess what) <span style="font-family:monospace;color:#000000; ">staticfiles</span> . Essentially, what the new static app does is allowing you to leave all static files within the <span style="font-family:monospace;color:#000000; ">/static</span> directory of each of the django apps you're using. This is for development; when you're deploying and (most likely) want these files to be served via a (faster) separate server process, the <span style="font-family:monospace;color:#000000; ">staticfiles</span> app helps you gather all of them into a predefined directory by using a handy shell command.

That's the gist of it. I finally took a look at <span style="font-family:monospace;color:#000000; ">django.contrib.staticfiles</span> last week, so here's a brief report on how to get it to work (p.s. a couple of related threads on stack overflow can be found <a href="http://stackoverflow.com/questions/7620307/how-do-i-serve-css-to-django-in-development">here</a> and <a href="http://stackoverflow.com/questions/4565935/django-staticfiles-app-help">here</a>).



<h3>1. Set up the static and media paths settings</h3>

My previous settings looked like this:

<pre style='overflow:auto;color:#000000;background:#ffffff;'><span style='color:#3f7f59; '># the site root is one level up from where settings.py is</span>
SITE_ROOT = os.path.dirname(os.path.realpath(__file__)).rsplit(<span style='color:#2a00ff; '>'/'</span>, 1)[0]
MEDIA_ROOT = os.path.join(SITE_ROOT, <span style='color:#2a00ff; '>'static'</span>)
MEDIA_URL = <span style='color:#2a00ff; '>'/static/'</span>
ADMIN_MEDIA_PREFIX = <span style='color:#2a00ff; '>'/static/adminmedia1.3/'</span>
</pre>

The media root contained all of my static files, some of which I had to copy in there manually, each time I added a new django app to my project. On the production server, the <span style="font-family:monospace;color:#000000; ">MEDIA_URL</span> is mapped to a local path (in the apache conf settings) that is essentially a duplicate of the <span style="font-family:monospace;color:#000000; ">/static</span> directory we have in the development server. The only difference, the static stuff is delivered directly by Apache, bypassing django (=so to make it faster). 

The <strong>new way</strong> of declaring these variables is this instead:

<pre style='overflow:auto;color:#000000;background:#ffffff;'>MEDIA_URL = <span style='color:#2a00ff; '>'/media/uploads/'</span>
STATIC_URL = <span style='color:#2a00ff; '>'/media/static/'</span>
ADMIN_MEDIA_PREFIX = <span style='color:#2a00ff; '>'/media/static/admin/'</span>

<span style='color:#3f7f59; '># Absolute path to the directory that holds media uploaded</span>
<span style='color:#3f7f59; '># I keep the uploads folder at the project-root level server</span>
MEDIA_ROOT = os.path.join(SITE_ROOT, <span style='color:#2a00ff; '>'uploads'</span>) 

<span style='color:#3f7f59; '># physical location of extra static files in development server</span>
STATICFILES_DIRS = (
    os.path.join(SITE_ROOT, <span style='color:#2a00ff; '>'myproject/static'</span>),
)
<span style='color:#3f7f59; '># path used with "python manage.py collectstatic"</span>
<span style='color:#3f7f59; '># I normally put this at the project-root level that contains also the wsgi files for apache</span>
STATIC_ROOT = os.path.join(SITE_ROOT, <span style='color:#2a00ff; '>'apache/static'</span>)
</pre>

Obviously on a production server, you will have to set up the required aliases in the <a href="https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#serving-files">apache conf</a> file, so that <span style="font-family:monospace;color:#000000; ">MEDIA_URL</span> and <span style="font-family:monospace;color:#000000; ">STATIC_URL</span> are pointing at the right physical locations: 

<pre style='overflow:auto;color:#000000;background:#ffffff;'>Alias /media/uploads/ /path/to/mysite.com/uploads/
Alias /media/static/ /path/to/mysite.com/apache/static/
</pre>

The <a href="https://docs.djangoproject.com/en/dev/howto/static-files/">django docs</a> explain the new approach with these words: 

<blockquote>In previous versions of Django, it was common to place static assets in MEDIA_ROOT along with user-uploaded files, and serve them both at MEDIA_URL. Part of the purpose of introducing the staticfiles app is to make it easier to keep static files separate from user-uploaded files.

For this reason, you need to make your MEDIA_ROOT and MEDIA_URL different from your STATIC_ROOT and STATIC_URL.

The STATIC_ROOT directory is not necessary in the development server: in fact  is only used if you call the collectstatic manangement command. It's not needed to add the directory to the STATICFILES_DIRS setting to serve your static files!

Furthemore, the STATICFILES_DIRS variable tells Django of the location of static files which are not within specific applications. Mind that during the 'collection' operations also these files will be copied into the STATIC_ROOT directory.</blockquote>


<p>&nbsp;</p>
<h3>2. Add context processors and the app</h3>

Add the required context processor in <span style="font-family:monospace;color:#000000; ">setting.py</span>: 

<pre style='overflow:auto;color:#000000;background:#ffffff;'>TEMPLATE_CONTEXT_PROCESSORS += <span style='color:#2a00ff; '>'django.core.context_processors.static'</span></pre>
	
Add also the new static app to your installed apps:

<pre style='overflow:auto;color:#000000;background:#ffffff;'>INSTALLED_APPS = (
....    
    <span style='color:#2a00ff; '>'django.contrib.staticfiles'</span>,    
.....
)
</pre>

<blockquote>Keep in mind that it's very likely that in your templates you will have to manually change all references to <span style="font-family:monospace;color:#000000; ">MEDIA_URL</span> into <span style="font-family:monospace;color:#000000; ">STATIC_URL</span>!</blockquote>

<p>&nbsp;</p>
<h3>3. Url configuration</h3>

On your <strong>development</strong> server, this is what you would do:

<pre style='overflow:auto;color:#000000;background:#ffffff;'><span style='color:#7f0055; font-weight:bold; '>from</span> django.contrib.staticfiles.urls <span style='color:#7f0055; font-weight:bold; '>import</span> staticfiles_urlpatterns
<span style='color:#3f7f59; '># ... the rest of your URLconf goes here ...</span>
urlpatterns += staticfiles_urlpatterns()
</pre>

This will inspect your <span style="font-family:monospace;color:#000000; ">STATIC_URL</span> setting and wire up the view to serve static files accordingly. Don't forget to set the <span style="font-family:monospace;color:#000000; ">STATICFILES_DIRS</span> setting appropriately to let <span style="font-family:monospace;color:#000000; ">django.contrib.staticfiles</span> know where to look for files additionally to files in app directories.

<blockquote><strong>WARNING</strong>: the <span style="font-family:monospace;color:#000000; ">staticfiles_urlpatterns</span> helper function will only work if <span style="font-family:monospace;color:#000000; ">DEBUG</span> is True and your <span style="font-family:monospace;color:#000000; ">STATIC_URL</span> setting is neither empty nor a full URL such as http://static.example.com/ (more info <a href="https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-development-view">here</a>).</blockquote>

Finally, mind that in this new approach you will need to arrange for serving of files in <span style="font-family:monospace;color:#000000; ">MEDIA_ROOT</span> yourself; <strong>staticfiles does not deal with user-uploaded files at all</strong>. You can, however, use <span style="font-family:monospace;color:#000000; ">django.views.static.serve()</span> view for serving <span style="font-family:monospace;color:#000000; ">MEDIA_ROOT</span> in development (for more info see <a href="https://docs.djangoproject.com/en/dev/howto/static-files/#serving-other-directories">Serving other directories</a>).

<pre style='overflow:auto;color:#000000;background:#ffffff;'><span style='color:#7f0055; font-weight:bold; '>if</span> settings.LOCAL_SERVER:     <span style='color:#3f7f59; '># ===> static files on local machine    </span>
    urlpatterns += patterns(<span style='color:#2a00ff; '>''</span>, 
        (<span style='color:#2a00ff; '>r'^media/uploads/(?P&lt;path>.*)$'</span>, <span style='color:#2a00ff; '>'django.views.static.serve'</span>, 
            {<span style='color:#2a00ff; '>'document_root'</span>: settings.MEDIA_ROOT, <span style='color:#2a00ff; '>'show_indexes'</span>: True}),
        )
</pre>

In the end, I conflated the two things into this code (ps I've added a variable called <span style="font-family:monospace;color:#000000; ">LOCAL_SERVER</span> to quickly see which platform I'm on):

<pre style='overflow:auto;color:#000000;background:#ffffff;'><span style='color:#7f0055; font-weight:bold; '>if</span> settings.LOCAL_SERVER:     <span style='color:#3f7f59; '># ===> static files on local machine</span>
    <span style='color:#7f0055; font-weight:bold; '>from</span> django.contrib.staticfiles.urls <span style='color:#7f0055; font-weight:bold; '>import</span> staticfiles_urlpatterns
    urlpatterns += staticfiles_urlpatterns()    
    urlpatterns += patterns(<span style='color:#2a00ff; '>''</span>, 
        (<span style='color:#2a00ff; '>r'^media/uploads/(?P&lt;path>.*)$'</span>, <span style='color:#2a00ff; '>'django.views.static.serve'</span>, 
            {<span style='color:#2a00ff; '>'document_root'</span>: settings.MEDIA_ROOT, <span style='color:#2a00ff; '>'show_indexes'</span>: True}),
        )
</pre>

<p>&nbsp;</p>
<h3>4. On your production server</h3>

Easy: in your urlconf there's no need to do anything, as static urls are usually handled by Apache directly. However for that to happen what you have to do is collect all static files into the directory that apache is looking into, that is, the one specified with the <span style="font-family:monospace;color:#000000; ">STATIC_ROOT</span> setting. This is how you do it: 

<blockquote><code><font size="2" face="Courier New" color="black">python manage.py collectstatic</font></code></blockquote>

This shell command will
a) look in the <span style="font-family:monospace;color:#000000; ">/static/</span> directory of each of the apps of yours <span style="font-family:monospace;color:#000000; ">INSTALLED_APPS</span> setting.
b) look in directories you specify in the <span style="font-family:monospace;color:#000000; ">STATICFILES_DIRS</span> setting.

…and copy whatever it finds into the <span style="font-family:monospace;color:#000000; ">STATIC_ROOT</span> directory, as defined in your settings (ps: it'll preserve the original directory structure). 


That's all folks!


<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2012/01/24/setting-up-the-new-staticfiles-app-on-django-1-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Towards a conceptual model for the domain of Sculpture</title>
		<link>http://www.michelepasin.org/techblog/2011/11/19/towards-a-conceptual-model-for-the-domain-of-sculpture/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=towards-a-conceptual-model-for-the-domain-of-sculpture</link>
		<comments>http://www.michelepasin.org/techblog/2011/11/19/towards-a-conceptual-model-for-the-domain-of-sculpture/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 14:44:09 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[digitalHumanities]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mindmapping]]></category>
		<category><![CDATA[modeling]]></category>
		<category><![CDATA[representations]]></category>
		<category><![CDATA[sculpture]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1704</guid>
		<description><![CDATA[For the next two years I'll be collaborating with the Art of Making project. The project investigates the processes involved in the carving of stone during the Roman period, in particular it aims at analysing them using the insights and understanding Peter Rockwell (son of Norman Rockwell) developed during his lifelong experience as a sculptor. [...]]]></description>
			<content:encoded><![CDATA[For the next two years I'll be collaborating with the <a href="http://www.artofmaking.ac.uk/">Art of Making</a> project. The project investigates the processes involved in the carving of stone during the Roman period, in particular it aims at analysing them using the insights and understanding <a href="http://www.geoffreyrockwell.com/PRportfolio/">Peter Rockwell</a> (son of <a href="http://en.wikipedia.org/wiki/Norman_Rockwell">Norman Rockwell</a>) developed during his lifelong experience as a sculptor. Eventually we will present these results by means of a freely accessible online digital resource that guides users through examples of stone carving. In this post I just wanted to report on the very first discussions I had with the sculpture and art scholars I'm working with, to the purpose of creating a shared model for this  domain.   

The project started this July, it is based at <a href="http://www.kcl.ac.uk/">King’s College London</a> and is funded by the Leverhulme Trust. I'm more involved with the digital aspects of the project, and as usual one of the first steps involved in the building of a digital resource (in particular, a database-backed digital resource) is the construction of a <b>conceptual model</b> that can represent the main <b>types of things</b> being dealt with. 

In other words, it is fundamental to identify which are the things our database and web-application should 'talk about'; later on, this model can be refined and extended so to become an abstract template of the data-manipulation tasks the software application must be capable of supporting (e.g. entering data into the system, searching and visualising them). 

Here's a nice example of the sculptures (a <a href="http://www.artofmaking.ac.uk/2012/01/03/image-of-the-month-january-2012/">sarcophagus from Aphrodisias</a>) that constitute our 'source' materials:

<p><img src="http://www.artofmaking.ac.uk/wp-content/uploads/2012/01/7-4.jpg" /></p>



<h3>What are the key entities in the sculpture domain?</h3>

To this purpose, a few weeks ago we had a very productive brainstorming session aimed at fleshing out the main items of interest in the world of sculpture. This is a very first step towards the construction of a formal model for this domain; nonetheless, I think that we have already managed to pin down the key elements we're going to be dealing with in the next two years. 

Here's a list of the main objects we identified:

<ul>
<li>- <strong>People</strong>, such as craftsman's etc..</li>
<li>- <strong>Sculptures</strong> (of various kinds)</li>
<li>- <strong>Materials</strong></li>
<li>- <strong>Tools</strong></li>
<li>- Generic <strong>processes</strong> that are part of a sculpting project, such as quarrying and transport.
</li>
<li>- More specific <strong>methods</strong> being used within a particular process, e.g. carving styles, or approaches to quarrying.</li>
<li>- <strong>Traditions</strong>, conceptualisations of the 'way of doing things' that, in turn, can inspire the way methods and processes are carried out nowadays.</li>
</ul>

We encoded the results of our discussions in a <a href="http://en.wikipedia.org/wiki/Mind_map">mind map</a> for better readability, and also in order to use a technology that would make it easier to share our findings later on. I added it below.. (in case the interactive image doesn't work, you can find it <a href="">here</a> too).

<iframe id='xmindshare_embedviewer' src='http://www.xmind.net/share/_embed/magicrebirth/xmind-972121/' width='600px' height='600px' frameborder='0' scrolling='no'></iframe>

<h3>Fleshing out the model a bit more</h3>

After a few weeks of work we did a reiteration of the conceptual map above. The good news was that it soon became evident to us that we got it quite right on the first round; that is, we didn't really feel like adding or removing anything from the map. 

On the other hand, we thought we should try to add some <b>relations</b> (= links, arcs) among the concepts (=bubbles) previously identified, so to characterize their semantics a bit more. I had a go at adding some relations first, and here's the result:

<iframe id='xmindshare_embedviewer' src='http://www.xmind.net/share/_embed/magicrebirth/main-entities-relations/' width='600px' height='400px' frameborder='0' scrolling='no'></iframe>

I should specify that I have no knowledge whatsoever of the domain of sculpture, so the stuff I added to the map came out entirely from the (little) research I've been doing on the subject (on and off) during the last weeks. 

At the same time, also Will and Ben (the art historians I'm collaborating with) worked independently at the task of fleshing out the mind map with more relations. Needeless to say, what they came up with is way more dense and intricate than what I could have ever imagined! This is probably not surprising, as one would expect to see a significant difference between a non-expert's representation of a subject domain and another one which is instead created by experts. Still, it was interesting to see it happening with my own eyes!
Here it is: 

<iframe id='xmindshare_embedviewer' src='http://www.xmind.net/share/_embed/magicrebirth/the-art-of-making-structure/' width='600px' height='400px' frameborder='0' scrolling='no'></iframe>


The next step will be trying to reduce the (natural) complexity of the portion of the world we are representing to a more manageable size… then, formalize it, and start building our database based on that..  stay tuned for more! 

<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2011/11/19/towards-a-conceptual-model-for-the-domain-of-sculpture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to Lion: tips and tricks</title>
		<link>http://www.michelepasin.org/techblog/2011/10/19/upgrading-to-lion-tips-and-tricks/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=upgrading-to-lion-tips-and-tricks</link>
		<comments>http://www.michelepasin.org/techblog/2011/10/19/upgrading-to-lion-tips-and-tricks/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 14:01:18 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[justBlogging]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1643</guid>
		<description><![CDATA[I've finally decided to upgrade my mac operating system from Snow Leopard (10.6.8) to Lion (10.7.2). Not really for the new features such as Mission Control and LaunchPad (which although being pretty cool are not going to change my life) but mostly for the fact that the new OS is well integrated with iCloud. Sharing [...]]]></description>
			<content:encoded><![CDATA[I've finally decided to upgrade my mac operating system from Snow Leopard (10.6.8) to Lion (10.7.2). Not really for the <a href="http://www.apple.com/uk/macosx/whats-new/features.html">new features</a> such as Mission Control and LaunchPad (which although being pretty cool are not going to change my life) but mostly for the fact that the new OS is well integrated with <a href="http://www.apple.com/uk/icloud/">iCloud</a>. Sharing my iCal calendars, Address book contacts and other useful stuff across my apple computers and mobile devices is going to be a digital-life-changer, hopefully for the better.

Unfortunately as usual an OS upgrade is never as smooth as I would like it to be; so here's a list of the problems I ran into (and still am), with pointers to solutions whenever I found one.
<blockquote>Tip: A useful place where to get info about Lion is here: <a href="http://osxdaily.com/tag/mac-os-x-10-7/">http://osxdaily.com/tag/mac-os-x-10-7/</a></blockquote>

<h3>1. Wi-Fi disconnection issues</h3>

This is quite a bad one: my wifi connection wouldn't stay on for more than 2-3 minutes at times, making it impossible to do any continuative work online. After a lot of swearing and searching online, I found a good solution on <a href="http://www.ilounge.com/index.php/backstage/comments/os-x-lion-serious-wi-fi-disconnect-problems-for-macs-and-solutions/">this article on iLounge.com</a>. The article offers many solutions, but the one that worked for me is to manually downgrading the Atheros WiFi driver which seems to be ill on Lion to the version provided with Snow Leopard (comment 53). Here's the recipy:

<blockquote>
1. run <span style="font-family:monospace;color:#000000; ">kextstat | grep -i atheros</span>
  if a line was returned, you are most likely using Atheros WiFi card and the related kext
2. In your home folder create two directories: <span style="font-family:monospace;color:#000000; ">cd && mkdir New Old</span>
3. If you have a copy (time machine backup) or other system installed with Snow Leopard (as latest as possible), take a copy of <span style="font-family:monospace;color:#000000; ">/System/Library/Extensions/IO80211Family.kext </span>and put it into <span style="font-family:monospace;color:#000000; ">~/Old/</span> directory 
[<em>P.S. if you don't know where to get that file, I've uploaded a copy here: <a href="http://www.box.net/shared/8igl4hybcml0e4zc5dzx">IO80211Family.kext.zip</a></em>]
4. (Back on to your main system) gain root access: <span style="font-family:monospace;color:#000000; ">sudo -s</span>
5. Move: <span style="font-family:monospace;color:#000000; ">mv /System/Library/Extensions/IO80211Family.kext ~/New/</span>
6. Move cache file: <span style="font-family:monospace;color:#000000; ">mv /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache ~/New/</span>
7. copy old kext: <span style="font-family:monospace;color:#000000; ">cp -r ~/Old/IO80211Family.kext /System/Library/Extensions/</span>
8. go to: <span style="font-family:monospace;color:#000000; ">cd /System/Library/Caches/com.apple.kext.caches/Startup/</span>
9. rebuild cache: <span style="font-family:monospace;color:#000000; ">kextcache -v 1 -a i386 -a x86_64 -mkext kernelcache /System/Library/Extensions</span>
10. Using GUI Utilities->Disk Utility->Macintosh HD->Repair permissions
11. pray and reboot</blockquote>

<h3>2. Install the latest Xcode and Developer Tools</h3>

This is number 2 in the list, but really it should be number 1 if you are a software developer. The latest Xcode (4.2, get it on the <a href="http://itunes.apple.com/us/app/xcode/id448457090?mt=12">apple store</a> for free) includes all sorts of low and high level programming frameworks, from C compilers to Python interpreters. In other words, without reinstalling Xcode tons of software development environments won't run as usual!

Installing Xcode is very easy, here's a nice tip to keep in mind though (as found <a href="http://jessenoller.com/2011/07/30/quick-pythondeveloper-tips-for-osx-lion/">here</a>):   
<blockquote>When installing XCode, for some unknown unholy rea­son, if you have not quit itunes, and itunes helper (see activ­ity mon­i­tor) prior to start­ing the XCode installer, the install will hang. Do your­self a favor and kill it with fire.</blockquote>

Also, two more crucial things to keep in mind: 

<blockquote>- Remem­ber; the binary direc­tory for the dev tools is in <span style="font-family:monospace;color:#000000; ">/Developer/usr/bin/</span> — this includes gcc-4.2
- Do your­self a favor, drop “<span style="font-family:monospace;color:#000000; ">export ARCHFLAGS="-arch x86_64"</span>” into your <span style="font-family:monospace;color:#000000; ">.bash_profile</span>.</blockquote>

The last point is extremely important; make sure you do that otherwise you'll easily run into all sorts of 32 vs 64 bits architectures conflicts that (if you're like me) you have no time to get into (<a href="http://stackoverflow.com/questions/5256397/python-easy-install-fails-with-assembler-for-architecture-ppc-not-installed-on">more info here</a>).


<h3>3. Fix your Python installation</h3>

On my iMac I couldn't run <a href="http://ipython.org/">iPython</a> anymore; this was surprisingly easy to fix, I just run again <span style="font-family:monospace;color:#000000; ">easy_install ipython</span> from the command line and there you go iPython went back up (version 2.7, the default one with Lion).

This didn't work on my other mac though (a slightly older MacBook); the <span style="font-family:monospace;color:#000000; ">easy_install ipython</span> trick failed with a <span style="font-family:monospace;color:#000000; ">DistributionNotFound </span> error; if this is the case, you probably have to re-install Apple's Developer Tools (see point 2 above). 
However before doing that you might want to consider this <strong>good tip</strong> which I found <a href="">here</a>:

<blockquote>1. Make a list of all the third-party libraries you currently have installed under Python 2.6, because you’ll have to reinstall all of them for 2.7 and you won’t have the 2.6 <span style="font-family:monospace;color:#000000; ">site-packages</span> directory to refer to.
2. Update to Lion.
3. Update to Xcode 4.1. It’s free in the App Store. </blockquote>

Good, so I installed XCode 4 (= Apple's Developer Tools) but I still had a problem: for some reason the default python binary (<span style="font-family:monospace;color:#000000; ">/usr/bin/python</span>) was still pointing at the 2.5 release, instead of the 2.7 that comes with Lion. This was easily fixed by issuing this command: 
<blockquote><span style="font-family:monospace;color:#000000; ">defaults write com.apple.versioner.python Version 2.7</span></blockquote>

Two final steps are then required: 

<blockquote>a) <a href="http://pypi.python.org/pypi/setuptools#downloads">Download</a> the 2.7 version of setuptools and install it (e.g. <span style="font-family:monospace;color:#000000; ">sudo sh setuptools-0.6c11-py2.7.egg</span>); 
b) re-install iPython via setuptools: <span style="font-family:monospace;color:#000000; ">sudo easy_install ipython</span></blockquote>

Obviously I'll have to manually install under 2.7 all the libraries I used to have on 2.6, but that can be done incrementally and thanks to <span style="font-family:monospace;color:#000000; ">easy_install</span> it's also quite quick. 

For more discussions on python and Lion, check out these posts: <a href="http://jessenoller.com/2011/07/30/quick-pythondeveloper-tips-for-osx-lion/">Quick Python/Developer tips for OSX Lion</a> and <a href="http://www.leancrew.com/all-this/2011/07/python-problems-on-lion-mostly-self-inflicted/">Python problems on Lion</a>.


<h3>4. The Mercurial binaries disappeared</h3>

What the heck. You need to reinstall Mercurial using the package available here: <a href="http://mercurial.berkwood.com/">http://mercurial.berkwood.com/</a> and Python problems on Lion


<h3>5. Omnigraffle can't save files anymore</h3>

My 5.0 copy of Omnigraffle loaded and let me create stuff just fine, but it won't save files anymore. I got an error message that looked like an internal error ("class bla bla can't be subclassed by bla bla bla") each time I tried to save my work. Bugger. 

Couldn't find a solution to this; I guess that getting the latest version (5.3 I think) will solve the issue (it' 70 dollars though).


<h3>6. Java runtime missing</h3>

Lion does not provide a Java runtime by default, so you need to install it separately. No worries: that's going to happen automatically as soon as you try to run a Java application; alternatively, you can do that manually <a href="http://support.apple.com/kb/dl1421">here</a>.

<h3>7. The Finder Sidebar Icons colours (well lack of..) are depressing</h3>

Why on earth haven't they made that a preference we can change? There's a way around it though, and it is <a href="http://osxdaily.com/2011/08/25/get-color-sidebar-icons-back-in-mac-os-x-10-7-lion-finder-windows/">described here</a>. This is the gist of it:

<blockquote>
- Download and install SIMBL, which you can <a href="http://www.culater.net/software/SIMBL/SIMBL.php">get here</a>
- Download the <a href="http://cooviewerzoom.web.fc2.com/ColorfulSidebar1.0.dmg.zip">ColorfulSidebar SIMBL plugin</a> (direct link) or <a href="http://cooviewerzoom.web.fc2.com/colorfulsidebar.html">visit the developers home</a> and mount the DMG file
- Move the <span style="font-family:monospace;color:#000000; ">ColorfulSidebar.bundle</span> into the following SIMBL plugin folder: <span style="font-family:monospace;color:#000000; ">~/Library/Application Support/SIMBL/Plugins/</span>
- Either login and logout of Mac OS X, or just kill the Finder through the Terminal to relaunch it: <span style="font-family:monospace;color:#000000; ">killall Finder</span></blockquote>

Unfortunately this solution won't stick after an OS reload; but it's enough to relaunch the Finder (<span style="font-family:monospace;color:#000000; ">killall Finder</span>) to reload the plugin. 

P.S. If you can't access the <span style="font-family:monospace;color:#000000; ">~/Library</span> folder using Finder, check out point 12 below!

<h3>8. Safari Won't Reopen To HomePage</h3>
Apple <a href="https://discussions.apple.com/message/15662314#15662314">changed</a> the way new windows open. In Safari, if you set the "New windows open with" preference to "Homepage", then ALL new windows will now open with your homepage setting, including the initial startup window. In past versions, you could set that preference to "Same Page" while startup would auto open the homepage. 

Solution: go to <em>System Preferences/General/</em> and uncheck the "Restore windows when quitting and re-opening apps" option.

<h3>9. The CD-TO utility disappeared</h3>
A small utility I've been using all the time is <a href="http://code.google.com/p/cdto/">cdto</a>, a mini application that opens a Terminal.app window cd'd to the front most finder window. 

That doesn't work anymore, but the good news is that as of Mac OS X Lion 10.7, Terminal includes exactly this functionality as a Service, which you can set by going to System <span style="font-family:monospace;color:#000000; ">Preferences > Keyboard > Keyboard Shortcuts > Services</span> (check this useful <a href="http://www.tech-recipes.com/rx/16708/os-x-lion-how-to-easily-open-a-new-terminal-or-terminal-tab-at-a-folder/">blog post for more details</a>). Also, a more in-depth discussion of the various options available can be found on <a href="http://stackoverflow.com/questions/420456/open-terminal-here-in-mac-os-finder">stackOverflow</a>. 

In addition, Lion Terminal will open a new terminal window if you drag a folder (or pathname) onto the Terminal application icon, and you can also drag to the tab bar of an existing window to create a new tab.

<strong>Update</strong>: CDTO has a <a href="http://code.google.com/p/cdto/downloads/list">Lion version</a> available too. Also, another free software that offers the same functionalities is <a href="http://itunes.apple.com/us/app/go2shell/id445770608?mt=12">Go2Shell</a>.

<h3>10. Visor doesn't work anymore</h3>

Yes because Visor (a pumped-up version of the terminal application) relied on SIMBL, which is handled different on Lion. Not a problem, just download <a href="http://totalterminal.binaryage.com/">TotalTerminal</a>, which is an updated and more stable version of Visor. 

For original Visor 2.2 users: TotalTerminal plugin is not injected into Terminal.app automatically like with SIMBL. You have to launch TotalTerminal.app to inject the plugin into Terminal.app. You might want to put TotalTerminal.app into Startup Items.

<h3>11. VmwareFusion won't work</h3>

VmwareFusion is a Virtual-PC software that people use to run windows on a mac; I was using an older version of it and it looks as if this is incompatible with the 64-bit architecture of the Lion operating system. 

Solution: nothing else than getting the <a href="http://www.vmware.com/products/fusion/overview.html">latest version of VmwareFusion</a>, which currently sells for 50 dollars. Bugger.

<h3>12. Customize the Finder</h3>
Get the Library folder to show again: by default, the <span style="font-family:monospace;color:#000000; ">Library</span> folder in your home directory doesn't show in Finder. Just type this into your terminal app to fix it:
<blockquote><span style="font-family:monospace;color:#000000; ">chflags nohidden ~/Library/</span></blockquote>
Show hidden files in finder: beware though, this might result in a lot of information being displayed which is not needed.
<blockquote><span style="font-family:monospace;color:#000000; ">defaults write com.apple.finder AppleShowAllFiles -bool YES</span>
</blockquote>
Show full paths in finder: it's quite useful to know always where you are.
<blockquote><span style="font-family:monospace;color:#000000; ">defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES</span></blockquote>

.. and many more customisations are listed on <a href="http://secrets.blacktree.com/">http://secrets.blacktree.com/</a>. 

Alternatively, you can customise your mac to the bone without touching the console by downloading a free utility software called <a href="http://www.bresink.com/osx/0TinkerTool/download.php5">TinkerTool</a>.


<h3>13. Get the Old Apple Mail Back</h3>

The new Apple Mail interface is quite slick, but I still have some problems adapting to it. 

You can easily revert back to the old interface just by going to the <span style="font-family:monospace;color:#000000; ">Mail</span> menu and choose <span style="font-family:monospace;color:#000000; ">Preferences</span>. From there, click <span style="font-family:monospace;color:#000000; ">Viewing</span> and you'll find the options you want right at the top.



<h3>14. .. ? (still looking for it!)


<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2011/10/19/upgrading-to-lion-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Seminar: Tagore digital editions and Bengali textual computing</title>
		<link>http://www.michelepasin.org/techblog/2011/10/13/seminar-tagore-digital-editions-and-bengali-textual-computing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=seminar-tagore-digital-editions-and-bengali-textual-computing</link>
		<comments>http://www.michelepasin.org/techblog/2011/10/13/seminar-tagore-digital-editions-and-bengali-textual-computing/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 17:01:52 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[digitalHumanities]]></category>
		<category><![CDATA[bengali]]></category>
		<category><![CDATA[collation]]></category>
		<category><![CDATA[india]]></category>
		<category><![CDATA[tagore]]></category>
		<category><![CDATA[text-analysis]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1603</guid>
		<description><![CDATA[Professor Sukanta Chaudhuri yesterday gave a very interesting talk on the scope, methods and aims of 'Bichitra' (literally, 'the various'), the ongoing project for an online variorum edition of the complete works of Rabindranath Tagore in English and Bengali. The talk (part of this year's DDH research seminar) highlighted a number of issues I personally [...]]]></description>
			<content:encoded><![CDATA[Professor Sukanta Chaudhuri yesterday gave a very interesting talk on the scope, methods and aims of 'Bichitra' (literally, 'the various'), the ongoing project for an online variorum edition of the complete works of Rabindranath Tagore in English and Bengali. The talk (part of this year's <a href="http://www.kcl.ac.uk/artshums/depts/ddh/events/newdh/index.aspx">DDH research seminar</a>) highlighted a number of issues I personally wasn't much familiar with, so in this post I'm summarising them a bit and then highlighting a couple of possible suggestions.

<a href="http://en.wikipedia.org/wiki/Sukanta_Chaudhuri">Sukanta Chaudhuri</a> is Professor Emeritus at <a href="http://www.jadavpur.edu/">Jadavpur University</a>, Kolkata (Calcutta), where he was formerly Professor of English and Director of the <a href="http://www.jaduniv.edu.in/view_department.php?deptid=135">School of Cultural Texts and Records</a>. His core specializations are in Renaissance literature and in textual studies: he published <a href="http://www.amazon.co.uk/Metaphysics-Text-Sukanta-Chaudhuri/dp/0521197961">The Metaphysics of Text</a> from Cambridge University Press in 2010. He has also translated widely from Bengali into English, and is General Editor of the <a href="http://www.oup.co.in/category.php?cat_id=143772">Oxford Tagore Translations</a>. 

<a href="http://en.wikipedia.org/wiki/Rabindranath_Tagore">Rabindranath Tagore </a>(1861 – 1941), the first nobel laureate of Asia, was arguably the most important icon of modern Indian Renaissance. This recent project on the electronic collation of Tagore texts, called 'the Bichitra project', is being developed as part of the national commemoration of the 150th birth anniversary of the poet (here's the <a href="http://rabindranathtagore-150.gov.in/index.html">official page</a>). This is how the School of Cultural Texts and Records summarizes the project's scope:

<blockquote>The School is carrying out pioneer work in computer collation of Tagore texts and creation of electronic hypertexts incorporating all variant readings. The first software for this purpose in any Indian language, named “Pathantar” (based on the earlier version “Tafat”), has been developed by the School. Two pilot projects have been carried out using this software, for the play Bisarjan (Sacrifice) and the poetical collection Sonar Tari (The Golden Boat). The CD/DVDs contain all text files of all significant variant versions in manuscript and print, and their collation using the ”Pathantar” software. The DVD of Sonar Tari also contains image files of all the variant versions. These productions are the first output of the series “Jadavpur Electronic Tagore”.
Progressing from these early endeavours, we have now undertaken a two-year project entitled "Bichitra" for a <a href="http://rabindranathtagore-150.gov.in/online-voriourum.html">complete electronic variorum edition of all Tagores works in English and Bengali</a>. The project is funded by the Ministry of Culture, Government of India, and is being conducted in collaboration with Rabindra-Bhavana, Santiniketan. The target is to create a website which will contain (a) images of all significant variant versions, in manuscript and print, of all Tagores works; (b) text files of the same; and (c) collation of all versions applying the "Pathantar" software. To this end, the software itself is being radically redesigned. Simultaneously, manuscript and print material is being obtained and processed from Rabindra-Bhavana, downloaded from various online databases, and acquired from other sources. Work on the project commenced in March 2011 and is expected to end in March 2013, by which time the entire output will be uploaded onto a freely accessible website.</blockquote>
<p>&nbsp;</p>
<h2>A few interesting points</h2>
<br />
<li>Tagore, as Sukanta noted, "<em>wrote voluminously and revised extensively</em>". From a DH point of view this means that creating a comprehensive digital edition of his works would require <strong>a lot of effort</strong> - much more than what we could easily pay people for, if we wanted to mark up all of this text manually. For this reason it is fundamental to find some type of <strong>semi-automatic methods for aligning and collating</strong> Tagore's texts, e.g. the ”Pathantar” software. Follows a screenshot of the current collation interface.
<br />
<a href="http://www.flickr.com/photos/mikele/6241316162/" title="Tagore digital editions by MagIcReBirth, on Flickr"><img src="http://farm7.static.flickr.com/6180/6241316162_5d5920dab8_z.jpg" width="640" height="303" alt="Tagore digital editions"></a>
</li>
<li>The<a href="http://en.wikipedia.org/wiki/Bengali_language"> Bengali language</a>, which is used by Tagore, is widely spoken in the world (it is actually one of the most spoken languages, with nearly 300 million total speakers). However this language poses <strong>serious problems for a DH project</strong>. In particular, the <a href="http://en.wikipedia.org/wiki/Bengali_script">writing system</a> is extremely difficult to parse using traditional OCR technologies: its vowel graphemes are mainly realized not as independent letters but as diacritics attached to its consonant letters. Furthermore clusters of consonants are represented by different and sometimes quite irregular forms, thus learning to read is complicated by the sheer size of the full set of letters and letter combinations, numbering about 350 (from <a href="http://en.wikipedia.org/wiki/Bengali_script">wikipedia</a>).</li>
<li>One of the critical points that emerged during the discussion had to do with the <strong>visual presentation of the results of the collation</strong> software. Given the large volume of text editions they're dealing with, and the potential vast amount of variations between one edition and the others, a powerful and interactive visualization mechanism seems to be <strong>strongly needed</strong>. However it's not clear what are the possible approaches on this front.. </li>
<li><strong>Textual computing</strong>, Sukanta pointed out, is <strong>not as developed in India</strong> as it is in the rest of the world. As a consequence, in the context of the "Bichitra" project widely used approaches based on TEI and XML technologies haven't really been investigated enough. The collation software mentioned above obviously marks up the text in some way; however this markup remains hidden to the user and much likely it is not compatible with other standards. More work would thus be desirable in this area - in particular within the Indian continent.</li>


<h2>Food for thought</h2>
<br />
<li><strong>On the visualization of the results of a collation</strong>. Some inspiration could be found in the type of visualizations normally used in <a href="http://en.wikipedia.org/wiki/Revision_control">version control software systems</a>, where multiple and alternative versions of the same file must be tracked and shown to users. For example, we could think of the visualizations available on GitHub (a popular code-sharing site), which are described on this <a href="https://github.com/blog/39-say-hello-to-the-network-graph-visualizer">blog post</a> and demonstrated via an interactive tool on <a href="https://github.com/sr/git-wiki/network">this webpage</a>. Here's a screenshot: 

<a href="http://www.flickr.com/photos/mikele/6240800007/" title="Github code visualization by MagIcReBirth, on Flickr"><img src="http://farm7.static.flickr.com/6091/6240800007_c2ed6467bb.jpg" width="500" height="496" alt="Github code visualization"></a>

The <a href="http://betterexplained.com/articles/a-visual-guide-to-version-control/">situation</a> is striking similar - or not? Would it be feasible to reuse one of these approaches with textual sources? 
Another relevant visualization is the one used by popular file-comparison softwares (eg File Merge on a Mac) for showing differences between two files:

<a href="http://www.flickr.com/photos/mikele/6241316238/" title="File Merge code visualization by MagIcReBirth, on Flickr"><img src="http://farm7.static.flickr.com/6056/6241316238_b2889f8c5a_z.jpg" width="640" height="360" alt="File Merge code visualization"></a>
</li>

<li><strong>On using language technologies with Bengali</strong>. I did a quick tour of what's available online, and (quite unsurprisingly, considering the reputation Indian computer scientists have) found several research papers which seem highly relevant. Here's a few of them:

- <em>Asian language processing: current state-of-the-art</em> [<a href="http://www.hlt.utdallas.edu/~vince/papers/lre06-intro.pdf">text</a>]
- <em>Research report on Bengali NLP engine for TTS</em> [<a href="http://dspace.bracu.ac.bd/handle/10361/647">text</a>]
- The <em>Emile corpus</em>, containing fourteen monolingual corpora, including both written and (for some languages) spoken data for fourteen South Asian languages [<a href="http://www.lancs.ac.uk/fass/projects/corpus/emille/">homepage</a>]
- <em>A complete OCR system for continuous Bengali characters</em> [<a href="http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1273141&tag=1">text</a>]
- <em>Parsing Bengali for Database Interface</em> [<a href="http://research.banglacomputing.net/iccit/ICCIT_pdf/5th%20ICCIT-2002_p277-p282.pdf">text</a>]
- <em>Unsupervised Morphological Parsing of Bengali</em> [<a href="http://www.hlt.utdallas.edu/~vince/papers/lre06.html">text</a>]


<li><strong>On open-source softwares that appear to be usable with Bengali text</strong>. Not a lot of stuff, but more than enough to get started (the second project in particular seems pretty serious):

- <a href="http://open-bangla-ocr.sourceforge.net/">Open Bangla OCR</a> - A BDOSDN (Bangladesh Open Source Development Network) project to develop a Bangla OCR
- <a href="http://code.google.com/p/banglaocr/">Bangla OCR project</a>, mainly focused on the research and development of an Optical Character Recognizer for Bangla / Bengali script</li>

<p>&nbsp;</p>
Any comments and/or ideas?
<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2011/10/13/seminar-tagore-digital-editions-and-bengali-textual-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django B_project available on gitHub</title>
		<link>http://www.michelepasin.org/techblog/2011/10/12/django-b_project-available-on-github/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=django-b_project-available-on-github</link>
		<comments>http://www.michelepasin.org/techblog/2011/10/12/django-b_project-available-on-github/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 09:34:00 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.michelepasin.org/techblog/?p=1593</guid>
		<description><![CDATA[I've put together and shared on gitHub all the files needed to get started with a Django project - essentially this is a clean file structure usable to get going with a Django project nice and easy. The idea is that after downloading this, you just have to change a couple of names (see the [...]]]></description>
			<content:encoded><![CDATA[I've put together and shared on gitHub all the files needed to get started with a <a href="https://www.djangoproject.com/">Django</a> project - essentially this is a clean file structure usable to get going with a Django project nice and easy. The idea is that after downloading this, you just have to change a couple of names (see the <a href="https://github.com/magicrebirth/b_project/tree/master/_help">README</a> file for more details) and there you go you have a complete Django project ready to be ran and customized. 

The code is here: <a href="https://github.com/magicrebirth/b_project">https://github.com/magicrebirth/b_project</a>. Feel free to download or fork it as you like!

Currently the B_project is set up to work with Django 1.3 and it has a few 'batteries' included (= commonly used apps): 
<li><a href="https://github.com/django-mptt/django-mptt/">MPTT</a>: Utilities for implementing a modified pre-order traversal tree in django</li>
<li><a href="https://bitbucket.org/ubernostrum/django-registration/">REGISTRATION</a>: A user-registration application for Django. </li>
<li><a href="https://github.com/django-extensions/django-extensions">DJANGO EXTENSIONS</a>: global custom management extensions for the Django Framework.</li>
<li><a href="http://pypi.python.org/pypi/django-picklefield">PICKLEFIELD</a>:  an implementation of a pickled object field.</li>

<a href="http://www.flickr.com/photos/mikele/6237287046/" title="Django B_project structure by MagIcReBirth, on Flickr"><img src="http://farm7.static.flickr.com/6218/6237287046_5774ef8ea7_z.jpg" width="571" height="640" alt="Django B_project structure"></a><br />


The other things included in the framework are:
<li>a <em>settings.py</em> file that calls localized settings specifications depending on parameters (eg dev server or live one)</li>
<li>a bunch of generic python utilities</li>
<li>a few 'enhanced' model classes</li>
<li>all that is needed for working with trees in the admin (as discussed here: <a href="http://www.michelepasin.org/techblog/2009/08/18/django-admin-and-mptt-2/">Django admin and MPTT</a>)</li>
<li>a javascript autocomplete framework, integrated in the admin (as discussed here: <a href="http://www.michelepasin.org/techblog/2009/10/12/autocomplete-in-django-2/">Autocomplete in Django</a>)</li>
<li>some basic templates and templatetags</li>

Enjoy!

<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.michelepasin.org/techblog/2011/10/12/django-b_project-available-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

