23 Jun
This took a bit longer to get out than I had originally expected but here it is. As a precursor to my previous post, I wanted to make a new “plugin” for pidgin that would update my music status from Banshee because as of the development versions of 1.0, they had an entirely new API in place and other similar plugins hadn’t (and still aren’t as far as I know) been updated to work with the new API. So that’s exactly what I did and its a very simple ~30 line python script that I am putting out to the world in case anyone else wants similar functionality.
Basically you just stick the file in your home directory (or at your option in /usr/bin or /usr/local/bin) and add it to your auto-started applications in GNOME or KDE or put it in your xinitrc or whatever you want. For GNOME users I happen to know that you can do this from System > Preferences > Sessions > Startup Programs > Add. For windows users this script will never run because Banshee is *nix only as well as DBus (as far as I know). Enjoy!
Download pidgin_banshee_status.py
08 Feb
Recently, some of my friends had inspired me to start looking into how to make IRC bots. Well I did, and honestly I was fascinated by it. So anyway, I made my own implementation of the IRC specification as well as my first bot in python within a day or so. Since then I’ve made a bot which I called ProxyBot which allows a user to do things like portscans or an IP range/hostname and or a port range. If the bot finds a port open, it logs it to a PgSQL database which can then be searched later on for all IPs which have a given port open. It will also do standard hostname resolution. I will be releasing the source code under the GPLv3 and it will be avalible for download shortly.
24 Jan
Well I’ve been wanting to convert all my music from mp3 to ogg and quickly found that there was no real easy way to do it. So I made a small command line utility to do exactly that. Because I really hate mp3 and proprietary formats because they are such a pain in the butt and in the US (as far as I know) they are illegal or so I thought. Well anyway, I was just reading reading the topic about how many songs you have in your library and I think everyone who replied to that topic had their entire library in mp3 and Im sure that alot of people would like to support the open format, if it were only easier.
So I called my utility am2o (auto mp3 to ogg) and its written in PHP (no it does NOT require a webserver what so ever, its a command line utility). I purposely wrote it in PHP to show people that PHP is just like any other scripting language and to debunk the misconception that its only for websites. It also wraps around ffmpeg to do the transcoding.
My personal need for it was to take all the music that I download from gnutella (frostwire/limewire/gtk-gnutella/etc) and convert it to ogg and put it in my music directory and when you download alot of mp3’s you keep them in the same folder and when you rerun the command you dont want to re-transcode all of the music thats already transcoded, so it supports filename caching for each unique directory. You may optionally disable caching as well.
To run it you need the ffmpeg and php5-cli packages from the repository. You can get them from Synaptic, or by command line.
sudo apt-get install ffmpeg php5-cli
The package itself is attached to this post. To install it just unpack the tarball then run:
cd am2o
sudo ./install.sh
Examples on how to use the program are included in the readme but heres one for a quickstart, its really easy.
am2o -i ./Shared -o ./Music
We use -c to enable filename caching (this flag is require, to disable use -c=no), and ./Shared is our input folder (where we will pull mp3’s from) and ./Music is the output folder (where we put the transcoded ogg’s).
NOTE: As of version 0.2, the -c flag is no longer required and will automatically default to yes if left out.
If you have a big music library that you are transcoding, and you have a multi or dual core CPU system, I dont recommend running multiple instances as this will probably cause it to clash if you are running it on the same directories. Maybe in the future, if people like this tool, I will add support for multiple ffmpeg instances to encode multiple files at a time.
I hope this tool inspires you to convert to and use ogg to support it as an open format.
[Edit]
I have released am2o v0.2 with support for lossless flac and flexible flags and arguments. You may use all flags/arguments in any order but you must use the -i and -o flags to specify input and output directories respectively. The default transcode format is ogg, if you would like to transcode to flac, you must use the ‘-f flac’ flag. Refer the ‘-h’ or the readme for more information.
For all Windows and Mac users, this program was designed to run on Linux/Unix (*BSD, Solaris, etc) systems. It will run on Windows and Mac as long as you have the PHP interpreter and ffmpeg installed, and it must be run from a command line.
Download am2o v0.1
Download am2o v0.2