ingen slogan
Arkiv för oktober 2009
Getting Drupal Modules using Python
23 Okt 09
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 module you want on your web server.
Instead, Jonas (that’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:
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
I believe that this is quite usefull and interesting. But, as Jonas mentions in this post. It does not contain the functions that you might need, such as: version filter and dev filter. Meaning that you don’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.
I had some time so I made some improvements on the original:
tomburk@linux-e9bm:~> python idm-mf.py --help Usage: idm-mf.py [options] Options: -h, --help show this help message and exit -f version, --filter=version Filter the results in version numbers. -d, --dev Show developer packages
This allows the user to filter between the version, of course ”all” can be applied, if one wants to show all the results. Plus, It’s possible to toggle between showing the developer packages or not.
Final result:
tomburk@linux-e9bm:~> 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:~> ls -s hellomobile-5.x-1.1.tar.gz 812 hellomobile-5.x-1.1.tar.gz
The file is available here: http://marcusfollrud.net/wp-content/idm-mf.py
Or at github: http://github.com/marcusfollrud/idm
See you!
A small update
2009-10-24 – Added support for multiple file download, Available on both github and in wp-content
Debian in Virtualbox
14 Okt 09
In the Swedish linux community, it’s quite common to experience linux by:
- Install ubuntu/opensuse/mint
- Fix the lack of mp3/mkv/h264/xvid blabla support
- Install virtualbox
- Test distributions
- Brag about the ones you installed (especially Debian)
It’s always good to try out different flavors, till you find the one the match your needs and requirements. It is also always good for people that’s creating the different distributions as it often generates feedback. If not directly towards the developers, then at least a comment about it on the web will be made in most cases. This means indirect feedback plus the growth of Linux overall.
When it comes to myself, I’ve never been much of a distribution tester. Sure, I’ve installed quite many over my 6 years running Linux. Such as Ubuntu, OpenSuSE, Fedora, Slackware, Arch, Crux and so on. But I have always tried them out fairly, in the meaning that none of them have been in a Virtualbox just to test the installation and the mp3 support in the chosen distribution. To me, the most importance thing is how productive I am.
Anyways, what I was going to say is that I made my first Virtualbox+Debian installation today (yay, my time to shine!!). To me Debian has always seemed to be this quite advanced installation to get it up and running, according to what Swedish users express on the web. . But today, I realized that it’s just as simple as installing it’s buddy Ubuntu. Why do people brag about this?
The true reason for why I chosed Debian, and more important installing via Virtualbox is because of the recent Appartment change me and my darling made I’ve only set up the MacMini as my working station. The PC is now standing doing nothing, and I’m too lazy to insert all the cables, hehe
. Also, it’s the recommended distribution by the company that I work for. Therefor it felt naturally to install Debian!
This entry was never to start a Flame war between distributions, they are all good. It all just depends on your needs.
And if any Virtualbox distribution tester feels pointed out or accused inappropriately, then I apologize. I never meant to sound negative, rude or wiseacre.
Best,
Marcus