<?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>Jamie's Weblog &#187; Python</title>
	<atom:link href="http://jamie.ideasasylum.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamie.ideasasylum.com</link>
	<description>Jamie's thoughts, ideas, musings and utter drivel.  Procrastination with a purpose!</description>
	<lastBuildDate>Sat, 28 Jan 2012 23:35:26 +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>PhotoPlanet.py</title>
		<link>http://jamie.ideasasylum.com/2006/08/photoplanet/</link>
		<comments>http://jamie.ideasasylum.com/2006/08/photoplanet/#comments</comments>
		<pubDate>Fri, 04 Aug 2006 17:44:00 +0000</pubDate>
		<dc:creator>Jamie Lawrence</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.jamie.ideasasylum.com/testblog/2006/08/photoplanet/</guid>
		<description><![CDATA[h1. PhotoPlanet.py README Jamie Lawrence, 4th August, 2006 *This is a small script to &#8220;locate&#8221; your photos in &#8220;Google Earth&#8221;:http://earth.google.com/. It takes a GPS tracklog and a collection of photos, and generated a KML or KMZ file that allows Google Earth to pin thumbnails of your photos at the location where they were taken* !http://jamie.ideasasylum.com/notebook/images/35.jpg! [...]]]></description>
			<content:encoded><![CDATA[<p>h1. PhotoPlanet.py README</p>
<p>Jamie Lawrence, 4th August, 2006</p>
<p>*This is a small script to &#8220;locate&#8221; your photos in &#8220;Google Earth&#8221;:http://earth.google.com/.  It takes a GPS tracklog and a collection of photos, and generated a KML or KMZ file that allows Google Earth to pin thumbnails of your photos at the location where they were taken*</p>
<p>!http://jamie.ideasasylum.com/notebook/images/35.jpg!</p>
<p><span id="more-889"></span>h2. Requirements</p>
<p>* Python 2.4 (tested on &#8220;ActiveState Python 2.4 for Windows&#8221;:http://www.activestate.com/Products/ActivePython/)<br />
* Google Earth (v3 works fine, v4 should also work)<br />
* &#8220;EasyGPS&#8221;:http://www.topografix.com/ (for generating .gpx files).  Free.<br />
* A GPS device (most work with EasyGPS, I used a Garmin 60C)</p>
<p>h2. Installation</p>
<p>Unzip this directory to any location.  Done.</p>
<p>h2. Operation</p>
<p>* Make sure that your camera and GPS device are synchronised to exactly the same time<br />
* Make sure that your GPS device is recording a track log whilst you are taking photos<br />
* Load the tracklog into EasyGPS and save it as a GPX file<br />
* From a command prompt, call PhotoPlanet as:</p>
<p><code>python PhotoPlanet.py -g &lt;.gpx file&gt; -p &lt;photo dir&gt; -o &lt;output file&gt; -z</code></p>
<p>e.g.<br />
<code>python PhotoPlanet.py -g test2.gpx -p "E:\Documents and Settings\Jamie\Desktop\Test\test2" -o test2.kmz -z</code><br />
* Omit the -z switch if you just want a KML file (which link to the photos on your hard drive).<br />
* Open the generated KML/KMZ file in Google Earth and your photos will be added<br />
* An example .kmz file is included so you can see what the output is like</p>
<p>h2. Notes</p>
<p>* This script makes use of, and includes, the excellent &#8220;EXIF.py&#8221;:http://home.cfl.rr.com/genecash/digital_camera/EXIF.py.  I didn&#8217;t write it.<br />
* The script does NOT write to the photos, so it should be quite safe<br />
* Having said that, I&#8217;m not responsible if it doesn&#8217;t work or breaks something</p>
<p>h2. Code</p>
<p>The code is reproduced below for information purposes only.  You should download &#8220;the full archive&#8221;:http://jamie.ideasasylum.com/notebook/file_download/7 which includes all the necessary files, a README (mostly this document), and &#8220;example .KMZ file&#8221;:http://jamie.ideasasylum.com/notebook/file_download/8.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamie.ideasasylum.com/2006/08/photoplanet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Trimming MoinMoin</title>
		<link>http://jamie.ideasasylum.com/2005/07/trimming-moinmoin/</link>
		<comments>http://jamie.ideasasylum.com/2005/07/trimming-moinmoin/#comments</comments>
		<pubDate>Wed, 13 Jul 2005 12:49:00 +0000</pubDate>
		<dc:creator>Jamie Lawrence</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.jamie.ideasasylum.com/testblog/2005/07/trimming-moinmoin/</guid>
		<description><![CDATA[A small script to remove the extra language files from MoinMoin (probably now out-of-date) I use &#8220;MoinMoin&#8221;:http://moinmoin.wikiwikiweb.de as a personal notebook but I&#8217;ve found that it&#8217;s a little hard to manage the backups/merges when it comes with some many default pages. Upon investigation I&#8217;ve discovered that most of these redundant pages are not even in [...]]]></description>
			<content:encoded><![CDATA[<p>A small script to remove the extra language files from MoinMoin (probably now out-of-date)<br />
<span id="more-885"></span>I use &#8220;MoinMoin&#8221;:http://moinmoin.wikiwikiweb.de as a personal notebook but I&#8217;ve found that it&#8217;s a little hard to manage the backups/merges when it comes with some many default pages.  Upon investigation I&#8217;ve discovered that most of these redundant pages are not even in English.  Since I&#8217;m the only person using the wiki, and my human-language capabilities are limited to English, I thought I&#8217;d delete the spare, foreign language, pages.  Of course, since I&#8217;m a programmer, I&#8217;d rather let the computer do this tedious task for me!</p>
<p>Here&#8217;s a python script that iterates through a MoinMoin directory (e.g. c:\\Moin\\notebook\\data\\pages), then reads the current version for each page directory, loads the current revision of that page, checks for &#8220;#language XX&#8221;, and if XX != en (i.e., this is not an English page), it deletes the whole page directory.  This is a *very* dangerous script to use.  *Always backup first!*  There are no command-line options, so you have to hand-edit the paths but, hopefully, this means that you will also read the script, understand what it&#8217;s doing, and then you won&#8217;t blame me when it deletes everything on your PC!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamie.ideasasylum.com/2005/07/trimming-moinmoin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using a Wiki as a Research Notebook</title>
		<link>http://jamie.ideasasylum.com/2005/03/using-a-wiki-as-a-research-notebook/</link>
		<comments>http://jamie.ideasasylum.com/2005/03/using-a-wiki-as-a-research-notebook/#comments</comments>
		<pubDate>Fri, 04 Mar 2005 15:47:00 +0000</pubDate>
		<dc:creator>Jamie Lawrence</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.jamie.ideasasylum.com/testblog/2005/03/using-a-wiki-as-a-research-notebook/</guid>
		<description><![CDATA[Using MoinMoin to keep track of research notes and references as part of my PhD. h2. Introduction I started a PhD in January 2005 and needed a way to keep track of all my notes, the papers I&#8217;d read, the quotes I&#8217;d like to remember etc. Initially, I spend (far too long) writing a Java [...]]]></description>
			<content:encoded><![CDATA[<p>Using MoinMoin to keep track of research notes and references as part of my PhD.</p>
<p><span id="more-883"></span>h2. Introduction</p>
<p>I started a PhD in January 2005 and needed a way to keep track of all my notes, the papers I&#8217;d read, the quotes I&#8217;d like to remember etc.  Initially, I spend (far too long) writing a Java outliner to keep track of my thoughts.  This quickly snowballed into a complicated project but wasn&#8217;t giving me what I wanted, so I abandoned it.  Next, I thought an existing framework would help me to concentrate on the real issues &#8211; I tried using &#8220;NetBeans&#8221;:http://www.netbeans.org as a base but it was, again, far too complicated for a quick project.  Recently, I&#8217;ve been using a &#8220;moleskine notebook&#8221;:http://www.moleskine.com (and nothing is ever going to make me stop using it) but this isn&#8217;t particularly searchable etc.  So, I&#8217;ve been looking for a reasonably easy Wiki I could use on my laptop, work PC and this website.  I chose MoinMoin but others may also be suitable.</p>
<p>MoinMoin is written in Python, which I am discovering makes it ideal for a little hacking.  Until last week, I&#8217;d never written any Python scripts but then I started playing around with Python and the Amazon API.  This gave me enough confidence to write two macros for MoinMoin.</p>
<p>h2. Installation</p>
<p>Download the two macros &#8220;BibKeys.txt&#8221;:/research/BibKeys.txt and &#8220;BibEntry.txt&#8221;:/research/BibEntry.txt and their dependant libraries (described at the end of this page).  Install the libraries using their instructions.  Copy the macros to your MoinMoin macros directory and change the extension from .txt to .py.  Both of the macros need to know the location of your BibTeX file so open them up and edit the following line to reflect your configuration:<br />
<code><br />
file = 'c:/Documents and Settings/jel03r/Desktop/PhD/reports/9mth Report/bibtex/references.bib'</code></p>
<p>h3. BibKeys.py</p>
<p>The first macro, BibKeys, creates a list of WikiNames from the keys in a BibTeX file.  Insert this macro into your page like this<br />
<code><br />
[[BibKeys]]<br />
</code></p>
<p>and you&#8217;ll get a list of the bibtex keys in your file.  You can now go and write comments/quotes etc about each paper</p>
<p>[[BibKeys]]</p>
<p>h3. BibEntry.py</p>
<p>This macro, BibEntry inserts the BibTeX entry into the page like such:<br />
<code><br />
[[BibEntry(Lawrence2004a)]]<br />
[[BibEntry]]<br />
</code></p>
<p>The first line will insert the bibtex entry for the key &#8220;Lawrence2004a&#8221;:<br />
<code>@ARTICLE{Lawrence2004a,<br />
author  = {Jamie Lawrence and Terry Payne},<br />
title   = {Making use of Insignificant Interactions},<br />
journal = {Equator All-hands Meeting},<br />
year    = {2004},<br />
month   = {February},<br />
owner   = {jamie},<br />
pdf     = {Lawrence2004a.pdf},<br />
}</code></p>
<p>The second line is useful if you create pages from a BibKeys macro: It inserts the bibtex entry using the current pagename as the key.  So, if the current page is called &#8220;Lawrence2004a&#8221; then is will have the same output as [[BibEntry(Lawrence2004a)]]</p>
<p>h2. Dependancies</p>
<p>These macros depend on &#8220;bibstuff&#8221;:http://www.pricklysoft.org/software/bibstuff.html, &#8220;seqdict&#8221;:http://home.germany.net/100-366919/Python/Modules/Modules.html, &#8220;Simple Parser&#8221;:http://simpleparse.sourceforge.net/ and &#8220;mxTextTools&#8221;:http://www.egenix.com/files/python/mxTextTools.html.  These must be installed first.  I&#8217;ve tested this on Apache/Apache2, Python 2.2/2.3 and MoinMoin 1.2.2/1.3.3, on both Linux and Windows.</p>
<p>Contact me via this website if you want more details, or leave a comment below</p>
]]></content:encoded>
			<wfw:commentRss>http://jamie.ideasasylum.com/2005/03/using-a-wiki-as-a-research-notebook/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

