<?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>anilmakhijani.com</title>
	<atom:link href="http://anilmakhijani.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://anilmakhijani.com</link>
	<description></description>
	<lastBuildDate>Tue, 07 Jul 2009 02:01:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Planet Wordpress Plugin Released</title>
		<link>http://anilmakhijani.com/2009/07/07/planet-wordpress-plugin-released/</link>
		<comments>http://anilmakhijani.com/2009/07/07/planet-wordpress-plugin-released/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 02:01:38 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Wordpress Development]]></category>
		<category><![CDATA[Planet]]></category>
		<category><![CDATA[planetdev]]></category>
		<category><![CDATA[Streetsblog.NET]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=279</guid>
		<description><![CDATA[I love the Planet feed aggregator, but I hate managing it via a text configuration file.  I created a Wordpress plugin that automatically creates a Planet configuration file from the links that are stored in a Wordpress database.  Every time a link is updated, deleted, or created, a new planet configuration is generated.
For [...]]]></description>
			<content:encoded><![CDATA[<p>I love the <a href="http://planetplanet.org">Planet</a> feed aggregator, but I hate managing it via a text configuration file.  I created a Wordpress plugin that automatically creates a Planet configuration file from the links that are stored in a Wordpress database.  Every time a link is updated, deleted, or created, a new planet configuration is generated.</p>
<p>For more information on how to install and configure the plugin, visit the <a href="http://anilmakhijani.com/wordpress-dev/planet-wordpress/">plugin&#8217;s homepage</a>.  The source code for the plugin is hosted at <a href="http://wordpress.org/extend/plugins/planet-wordpress/">wordpress.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2009/07/07/planet-wordpress-plugin-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DataIO</title>
		<link>http://anilmakhijani.com/2009/04/12/dataio/</link>
		<comments>http://anilmakhijani.com/2009/04/12/dataio/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 19:26:18 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[DataIO]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[lxml]]></category>
		<category><![CDATA[MTA]]></category>
		<category><![CDATA[planetdev]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=244</guid>
		<description><![CDATA[A few weeks ago my employer helped the NY State Senate parse the MTA budget information into a machine searchable format.  (The MTA originally published the budget as a PDF.)  To parse the PDF I used a utility called pdftohtml to first convert the PDL into an XML document.  I then used [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago <a href="http://theopenplanningproject.org">my employer</a> helped the NY State Senate parse the MTA budget information into a machine searchable format.  (The MTA originally published the budget as a PDF.)  To parse the PDF I used a utility called <a href="http://pdftohtml.sourceforge.net/">pdftohtml</a> to first convert the PDL into an XML document.  I then used the python library <a href="http://codespeak.net/lxml/">lxml</a> to convert the document into a set of csv files.  The results of this labor can be seen on <a href="http://data.topplabs.org"> TOPP&#8217;s data site</a>.</p>
<p>Soon after I published this data, however, I was told by a number of people that the data would be more useful if presented in another format.  At first I just started creating a bunch of command line python scripts that would suck in these csv files, and spit them out in different formats.  I quickly realized that I could accumulate these scripts and create a quick and dirty web application.</p>
<p>Over a few train rides I created an application called <a href="http://www.dataio.org">DataIO</a>, and today, I finally got a chance to upload it to Google App Engine.  The application is pretty simple to interact with; instructions are located on its <a href="http://www.dataio.org">front page</a>.</p>
<p><span id="more-244"></span></p>
<p>Currently the application can only transpose data and multiply the data set by a given factor.  I hope to soon add a jsonp api that will make it trivial to convert a given data set into a format that plays nice with <a href="http://code.google.com/apis/chart/">google charts</a> and <a href="http://code.google.com/p/flot/">flot</a>.</p>
<p>The code for this application is hosted at <a href="http://bitbucket.org/anil/dataio/">bitbucket</a>.</p>
<p>Just for fun, here is some data from data.topplabs.org, sent through dataIO.</p>
<p><strong>Operating Revenue (transposed and multiplied by 1000000):</strong></p>
<p>http://www.dataio.org/data/f?transpose=true&#038;multiplication_factor=1000000&#038;multiplication_start_row=1</p>
<p><strong>Total Receipts by Agency (transposed and returned in json):</strong></p>
<p>http://www.dataio.org/data/Bt?format=json&#038;transpose=true</p>
<p><strong>Bridges and Tunnels Summary of Total Budgeted Debt Service (multiplied by 100 and returned in csv):</strong></p>
<p>http://www.dataio.org/data/IM?multiplication_factor=100&#038;multiplication_start_row=1&#038;format=csv</p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2009/04/12/dataio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiling a Flowplayer Plugin on Mac OS X</title>
		<link>http://anilmakhijani.com/2009/01/09/compiling-a-flowplayer-plugin-on-mac-os-x/</link>
		<comments>http://anilmakhijani.com/2009/01/09/compiling-a-flowplayer-plugin-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 20:40:14 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Flow Player]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[FlowPlayer]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[planetdev]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=186</guid>
		<description><![CDATA[For some reason it took me a while to figure out how to compile a flash plugin for Flowplayer.  Here were the steps that I took to finally get it working:


Install Ant.  Instructions for this can be found  here
Download Adobe Flex 3 SDK.  You can download this here.
Unzip the Flex 3 [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason it took me a while to figure out how to compile a flash plugin for Flowplayer.  Here were the steps that I took to finally get it working:<br />
<span id="more-186"></span></p>
<ol>
<li>Install Ant.  Instructions for this can be found  <a href="http://www.asceticmonk.com/blog/?p=388">here</a></li>
<li>Download Adobe Flex 3 SDK.  You can download this <a href="http://www.adobe.com/products/flex/flexdownloads/#sdk">here.</a></li>
<li>Unzip the Flex 3 SDK that you just downloaded.
<pre>
% unzip flex_sdk_3.zip
</pre>
</li>
<li> Download the Flowplayer development kit.  The latest version of the development kit can be found <a href="http://flowplayer.org/plugins/flash/writing.html">here.</a></li>
<li> Unzip the Flowplayer development kit.
<pre>% upzip flowplayer.devkit-3.0.3.zip</pre>
</li>
<li> Edit the plugin-build.properties file in the Flowplayer development kit.  Specifically edit the line that says:</li>
<pre>flex3dir=/Users/api/flex3sdk</pre>
<p>to point to the location to which you unzipped the Flex 3 SDK.  After editing my file looks like this:</p>
<pre>flex3dir=/Users/anil/Desktop/flex_sdk_3</pre>
<li> Navigate to the example plugin that is contained within the Flowplayer development kit.  For me this is located here:
<pre>/Users/anil/Desktop/flowplayer.devkit/example</pre>
</li>
<li> Finally, type:
<pre>% ant</pre>
<p>The output should look like this:</p>
<pre>
Buildfile: build.xml

build:
     [echo] ++ flowplayer.helloworld.swf +++
     [echo]
     [echo] checking if flowplayer.helloworld.swf is uptodate
     [echo] main up-to-date: ${uptodate.main}

prepare:
    [unzip] Expanding: /Users/anil/env/flowplayer.devkit/flowplayer.swc into
    /Users/anil/env/flowplayer.devkit/example/build

check-compile-dirs:

check-compile-dirs2:

compile:
     [exec] Loading configuration file
           /Users/anil/Desktop/flex_sdk_3/frameworks/flex-config.xml
     [exec] /Users/anil/env/flowplayer.devkit/example/build
/flowplayer.helloworld.swf (1304 bytes)
     [copy] Copying 1 file to /Users/anil/env/flowplayer.devkit/example/build

BUILD SUCCESSFUL
Total time: 3 seconds
</pre>
</li>
</ol>
<p>Congratulations! You have compiled a flash plugin for Flowplayer!</p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2009/01/09/compiling-a-flowplayer-plugin-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Geo Blogroll Plugin Released</title>
		<link>http://anilmakhijani.com/2009/01/07/geo-blogroll-plugin-released/</link>
		<comments>http://anilmakhijani.com/2009/01/07/geo-blogroll-plugin-released/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 22:18:22 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Wordpress Development]]></category>
		<category><![CDATA[planetdev]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=170</guid>
		<description><![CDATA[I had promised to clean up and release some of the plugins that went into creating Streetsblog.net.  Here is the first one: Geo Blogroll.
]]></description>
			<content:encoded><![CDATA[<p>I had <a href="http://anilmakhijani.com/2008/12/03/streetsblognet-launch/">promised</a> to clean up and release some of the plugins that went into creating <a href="http://streetsblog.net">Streetsblog.net</a>.  Here is the first one: <a href="http://anilmakhijani.com/wordpress-dev/geo-blogroll/">Geo Blogroll</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2009/01/07/geo-blogroll-plugin-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Years Resolutions</title>
		<link>http://anilmakhijani.com/2009/01/02/new-years-resolutions/</link>
		<comments>http://anilmakhijani.com/2009/01/02/new-years-resolutions/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 16:58:16 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Resolutions]]></category>
		<category><![CDATA[lifehacker]]></category>
		<category><![CDATA[new years]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[planetdev]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=145</guid>
		<description><![CDATA[Inspired by a friend I am going to create list of new years resolutions:

Learn a functional programming language.  Any suggestions on which one to try out first?
Make fewer mockups and write more code. Web frameworks these days allow for such quick development that I think I would be more productive if I just skipped [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by <a href="http://blog.kortina.net/post/67446360/2009-resolutions-for-the-new-year">a friend</a> I am going to create list of new years resolutions:</p>
<ul>
<li><strong>Learn a functional programming language.</strong>  Any suggestions on which one to try out first?</li>
<li><strong>Make fewer mockups and write more code.</strong> Web frameworks these days allow for such quick development that I think I would be more productive if I just skipped the Omnigraffle/Photoshop step.</li>
<li><strong>Learn how to engage in effective Test Driven Development.</strong> I have heard of the benefits, but I have never seen a good tutorial on how to do this effectively.  Maybe I just need to look a bit harder.</li>
<li><strong>Don&#8217;t think about work while I am playing and don&#8217;t think about playing when I am working.</strong> Focus is always good.  I am sure at least <a href="http://twitter.com/bhumiz">one person</a> will be happy with this resolution.</li>
<li><strong>Make a daily to do list with no more than three items.</strong> This was suggested by some <a href="http://lifehacker.com">lifehacker</a> post and it seems like a great idea.
<li><strong>Recycle more at home.</strong>  I recycle consistently at work because we have containers for different type of containers, but since I do not at home, I get lazy more often.</li>
<li><strong>Contribute more back to the open source community.</strong> I have written a bunch of code recently that I haven&#8217;t yet checked in to a public repository.  I have to make contributing back a higher priority.</li>
<ul>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2009/01/02/new-years-resolutions/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Exporting Posts from Wordpress 2.5</title>
		<link>http://anilmakhijani.com/2008/12/30/exporting-posts-from-wordpress-25/</link>
		<comments>http://anilmakhijani.com/2008/12/30/exporting-posts-from-wordpress-25/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 21:06:59 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Wordpress Development]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=141</guid>
		<description><![CDATA[Recently I tried exporting some posts from one Wordpress 2.5 blog to another Wordpress 2.5 blog.  The import worked perfectly, but then I realized that I had forgotten to import one of the posts.  Rather than doing to the whole import again, I decided to just import the post that I had forgotten. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I tried exporting some posts from one Wordpress 2.5 blog to another Wordpress 2.5 blog.  The import worked perfectly, but then I realized that I had forgotten to import one of the posts.  Rather than doing to the whole import again, I decided to just import the post that I had forgotten.  Unfortunately, Wordpress brought over all of my categories again, leaving me with duplicates of all of my categories.  Ugg.</p>
<p>I wrote a small python script that takes a wordpress export file and strips out information about categories and tags.  It&#8217;s a pretty simple script, but I will share it anyway: <a href="http://demos.anilmakhijani.com/scripts/rm_cats_wp_export.py">script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2008/12/30/exporting-posts-from-wordpress-25/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streetsblog.NET Launch</title>
		<link>http://anilmakhijani.com/2008/12/03/streetsblognet-launch/</link>
		<comments>http://anilmakhijani.com/2008/12/03/streetsblognet-launch/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 19:29:25 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Steetsblog.NET]]></category>
		<category><![CDATA[Wordpress Development]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Streetsblog.NET]]></category>
		<category><![CDATA[TOPP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=120</guid>
		<description><![CDATA[A few coworkers and I launched Streetsblog.NET yesterday.  The website is actually a vanilla install of Wordpress working in conjunction with a vanilla install of Planet with a bunch of custom Wordpress plugins.  I will release the plugins when I get some time to clean them up.
]]></description>
			<content:encoded><![CDATA[<p>A few coworkers and I launched <a href="http://streetsblog.net">Streetsblog.NET</a> yesterday.  The website is actually a vanilla install of <a href="http://wordpress.org">Wordpress</a> working in conjunction with a vanilla install of <a href="http://www.planetplanet.org/">Planet</a> with a bunch of custom Wordpress plugins.  I will release the plugins when I get some time to clean them up.</p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2008/12/03/streetsblognet-launch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick Introduction to Flow Player</title>
		<link>http://anilmakhijani.com/2008/11/28/quick-introduction-to-flow-player/</link>
		<comments>http://anilmakhijani.com/2008/11/28/quick-introduction-to-flow-player/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 19:10:58 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Flow Player]]></category>
		<category><![CDATA[FlowPlayer]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=105</guid>
		<description><![CDATA[At TOPP we have been considering switching Streetfilms over to using FlowPlayer.  There are number of advantages to using FlowPlayer:

It is released under a GPL3 license.
It has a neat new jQuery interface.

As I learn more about the advanced features of FlowPlayer I will blog about them, but here is a quick introduction.

If you create [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://topp.openplans.org">TOPP</a> we have been considering switching <a href="http://www.streetfilms.org">Streetfilms</a> over to using <a href="http://www.flowplayer.org">FlowPlayer</a>.  There are number of advantages to using FlowPlayer:</p>
<ol>
<li>It is released under a GPL3 license.</li>
<li>It has a neat new jQuery interface.</li>
</ol>
<p>As I learn more about the advanced features of FlowPlayer I will blog about them, but here is a quick introduction.</p>
<p><span id="more-105"></span></p>
<p>If you create a page with markup like this one (see this in action <a title="Demo 1" href="http://demos.anilmakhijani.com/flow_demo/index.html.2" target="_blank">here</a>):</p>
<pre>&lt;html&gt;
  &lt;body&gt;
    &lt;h2&gt;Anil Tube&lt;/h2&gt;
    &lt;div class="player"&gt;
       &lt;a href="http://www.streetfilms.org/wp-content/uploads/2008/01/chicanefinal16x9.flv"&gt;
            &lt;img src="chicaneposter.jpg" /&gt;
       &lt;/a&gt;
    &lt;/div&gt;
    &lt;br&gt;&lt;br&gt;
    &lt;div class="player"&gt;
      &lt;a href="http://www.streetfilms.org/wp-content/uploads/2008/11/jan-gehl-with-aaron_768k.flv"&gt;
          &lt;img src="gehl-and-aaron-poster1.jpg" /&gt;
      &lt;/a&gt;
    &lt;/div&gt;

  &lt;/body&gt;
&lt;/html&gt;</pre>
<p>
You can make these FLV files playable with the following code (see this in action <a href="http://demos.anilmakhijani.com/flow_demo/index.html.3">here</a>):
</p>
<pre>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="http://anilmakhijani.com/flow_test/jquery-1.2.6.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="http://anilmakhijani.com/flow_test/flowplayer-3.0.0.min.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
        $(document).ready( function () {
           $("div.player").each( function () {
                        var link = $(this).find("a");
                        var flv_file = link.attr("href");
                        var img_file = link.find("img").attr("src");
                        $(this).empty().flowplayer({src: "flowplayer-3.0.0.swf", width:560,
                                                                height:459}, {
                                playlist: [
                                    {
                                        url: img_file,
                                        scaling: 'fit'
                                    },
                                    {
                                        url : flv_file,
                                        autoPlay: false,
                                        scaling: 'fit'
                                    }
                                ]
                            });  //end the flowplayer command
                }); //ends the div.player.each

         }); //end the jquery document.ready
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h2&gt;Anil Tube&lt;/h2&gt;
    &lt;div class="player"&gt;
       &lt;a href="http://www.streetfilms.org/wp-content/uploads/2008/01/chicanefinal16x9.flv"&gt;
           &lt;img src="chicaneposter.jpg" /&gt;
       &lt;/a&gt;
    &lt;/div&gt;
    &lt;br&gt;&lt;br&gt;
    &lt;div class="player"&gt;
      &lt;a href="http://www.streetfilms.org/wp-content/uploads/2008/11/jan-gehl-with-aaron_768k.flv"&gt;
         &lt;img src="gehl-and-aaron-poster1.jpg" /&gt;
      &lt;/a&gt;
    &lt;/div&gt;                                                                                                                   

  &lt;/body&gt;
&lt;/html&gt;</pre>
<p>I think that the code is pretty self explanatory.   I am using straight jQuery to get the source of the image and FLV file.  I am then plugging these values into the FlowPlayer javascript API.  Flow Player doesn&#8217;t have the concept of a poster frame for a video, so instead I create a play list where the image is the first item in the play list and the FLV file is the second.</p>
<p>To get this to work you obviously need to download the <a href="http://docs.jquery.com/Downloading_jQuery">jQuery</a>, <a href="http://flowplayer.org/documentation/api.html">FlowPlayer javascript file</a> and the actual <a href="http://flowplayer.org/download/index.html">player itself.</a></p>
<p><em><strong>Update:</strong></p>
<p>I realised that the above code does not work in Internet Explorer 7.  IE7 is apparently more strict in enforcing that the Javascript Objects have the correct syntax.  I had extra comma&#8217;s in the &#8220;Playlist&#8221; array that I have now removed.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2008/11/28/quick-introduction-to-flow-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.streetfilms.org/wp-content/uploads/2008/01/chicanefinal16x9.flv" length="3144740" type="video/x-flv" />
<enclosure url="http://www.streetfilms.org/wp-content/uploads/2008/11/jan-gehl-with-aaron_768k.flv" length="79462693" type="video/x-flv" />
		</item>
		<item>
		<title>Adding Meta Information to a Blogroll</title>
		<link>http://anilmakhijani.com/2008/10/13/adding-meta-information-to-a-blogroll/</link>
		<comments>http://anilmakhijani.com/2008/10/13/adding-meta-information-to-a-blogroll/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 17:27:16 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Wordpress Development]]></category>
		<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=89</guid>
		<description><![CDATA[I found a useful blog post on how to add text fields to the &#8220;link management&#8221; admin menu in Wordpress:  http://planetozh.com/blog/2008/02/wordpress-snippet-add_meta_box/
But how do you save this information into your database?  This is a three step approach.

1.  Add the fields to you database:

add_action('activate_geo_blogroll.php','geo_blogroll_update_db');

function geo_blogroll_update_db(){
   global $wpdb;
   $wpdb-&#62;query("ALTER TABLE $wpdb-&#62;links ADD COLUMN link_city [...]]]></description>
			<content:encoded><![CDATA[<p>I found a useful blog post on how to add text fields to the &#8220;link management&#8221; admin menu in Wordpress:  <a href="http://planetozh.com/blog/2008/02/wordpress-snippet-add_meta_box/" target="_blank">http://planetozh.com/blog/2008/02/wordpress-snippet-add_meta_box/</a></p>
<p>But how do you save this information into your database?  This is a three step approach.</p>
<p>
1.  Add the fields to you database:
</p>
<pre>add_action('activate_geo_blogroll.php','geo_blogroll_update_db');

function geo_blogroll_update_db(){
   global $wpdb;
   $wpdb-&gt;query("ALTER TABLE $wpdb-&gt;links ADD COLUMN link_city varchar(255);");
   $wpdb-&gt;query("ALTER TABLE $wpdb-&gt;links ADD COLUMN link_state varchar(255);");
}</pre>
<p>
2.  Add text fields to the link admin screen:
</p>
<pre>add_action('admin_menu', 'add_geo_meta_to_links');

function add_geo_meta_to_links() {
   add_meta_box ('geo_link', 'Link Geography', 'geo_blogroll_form', 'link');
}

function geo_blogroll_form () {
  global $link;
?&gt;

&lt;table class="form-table" style="width: 100%;" cellspacing="2" cellpadding="5"&gt;
  &lt;tr class="form-field"&gt;
       &lt;th value="top" scope="row"&gt;&lt;label for="blog_city"&gt;&lt;?php _e('City'); ?&gt;&lt;/label&gt;&lt;/th&gt;
       &lt;td&gt;
           &lt;input name="blog_city" type="text" id="blog_city"
                  value="&lt;?php echo $link-&gt;link_city; ?&gt;" style="width: 95%" /&gt;
       &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class="form-field"&gt;
    &lt;th value="top" scope="row"&gt;&lt;label for="blog_state"&gt;&lt;?php _e('State'); ?&gt;&lt;/label&gt;&lt;/th&gt;
    &lt;td&gt;
      &lt;input name="blog_state" type="text" id="blog_state"
             value="&lt;?php echo $link-&gt;link_state; ?&gt;"  style="width: 95%" /&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;?php } ?&gt;</pre>
<p>
3.  And finally save this information to the database every time someone saves a new link or updates an old link:
</p>
<pre>add_action('edit_link', 'geo_blogroll_save_meta');
add_action('add_link', 'geo_blogroll_save_meta');

function geo_blogroll_save_meta ($link_id){
  global $wpdb;
  $sql_statement =  "UPDATE wp_links SET link_city='".$_POST['blog_city'].
                              "', link_state='".$_POST['blog_state'].
                              "' WHERE link_id =".$link_id.";";
  $wpdb-&gt;query($sql_statement);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2008/10/13/adding-meta-information-to-a-blogroll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing Alt Law on Mac OS X</title>
		<link>http://anilmakhijani.com/2008/08/11/developing-alt-law-on-mac-os-x/</link>
		<comments>http://anilmakhijani.com/2008/08/11/developing-alt-law-on-mac-os-x/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 20:30:28 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[AltLaw Development]]></category>
		<category><![CDATA[AltLaw]]></category>
		<category><![CDATA[Columbia Law and Technology Program]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Solr]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=65</guid>
		<description><![CDATA[There is a neat project that I have wanted to get involved with for a while called AltLaw.  AltLaw is a free open source project developed by the Columbia Law and Technology program.  Resources for the project are located at the Law Commons Trac Page.
I am trying to get the AltLaw &#8220;stack&#8221; working [...]]]></description>
			<content:encoded><![CDATA[<p>There is a neat project that I have wanted to get involved with for a while called AltLaw.  AltLaw is a free open source project developed by the Columbia Law and Technology program.  Resources for the project are located at the <a href="http://lawcommons.org/trac/">Law Commons Trac Page</a>.</p>
<p>I am trying to get the AltLaw &#8220;stack&#8221; working on my Mac OS X machine.  So here we go:</p>
<p><span id="more-65"></span></p>
<p>
<strong>1) </strong>Download the file <a href="http://anilmakhijani.com/altlaw-config.zip">http://anilmakhijani.com/altlaw-config.zip</a> and unzip it.  I will refer to the location of this unzipped file as {alt-law-config-directory} throughout the rest of this tutorial.
</p>
<p>
<strong>2) </strong>Next, we have to get the Rails front end working.
</p>
<p>
(Prerequisites: sqlite, git)
</p>
<pre>
% git clone git://github.com/lawcommons/altlaw-websearch.gitInitialize altlaw-websearch/.git
% gem install -v=2.1.0 rails
% gem install htmlentities
% gem install BlueCloth
% gem install solr-ruby
% gem install ruby-debug
% gem install chronic
% gem install json
% cd altlaw-websearch
% mkdir log
% chmod -R 644 log/
% cp {alt-law-config-directory}/altlaw-config/rails-config/* config/database.yml
% rake db:migrate
</pre>
<p>In the file config/environment.rb, change the line:</p>
<p><code>SOLR = Solr::Connection.new("http://localhost:8196/v3/solr")</code></p>
<p>to:</p>
<p><code>SOLR = Solr::Connection.new("http://localhost:8983/solr/")</code></p>
<p>and:</p>
<p><code>ExceptionNotifier.exception_recipients = ['errors@altlaw.org']</code></p>
<p>to:</p>
<p><code>ExceptionNotifier.exception_recipients = ['myemail@example.com']</code></p>
<p>% ./script/server</p>
<p>This starts the Rails front end at http://localhost:3000</p>
<p><em>* To run the Rails front end in production mode do the following:</em></p>
<p>(Additional prerequisites: mysql)</p>
<p>update config/database.yml with the proper configuration for you database</p>
<pre>
% rake db:migrate RAILS_ENV=production
% rake sass:update
% RAILS_ENV=production rake asset:packager:build_all
% ./script/server -e production
</pre>
<p><strong>3)</strong> Finally, we need Solr:</p>
<p>The following tutorial seemed to work perfectly on my Mac OS X: <a href="http://lucene.apache.org/solr/tutorial.html">http://lucene.apache.org/solr/tutorial.html</a></p>
<pre>
% wget http://mirror.x10.com/mirror/apache/lucene/solr/1.2/apache-solr-1.2.0.tgz
% tar xvfz apache-solr-1.2.0.tgz
% cd apache-solr-1.2.0
% cp -r example/ alt-law/
% cd alt-law/
% cp {alt-law-config-directory}/altlaw-config/solr-config/* solr/conf/
% java -jar start.jar
</pre>
<p>This starts solr at http://localhost:8983/solr/.</p>
<p>This set of instructions worked for me.  I would love feedback on what it would take to get this to work on non Mac OS X system.</p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2008/08/11/developing-alt-law-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
