I’m starting to appreciate the abilities of DCOP:

%./amaroktunewatcher > Notification: New Song (Streaming): Tom Wax – Maximal ssl > Notification: New Song (Streaming): Absolum – Push | Album: Sub Science > Notification: New Song (Streaming): Mili Sefic – 04 > Song has not changed. > Song has not changed.

Yeah, so all I’ve done so far is interface amaroK, so I can keep a small list of the last few songs I’ve listened to. It’s amazingly trivial. I have it take the current song and stuff it into a variable. If that variable doesn’t match the last-known song, then update the list, checksum, and ping my backend database here on my website. Practical upshot? I’ve got that tiny little ‘Last song’ blurb on the front page. An exercise in futility? Perhaps. It’s still fun, though!

amarok is a media player for the KDE desktop environment.

The ‘configure’ script is a bit broken under FreeBSD. Thankfully, we know what the root of the problem is, being, that parameters are not being properly passed, and it’s not making the files it needs for the program to function.

I wrote a quick little shell script, which, if dropped into the source tree for amarok, will do all of the proper patching to make amarok buildable.

I posted my simple little hack on the KDE board, and will hopefully be cleaned up and added to the amarok port, if the configuration is not patched. However, since most folks who find this will be through Google, here’s the code:

#!/bin/sh MYDIR=`pwd` if [ -d amarok/src ]; then cd amarok/src echo ”>>> Compiling configurations…” kconfig_compiler ./engine/gst/config/gstconfig.kcfg /engine/gst/config/gstconfi g.kcfgc kconfig_compiler ./amarokcore/amarok.kcfg /amarokcore/amarokconfig.kcfgc cd ../.. ./configure LDFLAGS=-pthread $* MYFILES=`find . -name \*.ui -print` for n in $MYFILES; do THISDIR=`dirname $n` THISFILE=`basename $n` CPPFILE=`echo $THISFILE | sed s,ui,cpp,` HEADERFILE=`echo $THISFILE | sed s,ui,h,` cd $THISDIR echo ”>>> Processing $THISFILE…” uic -o $HEADERFILE $THISFILE uic -o $CPPFILE -impl $HEADERFILE $THISFILE cd $MYDIR done sed s,”KWizard”,”QWizard”, < amarok/src/firstrunwizard.cpp > amarok/src/firstrunwizard.cpp1 mv amarok/src/firstrunwizard.cpp amarok/src/firstrunwizard.cpp.bak mv amarok/src/firstrunwizard.cpp1 amarok/src/firstrunwizard.cpp echo ”>>> Ready to build amarok!” else echo ”>>> Error: You must place this file in the amarok source directory!” echo ”>>> You are in: $MYDIR” exit 1 fi

For the terminally lazy (pun not intended), I’ve created a tarball of a modified /usr/ports/audio/amarok tree for amarok 1.2.2.

%gzip -dc amarok-1.2.2-FreeBSD-port.tar.gz | (cd /usr/ports/audio; tar xvf -); cd /usr/ports/audio/amarok; make install clean

Good luck!

Mosu has released MKVToolNix 1.4.1, primarily a bugfix version. Here’s a partial bugfix log:

* mkvmerge: bug fix: AC3 detection was broken in rare cases. * mmg: bug fix: If the TEMP environment variable contains spaces then the calls to mkvmerge when adding files failed. * mkvmerge: bug fix: Extracting the FPS from some AVC MP4 files did not work. * mkvmerge: bug fix: Appending + splitting was segfaulting if used together and at least one split occured after a track has been appended. * mkvmerge: Added more descriptive error messages if two tracks cannot be concatenated because “their parameters do not match”. * mkvmerge: bug fix: A failing call to posix_fadvise will only turn its usage off for that one file and not abort mkvmerge completely.

... and many, many more. You can get the goods here.

To preface: I’ve been using Gallery for years, since the 1.2.x days. I don’t like how bloated it has become, and the myriad of security issues one faces by having it installed (ironic, as I run a phpBB support board, I know).

I’ve opted to throw together a homebrew system, which is currently replacing Gallery. Please note that it is still in it’s infancy, and the initial display/thumbnail system is all that is fully coded. The picture viewing system is incomplete, and I will rewrite the code to use Apache’s mod_rewrite to keep the URLs clean.

Since I’ve been quite busy otherwise, and have had little to add to the site (codewise), I figured I might give a rather simple, if not overengineered random quote generator.

What this does is look up a prepopulated table of quotes, with personal attributes, and selects, then prints a random one.

First, my mySQL:

CREATE TABLE `quotes` ( `id` int(5) NOT NULL auto_increment, `quote` blob NOT NULL default ‘To err is human. This QuoteDB, however, is in err.’, `ascribe` varchar(200) default NULL, PRIMARY KEY (`id`) )

Then we can just make a silly little subroutine for it like:

– $attribute” : $myString .= ”"”; return($myString); } ?>

Now, connect to your DB as you normally would – for brevity, I’ve created the whole thing as a self containted program, including the data above, as randquote.php:

Note that the above, I populated the existing name for the quote database, the table for the quote, and the person quoted. This is not necessary as I have already set them as defaults within the function – however, again, as a teaching exercise, this might shed a bit more light on how to expand this utility, or use different databases with the same schema.

Notes: I decided upon BLOB rather than varchar() because you can have a really large quote this way, and there should never be a need for an attribute over 200 characters. Again, for brevity, I hardcoded HTML into the random quote generator, this makes it easier to just pass a single string to the executing program.

Note that I have provided no way to edit the existing quotes, or even add existing quotes to the DB. This is left as an exercise to the reader (for now), however, it could be as simple as:

I might later follow up on this, giving a small demonstration of forms in PHP, editing, et al, but that’s beyond the scope of this article.