<?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>Marcus Follrud &#187; modules</title>
	<atom:link href="http://marcusfollrud.net/tag/modules/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcusfollrud.net</link>
	<description>Wish I had a slogan</description>
	<lastBuildDate>Tue, 24 Jan 2012 20:02:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Getting Drupal Modules using Python</title>
		<link>http://marcusfollrud.net/2009/10/23/getting-drupal-modules-using-python/</link>
		<comments>http://marcusfollrud.net/2009/10/23/getting-drupal-modules-using-python/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 16:25:23 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programmering]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://marcusfollrud.net/?p=335</guid>
		<description><![CDATA[A good friend of mine wrote yesterday a small python script that allows the user to search and download Drupal modules directly via the official ftp. This was made since it is quite boring/irritating to first browse through the module page on drupal.org and then copy the link to a shell where you download the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmarcusfollrud.net%2F2009%2F10%2F23%2Fgetting-drupal-modules-using-python%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmarcusfollrud.net%2F2009%2F10%2F23%2Fgetting-drupal-modules-using-python%2F&amp;source=marcusfollrud&amp;style=normal&amp;service=bit.ly&amp;service_api=R_7d280395e19104feae6bc0cd839f41c0&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://jonasbjork.net">A good friend of mine</a> wrote yesterday a small python script that allows the user to search and download Drupal modules directly via the official ftp.<br />
This was made since it is quite boring/irritating to first browse through the module page on drupal.org and then copy the link to a shell where you download the module you want on your web server.</p>
<p>Instead, Jonas (that&#8217;s my friends name, btw) wrote this program that directly scans through the drupal module directory on the ftp and returns the output in a shell where the user just enter the choice that he/she wants. Example:</p>
<pre class="shell" style="border: 1px solid #ccc; background-color: #fff; color:#666;">jonas@thinkpad61:~$ ./idm.py hello
Found 32436 files!
[0] hellomobile-5.x-1.0.tar.gz
[1] hellomobile-5.x-1.1.tar.gz
[2] hellomobile-5.x-1.x-dev.tar.gz
[3] hellotxt-6.x-1.x-dev.tar.gz
Which module do you want to download? 1
Ok, lets get hellomobile-5.x-1.1.tar.gz
jonas@thinkpad61:~$ ls -l hellomobile-5.x-1.1.tar.gz
-rw-r--r-- 1 jonas jonas 824473 2009-10-22 22:34 hellomobile-5.x-1.1.tar.gz</pre>
<p>I believe that this is quite usefull and interesting. But, <a href="http://www.linuxportalen.se/blogs/jonasbjork/2009/10/22/jb-install-drupal-module-idmpy">as Jonas mentions in this post</a>. It does not contain the functions that you might need, such as: version filter and dev filter. Meaning that you don&#8217;t want to see results for drupal 5 if you are running six. Nor do you want to use developer packages when you are in a critical installation.</p>
<p>I had some time so I made some improvements on the original:</p>
<pre style="border: 1px solid #ccc; background-color: #fff; color:#666;">tomburk@linux-e9bm:~&gt; python idm-mf.py --help
Usage: idm-mf.py [options]</code>

Options:
-h, --help            show this help message and exit
-f version, --filter=version
Filter the results in version numbers.
-d, --dev             Show developer packages</pre>
<p>This allows the user to filter between the version, of course &#8221;all&#8221; can be applied, if one wants to show all the results. Plus, It&#8217;s possible to toggle between showing the developer packages or not.</p>
<p>Final result:</p>
<pre style="border: 1px solid #ccc; background-color: #fff; color:#666;">tomburk@linux-e9bm:~&gt; python idm-mf.py -f 5 hello
Found a total of 32451 files!
Files containing "hello"
 Based on filter: 5
  Not showing developer packages
[0] hellomobile-5.x-1.0.tar.gz
[1] hellomobile-5.x-1.1.tar.gz
Which module do you want to download? 1
Ok, lets get hellomobile-5.x-1.1.tar.gz
tomburk@linux-e9bm:~&gt; ls -s hellomobile-5.x-1.1.tar.gz
812 hellomobile-5.x-1.1.tar.gz</pre>
<p>The file is available here: <a href="http://marcusfollrud.net/wp-content/idm-mf.py">http://marcusfollrud.net/wp-content/idm-mf.py</a><br />
Or at github: <a href="http://github.com/marcusfollrud/idm">http://github.com/marcusfollrud/idm</a><br />
See you!</p>
<p style="text-align: center;"><strong>A small update</strong></p>
<p style="text-align: center;">2009-10-24 &#8211; Added support for multiple file download, Available on both github and in wp-content</p>
]]></content:encoded>
			<wfw:commentRss>http://marcusfollrud.net/2009/10/23/getting-drupal-modules-using-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

