Ouf, I am relieved for now. I did not spot anything that would cause a problem to my conscience. We are at bkb. But I am also aware that the banking world is very opaque...
[ add comment ] | permalink |




( 3.1 / 84 )While MP3 files were not originally intended to store additional metadata within them, the release of the ID3 tag protocol in 1996 suddenly made this a possibility. However, it wasn’t until version 2 of the protocol became available that MP3 files could actually contain embedded album art.
To embed an album cover to a MP3, you will need following tools from MacPorts:
- eyeD3 (sudo port install py26-eyed3)
- id3v2 (sudo port install id3v2)
#!/bin/bash
# ${0##*/}: Removes everything up to the first forward slash in
# the command name.
usage() {
echo "Usage: ${0##*/} <img> <mp3>" >&2
}
if [ $# -ne 2 ]
then
usage
exit 1
fi
IMG=$1
MP3=$2
COVER=cover.png
convert -quality 90 -geometry 300x300 "$IMG" $COVER
if [ -e $COVER ]
then
# eyeD3 --list-image-types for available image types for --add-image
eyeD3 --add-image=$COVER:FRONT_COVER "$MP3" >/dev/null 2>&1
rm -f $COVER
else
echo "Converting '$IMG' to '$COVER' failed."
exit 1
fi
# Check whether the APIC frame has been set (cover image has been added).
HAS_APIC=`id3v2 -l $MP3 | grep APIC`
if [ -n "$HAS_APIC" ]
then
echo "Cover image has been successfully added to '$MP3'."
else
echo "Adding cover image to '$MP3' failed."
fi
[ 3 comments ] ( 10 views ) | permalink | related link |




( 2.8 / 77 )
Recently I started to podcast some of my mixes (see DJ Ribose Podcast if you are interested). A podcast is actually just an audio file. But, like for a CD, I wanted to display the tracklist while the podcast is playing. I have already seen this and asked myself how they achieve that. The answer is Chapters. Here you can find a tutorial for adding chapters to your podcast. Unfortunately this only seems doable with GarageBand.
[ add comment ] | permalink |




( 3.1 / 76 )The GNU version of cp (called gcp) has an interesting option: -l.
Instead of copying files it will link them using hard links.
This is very handy if you want to recursively copy a given directories structure without duplicating all the files. gcp can be installed via MacPorts:
sudo port install coreutils.[ add comment ] | permalink |




( 3 / 80 )There are a lot of dependency injection frameworks out there. What you may not know is that there is a very simple yet useful one built into the JDK. And it's type-safe.
JDK 6 introduces ServiceLoader. ServiceLoader loads things based on flat files in the directory META-INF/services from the Java classpath.
Without going down the OSGi rabbit hole this is a simple solution which probably provides 90% of what people currently want. The API has been around since JDK 1.3 but mostly by internal components, JDK 6 promotes the API and makes it extremely easy to use with a minimal set of requirements.
[ add comment ] | permalink | related link |




( 3 / 97 )Back Next

Calendar



