2011年2月アーカイブ

linux-links

linux-links

dir2ogg

dir2ogg

dir2ogg is a python script which converts mp3, m4a, and wav files into ogg-vorbis format. It was inspired by the perl script mp32ogg. The script requires that you have python, oggenc (part of the vorbis-tools package) , and mpg123 (or mpg321 with the appropriate symlink). dir2ogg supports id3 tags, this feature requires you to install pyid3lib. pyid3lib is a python module that allows manipulation of id3 tags. It is not in the standard library, however, it is freely available from http://pyid3lib.sourceforge.net/, and is simple to install. If you choose not to install this module you can still use the script, and scratch tags will be created using the filename as basis. If you want to convert m4a files you must have faad installed..

If you want a quick peek at the source you can preview dir2ogg.
note for those looking to convert m4a to mp3:

Looking at my webalizer stats I can see that a large number of people are coming to this page using a search query like 'convert m4a to mp3'. My script does not convert to mp3s, but I am loathe to allow anyone to leave my site unsatisfied...so here you go:

$ faad foobar.m4a # convert to wav
$ lame foobar.wav foobar.mp3 # convert to mp3

Steve Nixon has sent in a shell script which automates the above commands. Thanks Steve...
If you are using windows you may want to have a look at BonkEnc. Tip courtesy of Wim Vander Schelden.
download dir2ogg

The current stable version:

* dir2ogg version 0.9.1 : Released April 1, 2005. [md5]

Older versions:

* dir2ogg version 0.9 : Released January 27, 2005. [md5]
* dir2ogg version 0.9pre1 : Released December 9, 2004. [md5]
* dir2ogg version 0.8 : Released September 27, 2004. [md5]
* dir2ogg version 0.7 : Released August 23, 2004.
* dir2ogg version 0.6 : Released May 24, 2004.
* dir2ogg version 0.5 : Released May 14, 2004.
* dir2ogg version 0.4 : Released October 8, 2003.
* dir2ogg version 0.03 : Released September 12, 2003.
* dir2ogg version 0.02 : Released a while ago ;)
* dir2ogg version 0.01: crusty old shell script version. Only included here to elicit flames. Released many moons ago...

I have also written an Ebuild script for those that run Gentoo. Note: These are redundant, as dir2ogg is in the portage tree now. Version 0.8 is marked stable for x86, amd64, and sparc. Really though, as long as your platform supports python, vorbis-tools, and mpg123, dir2ogg should work just fine for you.

* dir2ogg-0.9.1.ebuild
* dir2ogg-0.9.ebuild
* dir2ogg-0.8.ebuild

It has been brought to my attention that Christian Marillat maintains a collection of primarily multimedia debian packages, of which one is for dir2ogg. Add the following to your /etc/apt/sources.list to access it:

deb ftp://ftp.nerim.net/debian-marillat/ unstable main
deb-src ftp://ftp.nerim.net/debian-marillat/ unstable main

Ok, so I didn't know this but apparently you can use a gentoo ebuild to make rpms out of any package in portage. I gave it a try and sure enough, it spits out an rpm for dir2ogg. Now, I don't use any distros that uses the rpm package manager, so this thing is _completely_ untested by me or anyone else! That being said I am kind of curious. If you want to try this go nuts, and please send a note on how it goes ;)

* dir2ogg-0.8.i386.rpm

Installation and Usage

dir2ogg is very simple to install and use. The tar package contains five files. 1) a README with installation instructions and other info. Make sure you read this file for the most recent info. 2) dir2ogg: the script itself. 3) dir2ogg.1: the manpage. 4) LICENCE: the Artistic License, under which dir2ogg is released. 5) install.sh: A bash script for automating installation.

Command line gurus will probably just want a quick glance at the man page.

Installation is as easy as:

$ tar xzf dir2ogg-0.8.tar.gz
$ cd dir2ogg
$ sh install.sh # install the script and manpage

This will have to be done as root of course. Usage is just as easy. To convert a single mp3:

$ dir2ogg foo.mp3

To convert an mp3, an m4a and a wav:

$ dir2ogg foo.mp3 bar.m4a baz.wav

Alternatively, you can use shell-globbing:

$ dir2ogg fooBand-*.mp3
$ dir2ogg *{.m4a,.mp3}

To convert directories you simply pass the directories as arguments, or alternatively you can cd to the directory you wish to act upon and use '.' to denote the current directory.

Single directories:

$ dir2ogg -d /path/to/mp3directory
$ cd /path/to/another/mp3directory
$ dir2ogg -d .

Multiple directories:

$ dir2ogg -d /path/1/ /path/2 /path/3
$ dir2ogg -d . foo/ foo/bar/

dir2ogg 0.9 command line flags:

General options:

-h or --help
Print quick usage details.
-qN or --quality=N
Ogg quality. 'N' is an integer between 1 and 10. Default is 4. See 'man oggenc'.
-v or --verbose
Increase verbosity. At this point all it does is list the id3 tags that will be written, and print a list of files that will be converted when used with -d.
-s or --shell-protect
Convert spaces in filenames to underscores.
-x or --delete-mp3
Deletes original mp3 file after converting.
-a or --delete-m4a
Deletes original m4a file after converting.
-p or --preserve-wav
Preserves wav files. By default they are deleted after converting.
-d or --directory
Convert all mp3s in a directory. At this time only one directory can be named per run.

Options that are only used with -d or --directory:

-m or --convert-m4a
Convert m4a files in directory as well as mp3s
-w or --convert-wav
Convert wav files in directory as well as mp3s
-n or --no-mp3
Do not convert mp3 files. This only makes sense when used with -m and/or -w

Command line flags can be made in any order. When using -d or --directory dir2ogg expects exactly one argument after the options.

More examples:

$ dir2ogg -s "song with spaces.mp3"

converts to song_with_spaces.ogg

$ dir2ogg -dx .

converts all mp3s in the current directory, mp3s are deleted

$ dir2ogg -p --quality=6 "Some Band - Some Song.m4a"

converts to "Some Band - Some Song.ogg". Temporary wav file is preserved, ogg quality is set to '6'

$ dir2ogg -dwm .

converts all mp3, m4a, and wav files in current directory
Screenshot

What kind of narcissistic loser would post a screenshot of a cli app? Me, of course. Here's dir2ogg in action
Known bugs and Caveats:

December 1, 2004:
Fixed bug where m4a files with spaces break the script. My bad, sorry folks.

Older versions of dir2ogg do not check the exit status of mpg123 or faad. This means that if your mp3 or m4a is corrupted, or otherwise triggers an error it will NOT be handled. This is bad if say, your using the -x or -a flag, because the original file will be deleted even though the conversion was not successful. This is fixed in versions 0.9pre1 and 0.9.

WARNING
Converting from MP3 or M4A to OGG is a conversion between two lossy formats. This is fine if you just want to free up some disk space, but if you're a hard-core audiophile you may be disappointed. I really can't notice a difference in quality with 'naked' ears myself. You might want to do your conversion, then compare with the original before erasing them.

Some special characters in filenames will break the script.

Please send bug reports to this address.
Changes
0.9.1 :: April 1, 2005

This release allows multiple directories to be specified on the command line. Also, there is now support for the 'track number' id3 tag. It will show up as either '5' which shows track 5, or '5,17' which shows track 5 of 17 on the original album.
0.9 :: January 27, 2005

The changes between 0.9 and 0.9pre1 are trivial, so everything below applies to 0.9. To reiterate, your filename _may_ be changed, and error checking for mpg123, oggenc, and faad is included. Have fun!
0.9pre1 :: December 9, 2004

In dir2ogg 0.9pre1 the special characters '"', '*', '!', and ';' will be removed from filenames. The special character '&' will be converted to 'and'. These characters are known to break the script when fed to bash. If you don't like the idea of this script changing your filenames that's fair enough, but I submit these characters have no business being in proper unix filenames anyway. If I get the time I will try to change this so they are escaped rather than removed.

Also in this version, the exit status of mpg123, faad, and oggenc is checked, and should be handled apropriately. This means if you are using the 'x' or 'a' flags, your original file won't be deleted if mpg123 throws an error. Something you would expect of course, but with me it takes time for such 'features' ;)

And finally after two years I added some sanity checks on the filename/directory arguments passed to the script. So now if you mistype a filename you will get a stern warning about your file not being found from dir2ogg instead of a 50 line traceback from python.
0.8 :: September 27, 2004

dir2ogg 0.8 is pretty much a re-write from scratch. The original dir2ogg was not much more than an exercise for me. I was "scratching an itch" as ESR might say. I found myself converting mp3s to oggs quite frequently, and thought that others may be doing this as well, which is why I released dir2ogg in the first place. As my skill in Python increased, I added more features to dir2ogg...and the more I added to my original code the cruftier it got.

dir2ogg is now object-oriented instead of procedural. In addition to hundreds of unseen advantages, this will allow me to add new features in the future easily and cleanly. Along with a base of cleaner and more efficient code, dir2ogg 0.8 includes these benefits:

* Full support of GNU style short and long options.
* Ability to specify multiple filenames on the command line.
* In the absence of 'real' ID3 tags, scratch tags are created for all files.
* Coloured output to easily tell dir2ogg's output from oggenc's, faad's and mpg123's output.
* Many small bug-fixes.

0.8pre1 :: September 23, 2004

I am putting the finishing touches on a complete re-write of dir2ogg. Version 0.8 is going to be vastly superior to 0.7 for many reasons including full support for GNU-style long and short command line options, extensive exception handling, improved program logic, the ability to specify multiple files on the command line, and many, many more.
0.7 :: August 23, 2004

Version 0.7 has support for converting m4a and wav files to ogg format. To convert m4a files you will need faad installed. This version also fixes some bugs, including adding uppercase file extensions to the list of files to be converted ie: MP3, M4A, and WAV. Even if you don't intend to convert m4a files, you should still use this version.
0.6 :: May 24, 2004

This version introduces new command line flags. Deleting the .wav and .mp3 files is now user-controlled, there is an option to preserve the shell-protected filename, and there is also a verbose flag. Plus the '-dir' flag is now obsolete. Please us 'd' instead. NOTE: the new command line option flags do not need to be preceded by a dash. There cannot be any spaces between options on the command line. See Installation and Usage below...
0.5 :: May 14, 2004

dir2ogg 0.5 is in the Ibiblio Linux Archive.

dir2ogg now allows spaces in your filenames. The script uses sed to convert spaces to underscores, the conversion is made, then the underscores are reverted back to spaces. This is not fool-proof however...some special characters will cause the script to break. dir2ogg tries to deal with this gracefully, but I cannot anticipate every filename possible (there are some doozies when downloading mp3s from windows users ;)). Generally, if you use sensible filenames this will not be a problem for you. Keep in mind that you will still have to escape the filenames for bash ie: dir2ogg "song with spaces.mp3". Using "dir2ogg -dir ." will work fine however. Please read the updated manpage for more details.
0.4 :: October 8, 2003

I have bumped the version number up to 0.4 to reflect its 'stable' status. For almost everyone this is the version you will want to use. Also of note: dir2ogg is now a part of the Ibiblio Linux archive. It's home will always be this page, but my site is not always up...so you will always be able to get it from Ibiblio.

FlacInfo

FlacInfo is a pure Ruby library for reading/writing low level information from Flac (Free Lossless Audio Codec) files.

flacinfo can extract the following information:

* Contents of the STREAMINFO block (bitrate, number of samples, md5 signature etc)
* Contents of the VORBIS_COMMENT block, ie: the tags...
* Contents of the SEEKTABLE block
* Size of PADDING block if present
* Size of CUESHEET block if present. The cuesheet itself is not parsed yet.
* Contents of the APPLICATION block if present.
* Contents of the PICTURE block if present, and write it to an external file (version 0.2).

flacinfo can write the following information back to the file:

* The Vorbis comments (version 0.3).

As an added bonus, if there is data present in a FlacFile APPLICATION block it can parse it, and dump the raw data to the console or a file.

FlacInfo has been tested on Linux and OS X. It should work on any Unix with Ruby, and on Windows as well. If you try the library on another OS/System please do let me know how it works for you. Please report all bugs and issues using FlacInfo's Rubyforge bug tracker.
documentation

Here is FlacInfo's Rdoc documentation.

Here is a brief example irb session:

irb(main):001:0> require 'flacinfo'
=> true
irb(main):002:0> song = FlacInfo.new("manuChao-denia.flac")
=> # (VORBIS_COMMENT size=208 offset=536) (PADDING size=4096 offset=748)>
irb(main):003:0> song.print_tags
artist: Manu Chao
tracknumber: 07/17
title: Denia
date: 2001
vendor_tag: reference libFLAC 1.1.2 20050205
genre: Latin Reggae
album: Prxima Estacin Esperanza
offset: 536
block_size: 208
comment: Starbellied using sneetchalizer
=> nil
irb(main):004:0> song.comment_del("album")
=> true
irb(main):005:0> song.comment_add("album=Próxima Estación: Esperanza")
=> true
irb(main):006:0> song.update
=> true
irb(main):007:0> song.print_tags
artist: Manu Chao
tracknumber: 07/17
title: Denia
date: 2001
vendor_tag: reference libFLAC 1.1.2 20050205
genre: Latin Reggae
album: Próxima Estación: Esperanza
offset: 536
block_size: 211
comment: Starbellied using sneetchalizer
=> nil
irb(main):008:0> exit

Screenshot

Screenshot

What kind of narcissistic loser would post a screenshot of a cli app? Me, of course. Here's dir2ogg in action
Known bugs and Caveats:

BUGS
Sometimes the id3 tags will cause errors when passed to oggenc. At this point the error is trapped and the conversion is performed without writing the tags. Not sure what exactly what is causing this.

Older versions of dir2ogg do not check the exit status of mpg123 or faad. This means that if your mp3 or m4a is corrupted, or otherwise triggers an error it will NOT be handled. This is bad if you're using the -x or -a flag(s), because the original file will be deleted even though the conversion was not successful. This is fixed in versions 0.9pre1 and above.

Some special characters in filenames will break the script.

WARNING
Converting from MP3 or M4A to OGG is a conversion between two lossy formats. This is fine if you just want to free up some disk space, but if you're a hard-core audiophile you may be disappointed. I really can't notice a difference in quality with 'naked' ears myself. You might want to do your conversion, then compare with the original before erasing them.

Please send bug reports to this address.
Changes
0.9.2 :: December 15, 2005

This is 0.9.2_pre1 with a few minor fixes.
0.9.2_pre1 :: September 29, 2005

This is a testing release. It includes support for recursive directory conversion, and also support for embedded id3 tags in m4a files. Please beta test if you can. Barring a showstopper bug, this will be rolled out as dir2ogg 0.9.2.
0.9.1 :: April 1, 2005

This release allows multiple directories to be specified on the command line. Also, there is now support for the 'track number' id3 tag. It will show up as either '5' which shows track 5, or '5,17' which shows track 5 of 17 on the original album.
0.9 :: January 27, 2005

The changes between 0.9 and 0.9pre1 are trivial, so everything below applies to 0.9. To reiterate, your filename _may_ be changed, and error checking for mpg123, oggenc, and faad is included. Have fun!
0.9pre1 :: December 9, 2004

In dir2ogg 0.9pre1 the special characters '"', '*', '!', and ';' will be removed from filenames. The special character '&' will be converted to 'and'. These characters are known to break the script when fed to bash. If you don't like the idea of this script changing your filenames that's fair enough, but I submit these characters have no business being in proper unix filenames anyway. If I get the time I will try to change this so they are escaped rather than removed.

Also in this version, the exit status of mpg123, faad, and oggenc is checked, and should be handled apropriately. This means if you are using the 'x' or 'a' flags, your original file won't be deleted if mpg123 throws an error. Something you would expect of course, but with me it takes time for such 'features' ;)

And finally after two years I added some sanity checks on the filename/directory arguments passed to the script. So now if you mistype a filename you will get a stern warning about your file not being found from dir2ogg instead of a 50 line traceback from python.
0.8 :: September 27, 2004

dir2ogg 0.8 is pretty much a re-write from scratch. The original dir2ogg was not much more than an exercise for me. I was "scratching an itch" as ESR might say. I found myself converting mp3s to oggs quite frequently, and thought that others may be doing this as well, which is why I released dir2ogg in the first place. As my skill in Python increased, I added more features to dir2ogg...and the more I added to my original code the cruftier it got.

dir2ogg is now object-oriented instead of procedural. In addition to hundreds of unseen advantages, this will allow me to add new features in the future easily and cleanly. Along with a base of cleaner and more efficient code, dir2ogg 0.8 includes these benefits:

* Full support of GNU style short and long options.
* Ability to specify multiple filenames on the command line.
* In the absence of 'real' ID3 tags, scratch tags are created for all files.
* Coloured output to easily tell dir2ogg's output from oggenc's, faad's and mpg123's output.
* Many small bug-fixes.

0.8pre1 :: September 23, 2004

I am putting the finishing touches on a complete re-write of dir2ogg. Version 0.8 is going to be vastly superior to 0.7 for many reasons including full support for GNU-style long and short command line options, extensive exception handling, improved program logic, the ability to specify multiple files on the command line, and many, many more.
0.7 :: August 23, 2004

Version 0.7 has support for converting m4a and wav files to ogg format. To convert m4a files you will need faad installed. This version also fixes some bugs, including adding uppercase file extensions to the list of files to be converted ie: MP3, M4A, and WAV. Even if you don't intend to convert m4a files, you should still use this version.
0.6 :: May 24, 2004

This version introduces new command line flags. Deleting the .wav and .mp3 files is now user-controlled, there is an option to preserve the shell-protected filename, and there is also a verbose flag. Plus the '-dir' flag is now obsolete. Please us 'd' instead. NOTE: the new command line option flags do not need to be preceded by a dash. There cannot be any spaces between options on the command line. See Installation and Usage below...
0.5 :: May 14, 2004

dir2ogg 0.5 is in the Ibiblio Linux Archive.

dir2ogg now allows spaces in your filenames. The script uses sed to convert spaces to underscores, the conversion is made, then the underscores are reverted back to spaces. This is not fool-proof however...some special characters will cause the script to break. dir2ogg tries to deal with this gracefully, but I cannot anticipate every filename possible (there are some doozies when downloading mp3s from windows users ;)). Generally, if you use sensible filenames this will not be a problem for you. Keep in mind that you will still have to escape the filenames for bash ie: dir2ogg "song with spaces.mp3". Using "dir2ogg -dir ." will work fine however. Please read the updated manpage for more details.
0.4 :: October 8, 2003

I have bumped the version number up to 0.4 to reflect its 'stable' status. For almost everyone this is the version you will want to use. Also of note: dir2ogg is now a part of the Ibiblio Linux archive. It's home will always be this page, but my site is not always up...so you will always be able to get it from Ibiblio.
stats

It is Tuesday December 27, 2005 6:25 pm
This page served 26619 times
This page last modified: December 18, 2005 12:12 pm
Your IP address is: 209.237.238.172
You are browsing using: ia_archiver
You are browsing from: United States.
badcomputer.org's uptime: 18:25:08 up 39 days, 14:48, 1 user, load average: 0.00, 0.00, 0.00

usage and examples

sneetchalizer command line flags/options:

General options:

-h or --help
Print quick or full usage details respectively.
-r or --recursive
Search directory arguments recursively for files to convert.
-d or --delete
delete input files after successful conversion. May not be safe yet!!!
-v or --verbose
makes sneetchalizer more chatty.
-s or --show-output
shows output from conversion tool.
-p or --pretend
don't convert anything. sneetchalizer will go through the motions and print out the commands it would run. Useful for preview- ing a complex command line to ensure it does what you intend. You should interpret this option's output with a grain of salt. For example, if you include the '--sanitize' option, the files will not really be renamed when using --pretend, and as such the command's output will not reflect that the filenames would be changed during an actual run.
-t or --terminate
terminate sneetchalizer options. This is useful if you have to convert '--coolDir' or '-groovySong.mp3'. This is the only option whose order on the command line is significant.
-D ARG or --out-directory=ARG
write all outfiles to a directory argument. This is useful if you want to (re)encode files directly to a mounted portable device.
--strict and --pedantic
many errors that sneetchalizer may encounter are recoverable, such as specifying a directory as argument that contains no files to convert, or conversion failures in general. By default the script will print an error message and move on to the next file. If you use '--strict' then sneetchalizer will bail out at the first sign of trouble except for tag errors. With '--pedantic' the script will stop even on tag errors.
--stasis
Preserve timestamp (mtime) of original file.
--threads [N]
Experimental. Use threads to create concurrent jobs. This option takes an optional integer argument which represents the number of threads to launch. The default is two. Preliminary tests suggest there is little advantage (and even diminishing returns) when setting this number greater than the number of cores/CPUs you have. Due to the asychronous nature of threads the --verbose and --show-output flags will be silently disabled and most screen output is supressed.
--sanitize
Removes ,, ;, :, ', ", %, @, #, and ` from filenames and tags.
-n [FORMAT] or --rename[=FORMAT]
rename all outfiles (and temporary wavs) according to FORMAT. FORMAT is a string with special designators to be pulled from the file tags. The following options are available:

* %t Song title
* %b Album title
* %n Track number
* %a Artist name
* %y Year
* %g Genre
* %c Comment field

Directories may be created with this command, as in "%b/%n - %t". The default value of FORMAT is "%n %t".

Bitrate/Quality/Compression options:

-b or --bitrate
mp3/ogg/m4a bitrate.
-q or --quality
mp3/ogg quality.

quality and bitrate are passed directly to lame or oggenc depending on mp3 or ogg output format respectively. Both tools can handle either a bitrate or quality argument, so it is important to understand what values are valid for the underlying tool in your specific use case. faac will accept a bitrate argument, but not a quality argument. These options will be silently ignored for any output formats other than mp3, ogg or m4a. Make sure you know what you are doing if you decide to use both in one run, and read each tools manpage for valid values. If these options are omitted the tools builtin defaults are used (-q3 for oggenc and -q5 for lame).

-c or --compression
flac/mac compression level.

this option allows you to pass a compression argument to flac and mac. See 'flac --help' and/or 'mac --help' if you don't know what this means.

Format Options:

--out=format
output format. Default is wav.
--in=format[,format..]
input format(s). Default is wav.

Valid output formats are: "aac", "aif", "aifc", "aiff", "aiffc", "ape", "au", "cdr", "cdda", "copy", "flac", "m4a", "m4b", "mpc", "mp4", "mpp", "mp3", "mp2", "ofr", "ofs", "ogg", "snd", "spx", "tta", "wav", "wv". Valid input formats are all of the above plus "wma". You can specify multiple input formats using a comma: 'mp3,m4a,wma'. Input format is only neccesary when passing directory arguments, as file arguments are handled by context (read: file extension). The "copy" output option copies files directly, bypassing decoding/encoding steps (useful in conjunction with --rename).

Tagging Options:

--tt or --title
Set 'title' tag.
--ta or --artist
Set 'artist' tag.
--tl or --album
Set 'album' tag.
--ty or --year
Set 'year' tag.
--tc or --comment
Set 'comment' tag.
--tg or --genre
Set 'genre' tag.
--tn or --trackn
Set 'track number' tag.

The short and long versions are different in an important way: Using the long version will clobber any existing tags. The short version will only set the tag if the existing tag has no value. Note that these tags will be placed in _every_ outfile during the run.

Alternative Encoder/Decoder Options:

--gogo
use gogo to encode mp3 files.
--bladeenc
use bladeenc to encode mp3 files.

The default is still 'lame'. If 'lame' is not found, the script will search for one of these two encoders regardless if these options are passed or not.

Special Options:

--in-optionhook=ARG
add ARG to infile conversion command. Possibly dangerous!
--out-optionhook=ARG
add ARG to outfile conversion command. Possibly dangerous!

These two options are a hook to pass additional options to the underlying conversion tools. ARG is passed directly to the shell (right after the command name) so escape it if neccesary. The underlying tool will depend on input and output format, for example, if --in is ogg and --out is mp3 then --in-optionhook's value would get passed to oggdec and --out-optionhook's value would be passed to lame. Using these options are at your own risk, and bug reports involving them will be ignored.
Example usage:

$ sneetchalizer song.mp3

The most simple possible example, creates 'song.wav'.

$ sneetchalizer --out=ogg --in=flac -q5 /some/music/dir

This example converts every flac file in '/some/music/dir' to ogg format at quality 5.

$ sneetchalizer -d --out=mp3 --in=ogg,m4a,wma -b 160 .

Converts every ogg, m4a, and wma file in the current directory to a 160 kbps constant bitrate mp3 file. The original files are deleted.

$ sneetchalizer --out=mp3 --out-optionhook="--preset extreme" /some/wavs

Here we encode every wav in '/some/wavs' to mp3 format passing '--preset extreme' directly to lame.

$ sneetchalizer --in=ogg --out=ogg --quality=1 norvegianWood.ogg /some/more/oggs

Using the same --in and --out format allows us to resample/encode the file at a different bitrate or quality. Note that this will overwrite the original file so only do this on a copy, or use '-D' to write files to another directory.

$ sneetchalizer --in=ogg --out=m4a -D /mnt/ipod/ /some/oggs

Here we re-encode some ogg files to m4a format and write them to our mounted iPod.

sneetchalizer

The sneetchalizer is a Ruby script which converts between several different audio file formats and tries to preserve meta tags if they exist or create them if they don't. The script can handle any number of file and/or directory arguments. sneetchalizer is the glue that binds together various audio encoders/decoders:

lame
for mp3 encoding/decoding (MPEG-1 Audio Layer 3)
gogo
for mp3 encoding (MPEG-1 Audio Layer 3)
bladeenc
for mp3 encoding (MPEG-1 Audio Layer 3)
oggenc and oggdec
for ogg encoding/decoding (Ogg Vorbis)
faac and faad
for m4a, m4b, mp4 and aac encoding/decoding (MPEG-4 Part 14)
flac
for flac encoding/decoding (Free Lossless Audio Codec)
mplayer
for wma decoding (Windows Media Audio)
mac
for ape encoding/decoding (Monkey's Audio)
mppenc and mppdec
for Musepack encoding/decoding
wavpack and wvunpack
for Wavpack encoding/decoding
speexenc and speexdec
for Speex encoding/decoding (Note: you must build with "Ultra-wideband" support for this to work)
ttaenc
for True Audio encoding/decoding
ofr and ofs
for OptimFROG and OptimFROG DualStream encoding/decoding
sox
for aif, au, cdr and mp2 encoding/decoding

* You can retrieve mp3 id3 tags if you install Guillaume Pierronnet's ruby-mp3info library, Robin Stoker's id3lib-ruby library, or Tilo Sloboda's ID3 library for Ruby. They will be searched for and used in that same order.
* You can retrieve wma meta-tags if you install my wmainfo-rb library (>= 0.3).
* You can retrieve flac meta-tags if you install my flacinfo-rb library.
* You can retrieve m4a/aac et al meta-tags if you install Jason Terk's MP4Info library.
* You can retrieve ogg meta-tags if you install Guillaume Pierronnet's ruby-ogginfo library.
* You can retrieve ape, mpp, mpc, ofr, ofs, tta, and wv meta-tags if you install Jeremy Evans' ruby-apetag library.

You can view the source code.

My Microsoft rant

Well, I wanted to put in my two cents and write a bit about Microsoft and my beliefs on them in general. Please note that these are _my_ opinions. Your opinion may differ, and that is the beauty of free will. If you feel the need to send me an email and flame me, please be advised I will post your letter here and make fun of you. Why? Because this is _my_ website, and I think this is a perfectly reasonable place to place my opinions. You are not going to change my mind, or convice me of the greatness of MS products. I don't expect that these words will change your mind. If you want to write your opinion then get your own website. Easy as that.

So if you haven't figured it out yet, I do not care much for Microsoft (hereafter "MS"). It is not my intention to list every single flaw with MS, because there are many sites that do this already. I want my discussion to be a bit more general, and a bit less specific. There are generally three reasons why I don't like MS. First, their software is shit in the areas of security, and overall quality in general. Second, I don't like their predatory business practices. And third, they gouge their customers and treat them like shit.
Quality of MS software and Security

It is no secret that MS products are bug-ridden, easily compromised, and generally of low quality by any measure. Indeed, the 'crashability' of MS products has become something of a joke in the computing world. To be fair, all software written by humans will have bugs in it, but MS seems to go that extra mile to bring you the most, and the very greatest for your money. And worse, when discovered, MS has a nasty habit of ignoring these bugs, or at least selectively deciding which to fix. Sometimes they keep their bug fixes in-house, and eventually release them as a new OS (Win 95 -> 98 anyone?), which of course you have to pay for. Many well-respected security monitoring sites have stated that people should stop using MS Internet Explorer entirely because of the swiss-cheese security and reluctance of MS to fix the problems (Don't worry, the bugs will be fixed when MS releases 'Longhorn' in the next five years). To me, it seems incomprehensible that a company with $50 Billion in the bank cannot hire a few people to clean up these security issues (or just write decent code in the first place) while there are several operating systems with much better security records that are maintained by volunteers. Clearly, the price of something does not signify any measure of quality.
Predatory business practices

MS is a predatory monopolist twice convicted of anti-trust laws. Would you buy a product from any other company with this sort of record? MS was found guilty and sentenced, but because they bought off the US Department of Justice they walked away with little more than a slap on the wrist. MS has been sued successfully many, many times for various degrees of illegal business practices , but because of their deep pockets MS will typically just settle out of court for a tidy sum (...to you and me, but peanuts to them). Even when convicted and punished, MS has an almost machiavelian ability to turn it to their advantage (from Slashdot):

Microsoft has be fighting tooth and nail for years to finish off apple in the Educational market. This is brilliant. They take their fine, pay it in software whose value has been bloated by the monopoly ($100 dollars for a wordprocessor, wtf?), and get thosands (millions?) of schools teaching the next gen of lusers to use Microsoft, and only Microsoft ... It's amazing how Microsoft has turned every aspect of this trial to their advantage. I'd be sickened if it wasn't so impressive...
source

It is obvious that MS has been backing a farsical lawsuit by soon to be extinct shills SCO about supposed IP violations in the Linux kernel. Indeed MS has a long history of anti-competitive behavior towards real or imagined threats to their empire. MS has shown that they are not above misleading advertising campaigns that try to dupe consumers. In another controversial move, MS decided to buy Giant, a small company that makes anti-spyware apps. So MS rebrands the product, and may decide to sell it. (Note: MS is still releasing this product for free as of March 2006, however, virus writers have already written a trojan that disables the software, and there have been some reports that the program reports and removes legitimate software as spyware) . Can you say conflict of interest? How about racketeering? Would you pay for a product from any company whose sole purpose is to fix problems with another product from the same company that you already bought? Sheesh. It remains to be seen if, and for how much MS will sell this for, but given their track record it seems a certainty.
Customer or serf?

A sad fact is that MS employs some of it's most desgusting tactics on the people who made them what they are ... thier customers. One example in particular is how MS makes their products non-backwards compatable. Can't view your Office 95 docs in Office 97? Tough, get an upgrade. Rather than owning your _personal_ documents "What we will get with Microsoft is a three-year lease on a health record we need to keep for 100 years."

But while we're on the subject of file formats, let's pause for a moment in frank admiration of the way in which Microsoft brazenly built backward-incompatibility into its product. By initially making it virtually impossible to maintain a heterogenous environment of Word 95 and Word 97 systems, Microsoft offered its customers that most eloquent of arguments for upgrading: the delicate sound of a revolver being cocked somewhere just out of sight.
-Dan Martinez source

MS loves money, and to keep it coming in they need to force their customers into a perpetual upgrade cycle. Unlike most companies, what you buy from MS isn't yours for life, rather you pay to 'borrow' it until MS end-of-lifes it and forces you to pay to borrow a 'new and improved' version. Now let's talk about the Windows EULA , or as I like to call it ... your passport to serfdom. Did you know that when you run windows you give MS administrator privilege on _your_ computer to install and change whatever they want? Do you think if your software crashes, or is otherwise defective you have any sort of recourse? No, the EULA states that your new XP software isn't guaranteed to work at all:

12. DISCLAIMER OF WARRANTIES. The Limited Warranty that appears above is the only express warranty made to you and is provided in lieu of any other express warranties (if any) created by any documentation, packaging, or other communications. Except for the Limited Warranty and to the maximum extent permitted by applicable law, Microsoft and its suppliers provide the Product and support services (if any) AS IS AND WITH ALL FAULTS, and hereby disclaim all other warranties and conditions, either express, implied or statutory, including, but not limited to, any (if any) implied warranties, duties or conditions of merchantability, of fitness for a particular purpose, of reliability or availability, of accuracy or completeness of responses, of results, of workmanlike effort, of lack of viruses, and of lack of negligence, all with regard to the Product, and the provision of or failure to provide support or other services, information, software, and related content through the Product or otherwise arising out of the use of the Product.

Did you know that you are sending your personal information to secret MS servers for unknown purposes? Did you know that your XP box mysteriously 'phones home' to report your private HDD searches and which DVDs you watch to MS headquarters?

Consent to Use of Data. You agree that Microsoft and its affiliates may collect and use technical information gathered in any manner as part of the product support services provided to you, if any, related to the Product
Microsoft may use this information solely to improve our products or to provide customized services or technologies to you. Microsoft may disclose this information to others, but not in a form that personally identifies you
Internet Gaming/Update Features. If you choose to utilize the Internet gaming or update features within the Product, it is necessary to use certain computer system, hardware, and software information to implement the features. By using these features, you explicitly authorize Microsoft or its designated agent to access and utilize the necessary information for Internet gaming and/or updating purposes. Microsoft may use this information solely to improve our products or to provide customized services or technologies to you. Microsoft may disclose this information to others, but not in a form that personally identifies you

Positive remarks

So, after all that is there anything nice I can find to say about MS? Well, they did help (to a huge degree) to spur on the PC revolution. Anyone who's anyone has a PC at home with a net connection. This is for a large part because they made it so damn easy to point and click your way through any task. Anecdotally, I have heard that Windows XP is considerably better than past versions in terms of stability, however I would still never run it because of the privacy issues I touched upon earlier. And also, every once in a while, I just have to admire them for their frighteningly clinical manueverings and business practices to poise themselves as probably the most successful capitalist venture in modern history. Then I bit my lip and remember, they're evil, Evil, EVIL!!!
Links for more reading

http://www.dcd.uscourts.gov/ms_tuncom/major/mtc-00030616.htm
http://news.osdir.com/article469.html
http://www.catb.org/~esr/halloween/
http://www.epic.org/privacy/consumer/microsoft/
http://www.futurepower.net/microsoft.htm
Anagrams

And just to show how childish I am, here's some amusing anagrams of "Microsoft Windows" courtesy of the Internet Anagram Server, with punctuation embellishment of course:

Disc not so firm, wow!
Disco fit: Worm owns.
WIN Soft: Disco worm.
To disc if worms won.
Disc info: Worm stow.
Disc info: MS rot. Wow!
Disc foist, worm won.
Disc fit: Worm own OS.
Disc of sin. Worm two!
Disc of MS Win rot. Ow!
Disc of writ: MS Own. O!
Disc of its worm now...
Disc isn't for mo' wow!
MS doc if I own worst.
If in MS, doc rots. Wow!
IF WIN doc: Worm toss!
Doc foists WIN worm.
Doc fit: Is worm sown?
Doc of MS WIN is wort.
Coif Windows, Mr. Sot.
It conforms widows.

...and the strangely zen:

Is Windows comfort?
Discomfort, WIN sow.

A Plea for Free Software in Schools

open-source initiatives

I live in Penticton British Columbia. Like a lot of places in North America, Penticton and other towns in this area are faced with cash-strapped school districts whom are forced to cut the budget any way they can. Often this means closing schools, jamming kids in already overcrowded classrooms, and worst of all, laying off teachers and support staff. This is no way for our kids to learn.

There is another solution, and it is as simple as changing the software running in our school's computer labs. I am not going to contend that this is a solution to all our problems, but if it can save but one teacher's job, is it not worth it?

You may have heard of Linux, or perhaps you may not have. Linux is an operating system (OS), more to the point, it is a very good operating system. It is stable, secure, feature rich, and easy to learn. It is also free. Most schools use either Microsoft Windows, or one of the Macintosh OS's. This is because when schools started creating computer classes and programs, these were for the most part the only choices available. The problem is that these products are expensive, and require sacrifices in our school budgets to deploy. While Macintosh OS's are very good products, they are proprietary, and require special hardware to run. Windows however, is not a good product. It is unstable and it is not very secure. Windows has spawned a multi-million dollar anti-virus software industry just to address fundamental design flaws in Windows software.

The point here is not to bash Windows (although they make it so easy!), but rather to educate people on alternatives. Linux has come of age in the last few years, and is now at the point where it is the perfect replacement. Linux is able to run on standard low-cost hardware that your school likely already has. This is not to say that Linux is a "cheap" alternative to save budget dollars. Linux is a great educational tool that will provide your children with skills of lasting value. To really understand this, you must understand the difference between 'proprietary' and 'open-source' software models (read on. . .).

You do not need to look far to find a success story of a school running Linux. School District #73 (Kamloops) has had much success with their pilot program, you can read more about their experiences with Linux.

Best of all, there are many great organizations, people, and resources to help you make informed decisions. Here are a few to get you started:

* http://k12ltsp.org/classroom.html: A quick tour of a Linux classroom
* http://www.k12ltsp.org/ : A resource website that explains the benefits of using Linux in the classroom.
* http://www.redhat.com/opensourcenow/intro.html : RedHat Linux's contribution to the cause.

My name is Darren. I am a member of the South Okanagan Linux Users Group (SOLUG). I am willing to help in any capacity to work towards getting Linux in our local schools. I will also help any non-profit organization towards the same ends. If you have questions or comments, please drop me a line at bulliver@badcomputer.org
open vs. closed source

Computers are dumb machines. That is, they require meaningful instructions from humans in order to make them useful. These instructions come in the form of software, and all software is created from source code. This code is written in a programming language, such as C, C++, Pascal, or Fortran (among others). This code is then compiled into a binary, which is simply a completed working program in a form which the computer can understand.

In a closed source model (proprietary) this code is developed by a team of software programmers who compile the code and distribute it in binary form, without the end-user having a chance to see it. This is of little concern to the average user, who most likely cannot understand the source code anyway, but it has huge ramifications for society in general.

Closed software hides its inner workings from the general public, and locks personal data in proprietary formats. It is scary how many government agencies use proprietary software. Using Microsoft as our example, this means that some governments are getting a two or three year 'lease' on data they need to keep for hundreds of years (eg: birth and death records). How is this so? There is nothing to stop Microsoft from changing the format in which data created using their software is saved (and they do!). Microsoft changes their Word format (.doc) every so often requiring people to update their software (read: buy new software) to use their own files in perpetuity.

Teaching our children to blindly purchase and use proprietary software is misguided at best: teaching them on Microsoft products does little more than teach them to use said Microsoft products. Does this have lasting value? Perhaps until Microsoft changes their code once again and markets it under the guise of 'improved' software.

Educators are encouraged to instill values such as free speech to our children, and this is where open-source software fits in. Non-proprietary code is the equivalent of free speech when it comes to software. It is distributed (often at no cost) with the source code included, available for public audit. This allows anyone to inspect the software, and in fact it is usually encouraged so that the software may be improved upon. Open-source software is developed by the equivalent of the scientific method, allowing open testing to ensure its quality and growth.

Students must have the ability to discover how their 'tools' (software) work, given the curiosity and enthusiasm they most likely exhibit. They must not be taught to use closed-model tools, and be limited by what tasks and choices the proprietary GUI allows them. It should not be hard to convice teachers and educators the value of the open-source approach. It comes down to the ageless "teach a man to fish, and he eats for a lifetime" parable.

What does this have to do with Linux? Linux is open-sourced. It is non-proprietary. And it is free, in every sense of the word. You can inspect the very code of the working kernel itself, and learn what makes it tick. This is an invaluable learning tool for those children who may be interested in a career in the IT industry. It will also teach students lasting values which they may carry with them in any pursuit.

Linux allows you to install the software, and upgrade it for free. Bug-fixes and security flaws are reported and often fixed within hours. By contrast, Windows costs money to buy and install. Upgrades will also cost you, and you must purchase a license for every computer you want to install it on. It is truly disgusting how much money cash-strapped school systems have to spend on software to a company that already has billions of dollars in assets. With Windows, bug fixes and security flaws are not dealt with until the next scheduled release date, which may be years. Windows 98 was little more than a bug fix for Windows 95, but because nobody can inspect the source, there was no public accountability to document what had actually changed. This allowed Microsoft to market Windows 98 as an 'improved' OS, and charge for it.

If you think you can stick with the current version of Windows you are using, don't be too sure. Microsoft has many side-deals with software and hardware manufacturers to ensure that new products will not be compatible with old versions of Windows, thus forcing an upgrade. This is not paranoid subjecture, I only wish it were. Strong-arming third party companies to do things Microsoft's way is the very reason that Microsoft was forced into court by the US Department of Justice on anti-trust charges. Have you noticed that Internet Explorer 6.0 is not available for Windows 95? And in fact Microsoft has recently announced product 'life cycles' in which the software will no longer be supported. Windows 95 has already reached the end of its life. Windows 98 meets the executioner in two years.

Even more frightening is the new Windows XP 'features' in which the product 'phones-home' to relay your personal information and computer habits to Microsoft HQ for its own unknown purposes. This takes place behind your back, and without your consent. Although this practice is legal (do you ever read your license agreement?) it is quite obviously morally repugnant. There is a good treatment of this issue in this article. Anyone who uses XP or is considering using XP should read it.

You may want to stick with Microsoft because it is widely used and supported. It is only this way because Microsoft was intrumental in bringing personal computers to the forefront. It is faulty logic to stick with an inferior product simply to maintain the status-quo. You would be appalled at the thought of a 'one-party' political system, in which you may vote for whomever you want, but for the fact that they represent the exact same interests and ideals. How would you feel about one phone company, one food retailer, and one automobile manufacturer, each with the same ability to set prices for their products according to their whims? Monopoly is antithesis to the standards and freedom that we as humans deserve and expect. So why do we allow it when it comes to our computers?

We are on the cusp of an information age, the effects of which have not been seen since the Industrial Revolution itself. If we continue down the road we're on we are destined to have this information age corrupted and stained until it is as stagnant and bleak as the Dark Ages. I for one, will not settle for being a peasant working to make the fuedal lord wealthy, and niether should our kids.

Changes

0.9.3 :: July 19, 2006

WMA meta-tags are now preserved if you install my own wmainfo-py library. I have also fixed the '-q' argument so that it may accept any value that is valid for oggenc (ie: '-1' to '10', and decimals: '3.7'). Also, have changed the default -q arg from '4' to '3' to match oggenc's default.
0.9.3_pre1 :: May 21, 2006

Version 0.9.3_pre1 has wma support thanks to a patch from Cameron Stone (camerons AT cse.unsw.edu.au).
0.9.2 :: December 15, 2005

This is 0.9.2_pre1 with a few minor fixes.
0.9.2_pre1 :: September 29, 2005

This is a testing release. It includes support for recursive directory conversion, and also support for embedded id3 tags in m4a files. Please beta test if you can. Barring a showstopper bug, this will be rolled out as dir2ogg 0.9.2.
0.9.1 :: April 1, 2005

This release allows multiple directories to be specified on the command line. Also, there is now support for the 'track number' id3 tag. It will show up as either '5' which shows track 5, or '5,17' which shows track 5 of 17 on the original album.
0.9 :: January 27, 2005

The changes between 0.9 and 0.9pre1 are trivial, so everything below applies to 0.9. To reiterate, your filename _may_ be changed, and error checking for mpg123, oggenc, and faad is included. Have fun!
0.9pre1 :: December 9, 2004

In dir2ogg 0.9pre1 the special characters '"', '*', '!', and ';' will be removed from filenames. The special character '&' will be converted to 'and'. These characters are known to break the script when fed to bash. If you don't like the idea of this script changing your filenames that's fair enough, but I submit these characters have no business being in proper unix filenames anyway. If I get the time I will try to change this so they are escaped rather than removed.

Also in this version, the exit status of mpg123, faad, and oggenc is checked, and should be handled apropriately. This means if you are using the 'x' or 'a' flags, your original file won't be deleted if mpg123 throws an error. Something you would expect of course, but with me it takes time for such 'features' ;)

And finally after two years I added some sanity checks on the filename/directory arguments passed to the script. So now if you mistype a filename you will get a stern warning about your file not being found from dir2ogg instead of a 50 line traceback from python.
0.8 :: September 27, 2004

dir2ogg 0.8 is pretty much a re-write from scratch. The original dir2ogg was not much more than an exercise for me. I was "scratching an itch" as ESR might say. I found myself converting mp3s to oggs quite frequently, and thought that others may be doing this as well, which is why I released dir2ogg in the first place. As my skill in Python increased, I added more features to dir2ogg...and the more I added to my original code the cruftier it got.

dir2ogg is now object-oriented instead of procedural. In addition to hundreds of unseen advantages, this will allow me to add new features in the future easily and cleanly. Along with a base of cleaner and more efficient code, dir2ogg 0.8 includes these benefits:

* Full support of GNU style short and long options.
* Ability to specify multiple filenames on the command line.
* In the absence of 'real' ID3 tags, scratch tags are created for all files.
* Coloured output to easily tell dir2ogg's output from oggenc's, faad's and mpg123's output.
* Many small bug-fixes.

0.8pre1 :: September 23, 2004

I am putting the finishing touches on a complete re-write of dir2ogg. Version 0.8 is going to be vastly superior to 0.7 for many reasons including full support for GNU-style long and short command line options, extensive exception handling, improved program logic, the ability to specify multiple files on the command line, and many, many more.
0.7 :: August 23, 2004

Version 0.7 has support for converting m4a and wav files to ogg format. To convert m4a files you will need faad installed. This version also fixes some bugs, including adding uppercase file extensions to the list of files to be converted ie: MP3, M4A, and WAV. Even if you don't intend to convert m4a files, you should still use this version.
0.6 :: May 24, 2004

This version introduces new command line flags. Deleting the .wav and .mp3 files is now user-controlled, there is an option to preserve the shell-protected filename, and there is also a verbose flag. Plus the '-dir' flag is now obsolete. Please us 'd' instead. NOTE: the new command line option flags do not need to be preceded by a dash. There cannot be any spaces between options on the command line. See Installation and Usage below...
0.5 :: May 14, 2004

dir2ogg 0.5 is in the Ibiblio Linux Archive.

dir2ogg now allows spaces in your filenames. The script uses sed to convert spaces to underscores, the conversion is made, then the underscores are reverted back to spaces. This is not fool-proof however...some special characters will cause the script to break. dir2ogg tries to deal with this gracefully, but I cannot anticipate every filename possible (there are some doozies when downloading mp3s from windows users ;)). Generally, if you use sensible filenames this will not be a problem for you. Keep in mind that you will still have to escape the filenames for bash ie: dir2ogg "song with spaces.mp3". Using "dir2ogg -dir ." will work fine however. Please read the updated manpage for more details.
0.4 :: October 8, 2003

I have bumped the version number up to 0.4 to reflect its 'stable' status. For almost everyone this is the version you will want to use. Also of note: dir2ogg is now a part of the Ibiblio Linux archive. It's home will always be this page, but my site is not always up...so you will always be able to get it from Ibiblio.

download dir2ogg

Older versions:

* dir2ogg version 0.9.3 : Released July 19, 2006. [md5]
* dir2ogg version 0.9.3_pre1 : Released May 21, 2006. [md5]
* dir2ogg version 0.9.2 : Released December 15, 2005. [md5]
* dir2ogg version 0.9.2_pre1 : Released September 29, 2005. [md5]
* dir2ogg version 0.9.1 : Released April 1, 2005. [md5]
* dir2ogg version 0.9 : Released January 27, 2005. [md5]
* dir2ogg version 0.9pre1 : Released December 9, 2004. [md5]
* dir2ogg version 0.8 : Released September 27, 2004. [md5]
* dir2ogg version 0.7 : Released August 23, 2004.
* dir2ogg version 0.6 : Released May 24, 2004.
* dir2ogg version 0.5 : Released May 14, 2004.
* dir2ogg version 0.4 : Released October 8, 2003.
* dir2ogg version 0.03 : Released September 12, 2003.
* dir2ogg version 0.02 : Released a while ago ;)
* dir2ogg version 0.01: crusty old shell script version. Only included here to elicit flames. Released many moons ago...

* dir2ogg-0.9.3.ebuild
* dir2ogg-0.9.1.ebuild
* dir2ogg-0.8.ebuild

* dir2ogg-0.9.2.i386.rpm
* dir2ogg-0.8.i386.rpm

about badcomputer.org

the website
picture of my badcomputers

I've had some sort of a website up now for the last 7 years. Now that I have my own domain (for at least the next 5 years) I rather suspect I will be here until I decide to no longer maintain a website. As mentioned at the bottom of most pages, I try my best to use only standards compliant XHTML and CSS. Sometimes I forget to revalidate after changing/adding things, so if something doesn't validate please let me know and I will change it. The backend is all PHP and MySql. Really not much going on in the backend other than a page template and the comments feature on the main page. The 'uptime' stats provided at the bottom of major pages is created by a version of uptime I wrote in C as an exercise.

Getting back to CSS, one of the coolest feature is the ability to serve a different stylesheet to different media. For example, you may want to print one of my pages, but hesitate because of the background images. Well don't worry about it because CSS allows me to have a built in "printer friendly" page, by designing a second stylesheet for printing. Go ahead and try a print preview, you will see only a white background, and sensibly formatted text. Any page on the site...

One of the side effects of using compliant code is that Internet Explorer brutalizes the layout and makes my pages look like a pile of crap. I'm using only CSS1 code that became a standard in 1996?!?!? C'mon $MS, get your shit together. Additionally, IE doesn't know how to deal with transparent png images, something every other browser I've tried can do. To be honest my site is displayed properly by every single browser I've tried *except* IE. Even Dillo and Lynx do an excellent job of rendering my page, because they know their own limitations and play it safe. If you people are still using Internet Explorer, please, go get Mozilla-Firefox or Opera already. Me, I'll just stick to my Konq.
the network

I started with a simple Duron 950, and now badcompter.org has expanded to 8 different machines: (which combine for a total of 10 processors, 7806MB of RAM, 1281GB of disk space, 5 DVD drives, 4 CD burners, and 2 CDROMs)
virgo.badcomputer.org

* AMD Athlon XP 3200+ (2191.061Mhz)
* 1536MB RAM
* (Asus) nVidia Corporation GeForce FX 5700 (256MB video RAM)
* Creative Labs SB Audigy
* 2 x 200GB WD Caviar IDE HDD
* LG DVD-ROM optical drive
* LG CD-RW optical drive
* 2 x Mitsubishi Diamond Pro 930sb 19" flatscreen CRT monitor
* Intel gigabyte ethernet

Virgo is my main workstation. I built this computer from (new) parts in November of 2004. I mainly boot Gentoo for my daily work (and play), but this machine also boots FreeBSD 5.3, Slackware Linux 10, and SuSe Professional 9.1 for when the spirit moves me. The dual head is kick-ass, and the 2560x1024 resolution is huge. 'Virgo' is of course named after my astrological sign. This box has proven itself very worthy and has handled everything I've thrown at it. I can watch a fullscreen DVD in one monitor, and check mail or browse the web in the other. Though, on the downside it takes up a hell of a lot of desk space.
picture of eden
eden.badcomputer.org

* 2 x PowerPC G5 2.0Ghz
* 1536MB RAM
* ATI Radeon 9600 Pro (64MB video RAM)
* WD 160GB SATA HDD
* Seagate Barricuda 250GB SATA HDD
* Pioneer DVD-RW Super drive
* Builtin TE soundcard
* Builtin 1000mb ethernet
* 23" Apple Cinema display

Well again, I have to say that Apple makes some beautiful hardware. This thing is just a pleasure to look at. I just wish OSX was better. What can I say, I just don't like it that much. Too polished and cutesy. However, I keep this around because I use Final Cut to do my DV editing, and I sometimes use Inkscape on this box for drawing maps. The monitor is also beautiful, and it is a pleasure to watch movies on. This one dual-boots OSX Tiger and Gentoo Linuc PPC64.
nina.badcomputer.org

* AMD Athlon XP 2200+ (1792.694Mhz)
* 1024MB RAM
* nVidia Corporation GeForce2 MX 400 (64MB video RAM)
* 40GB Maxtor IDE HDD
* 80GB Samsung IDE HDD
* Generic DVD-ROM optical drive
* Generic CD-RW optical drive
* Creative Labs SB Live!
* Dell Trinitron 19" flatscreen CRT monitor
* Intel gigabyte ethernet

Nina is pretty much the first computer I ever bought for myself. I cannot remember the exact date, but it has to have been sometime in 2001. I upgraded the 512MB RAM that it came with, and swapped out the Duron 950 which is now in vyvyan with the 2200+ a couple years ago. This box has run many different Linux distros over the years, but now runs Arch Linux with a 2.6 kernel solely. As it stands now, Nina is a file and print server. I export my ~36GB of media files to all my other boxes using NFS. Attached is an HP OfficeJet printer that is available to the network through Cups. Generally this box isn't running X, but it makes a great internet 'kiosk' and secondary workstation for when I have guests that want to check their mail or whatnot. Nina is named after my favorite female jazz singer: Nina Simone.
vyvyan.badcomputer.org

* AMD Duron 950 (950.241Mhz)
* 768MB RAM
* 3GB Quantum Fireball IDE HDD
* 80GB Samsung IDE HDD
* Generic CD-ROM optical drive
* 2 x 10/100 Ethernet
* Intel gigabyte ethernet

Vyvyan is basically new parts put together with Nina's old Duron 950 that sat on a shelf for a couple years. I had to really look around for a mobo that could still do a FSB speed of 133Mhz necessary for the 950. This box is my web and mail server. For web I use Apache 2 and for mail I use Exim 4. Vyvyan runs Gentoo Linux with a hardened 2.6 kernel. Yes, I run Gentoo on a server, it has actually treated me quite well, but let's face it, this is no mission-critical type workload. This box is headless, and sits in a closet with an UPS and my hub. Vyvyan's name is a nod to Oscar Wilde.
picture of dragon
dragon.badcomputer.org

* Athlon XP-M 2200+
* 512MB RAM
* nVidia GeForce MX (32MB video RAM)
* nVidia nForce audio
* 15.4" LCD display
* 40GB IDE HDD
* Combination DVD/CD-RW optical drive
* Broadcom 802.11g wireless adapter
* Netgear Cardbus 802.11g wireless adapter
* 10/100 ethernet

This is my laptop, it is a Compaq Presario R3000ca. After a lot of false starts and different distros I have settled on running Gentoo (go with what you know...) on this box, and it is now treating me quite well. The wireless works great and with so many people running unsecured wireless APs finding internet connectivity on the road and around town is no problem. I can use the Broadcom for connectivity, and use the Netgear for proper wardriving with kismet at the same time. The combination DVD/CD-RW on this thing is super cool, and makes this computer a great DVD player for in the car and on the road, or anywhere else you want to watch a movie. In keeping with the horoscope theme, dragon is named for the Year of the Dragon 1976, the year I was born.
picture of sparc
sparc.badcomputer.org

* 2 x Sun UltraSPARC-II processor at 360Mhz each
* 1024MB RAM
* 2 x 9GB SCSI HDD
* SCSI CD-ROM optical drive
* Sun 'happy-meal' 10/100 ethernet
* WS Creator 3D PCI video adapter
* Sun/Sony GDM-5410 21" flat screen monitor


I picked up this Sun Ultra 60 on Ebay for dirt cheap. I always wanted to have some Sun hardware to play with. This guy isn't the speediest but is still quite peppy despite its age. Sparc is just the name of this thing until I can think of something more clever. Right now it dual-boots Solaris 10 and Gentoo Sparc 64 (which I might add, seems to be quicker than Solaris on Sun's own hardware). I am happy to say it has a Sun happy meal ethernet adapter for which the driver source code is surely one of the funniest in the Linux kernel (read it at /usr/src/linux/drivers/net/sunhme.c).
picture of charon
charon.badcomputer.org

* PowerMac G4 400Mhz processor
* 1152MB RAM
* 10GB WD Caviar IDE HDD
* 200GB Seagate Barricuda IDE HDD
* Pioneer DVD-RW DVR 109 optical drive
* 10/100 ethernet
* Apple? sound card
* ATI Rage128Pro AGP video adapter (16MB)
* Apple "Graphite" Studio Display 17" CRT monitor


Well, I had to get a Mac to play around with too. This is another cheap score from Ebay. I have to admit that Apple makes some kick-ass sweet hardware that looks good, and runs smooth. I used this one as a desktop until I got the G5. Now charon is a router/firewall that runs Gentoo PPC. I bet this is one of the sweetest looking routers out there ;). charon is named after the boatman of the river Styx.
oxygen.badcomputer.org

* R5000 V2.1 Mips precessor
* 256 MB RAM
* Seagate ST373307LC 87GB SCSI HDD
* IBM DGHS09Y 10GB SCSI HDD
* SGI MACE Ethernet

Here's another Ebay special. It is an SGI O2. This thing is slow as all heck (takes 5 minutes to boot IRIX) but what the hey. I wasn't expecting anything more. Not sure if this thing even can dual-boot yet, but if it can you can be sure that I'll be putting Gentoo on it.

Code

I am not a developer by any stretch of the imagination but I have written a few things that someone may find useful. It is starting to become quite a few things, so I have created a separate page for all the software I have written.

I also have a page with poems written in programming languages. I had hoped people would send in submissions but it hasn't happened yet. Maybe someday...

quick and dirty guides

Quick and dirty guides are shorter than howto's, but easier to understand than manpages. I hope to write lots on all sorts of topics. If you have a topic you want to see a quick and dirty guide for than drop me a line. If it's something I actually know about you just might see it here.

The quick and dirty guide to:

* UNIX file permissions
* tar, gzip, and bzip2
* installing Gentoo on the Compaq Presario r3000

Bash one-liners

Here are a few bash one-liners that you may find useful. All are written by me unless otherwise noted.

This one converts the symbolic permissions to octal (ie: numbers) when using 'ls -l':

ls -l | sed -e 's/rwx/7/g' -e 's/r--/4/g' -e 's/r-x/5/g' -e 's/rw-/6/g' -e 's/---/0/g'

Running in your home directory you may see something like:

total 1637
d700 3 bulliver wheel 128 Oct 3 2003 Desktop
d700 11 bulliver wheel 1296 Jun 14 15:02 Mail
-644 1 bulliver users 1015742 Jun 13 15:05 TICPP-2nd-ed-Vol-two.zip
d755 4 bulliver users 232 Jun 13 02:06 assembly_utils
d755 2 bulliver users 1712 Jun 12 02:01 c
d755 2 bulliver users 656 Jun 7 14:26 c++
-600 1 bulliver users 252785 Jun 7 23:25 channels.txt
d755 3 bulliver users 328 May 24 21:30 dir2ogg
-644 1 bulliver users 6451 May 30 00:08 dmesg.txt
d755 2 bulliver users 136 Jun 9 12:45 iso
d755 2 bulliver wheel 1352 Jun 8 14:24 kernels
d755 22 bulliver wheel 1624 Jun 13 18:40 local_docs
d755 2 bulliver users 216 Sep 23 2003 minix
d755 2 bulliver users 456 Jun 9 11:58 pdf
d755 2 bulliver users 320 Jun 13 23:43 perl
d755 4 bulliver users 1016 Jun 13 19:25 python
-644 1 bulliver users 154713 Jun 10 00:15 shot0001.jpg
-644 1 bulliver users 22252 Jun 11 00:29 snake.asm
d755 6 bulliver users 488 May 18 03:10 source
d755 6 bulliver wheel 208 May 3 15:26 xml

Here's one to find your IP address. It was not written by me, I gleamed it from linuxquestions.org. I will try and credit the author here soon:

lynx -dump http://whatismyip.com | awk '/Your/ {print $4}'

These next two match email addresses and hypertext links respectively:

grep -o "[-_a-z0-9\.]*@[-_a-z0-9\.]*\..\{2,3\}" file grep -o "http://[-_a-z0-9\.]*\..\{2,4\}[-_a-z0-9\.]*" file

We can use this to, say, grab the email address of all the kernel maintainers (please don't spam them...):

grep -o "[-_a-z0-9\.]*@[-_a-z0-9\.]*\..\{2,3\}" /usr/src/linux/MAINTAINERS | sort | uniq

or get all the slashdot article links without going to slashdot:

lynx --dump http://slashdot.org | grep -o "http://[-_a-z0-9\.]*\..\{2,4\}[-_a-z0-9\.]*" | sort | uniq | grep -v slashdot.org

Linux Links

| コメント(0) | トラックバック(0)

Heres some links to some Linux-related websites that I find myself accessing quite often:

* Linux Questions: This is the best Linux forum out there. Most people are friendly and willing to help with any problems you may have running Linux. You can find me there quite often as well. My username is bulliver
* Kernel.org: This is the Linux kernel repository. If you need a kernel, this is the place.
* Ibiblio.org: Ibiblio is a massive archive of Linux software and documentation. It mirrors many Linux distributions FTP download sites, as well as the LDP (see below). Also, they archive my very own dir2ogg
* The Linux Documentation Project: This is the home of the Linux Guides and Howtos. Also has online versions of the man-pages. If you are looking for docs, try here first.
* Free Software Foundation: The home of GNU and FSF. Here you can find sources and docs for all the GNU software available. A vital part of any GNU/Linux system
* Open Source Initiative: Contains info on open-source software for both hackers and suits. If nothing else you should read the Halloween Documents, very entertaining.
* Gentoo Linux: My Linux distro of choice.
* ESRs homepage: If you don't know who Eric S. Raymond is, you need to educate yourself. His Website is full of quality FAQs, HOWTOs, writings and much more. There are many jewels waiting to be discovered at this site.
* Google Linux: If you can't find it anywhere else, try Linux Google.

このアーカイブについて

このページには、2011年2月に書かれたブログ記事が新しい順に公開されています。

前のアーカイブは2008年3月です。

次のアーカイブは2011年4月です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。