The Music File Finder (muff)

Version 0.2

by Richard Brauer


Contents

General

   
How to exit help

This is pretty easy: Just press return.

   
What does this program do?

Muff searches a directory tree for mp3 songs and lets you search a list of these songs for expressions. If any names of mp3files (including full pathnam) match this expression, you can choose any of these files to be added to an xmms playlist.

You can also control some vital functions of xmms via this program, including play, forward and rewind.

   
What (among other things) does it not do?

This program does not play mp3 files.

Muff does not search for any files but files with the extension mp3 (case insensitive).

Muff does not remove single songs (e.g. the highlighted one or the one being played at the moment from xmms' playlist because this does not seem to be doable from the shell.

   
Limits and known bugs

Muff makes heavy use of the dialog program by Savio Lam, Stuart Herbert, Pako and Thomas Dickey. As of version 0.9b, dialog does not support infinitely long lists of arguments for menus or checklists. I don't know where exactly the limit is because it does not seem to be documented. It is however somewhere beyond 1000 items in a menu of checklist and this should not pose a problem.

If your searchpattern matches more than 997 files, only the first 997 matching files will be displayed.

Less General

   
Searching for files

After choosing "Find" from the main menu you'll be confronted with a textfield in which you can enter a regular expression to search the database for. Press return after you think that what you have entered is an expression suitable for what you are looking for. For your convenience, case does not matter.

Now the program will display a list of all the files whose filenames match the expression you entered. You may browse this list using the up and down arrow keys. Get back to the main menu by pressing either return or escape.

Don't press space, or if you do, only press it n_i times per highlited item, where n_i is an even number.

   
Adding files to the xmms playlist

Do the same as described in section 2.1 but make n_i an odd number for those items you want to add to the xmms playlist and do not try to exit pressing escape or selecting the nooooh button in which cases your choices will not have any consequences. Still these options may come in handy if you decide not to select the selected files ;-)

   
Updating the database

By default the database file (where Muff stores the names of all the mp3files so it does not have to search your harddisk all the time) is stored somewhere in your /tmp directory. Therefore this file will be deleted after rebooting on most systems. If the database file does not exist on startup, it will be created automatically. Still you might have reasons to update the file while running the program, e.g. if you added or deleted mp3 files. Do this by selecting "Scan" from the main menu [hmmm, why the hell do I try to explain all those f***ing obvious things?].

There's another thing about updating the database which is probably not that obvious. I rather think it is IMPORTANT!!!

In the muff configuration file (/etc/muff.conf) you can define a path in which muff shall look for mp3 files. On startup, muff checks whether this path is a valid one and if it is not, muff will set this path variable to a path underneath which all mp3 files on your harddisk can be found. On most systems, this will be the root directory ( "/" ).

No scanning your whole harddisk for mp3 files with find can take a few minutes, if you have huge and/or slow harddisks. Therefore muff will only use "locate" to update its database. If you now change something about your database, you'll need to run "updatedb" to for these changes to be recognized by muff.

It is therefore very important that you have a sensible value for mp3path predefined in /etc/muff.conf! Muff will remind you of this with a nasty message box.

   
xmms options

Choose the appropriate items from the main menu.

   
More xmms options

This submenu offers more options for xmms control

More Special

   
If you want to use this program on a system other than RoyalBigMac or QuarterFishMac (former KingMacSalad)

When using Muff on your own computer, you'll probably want it to scan for mp3 files in the directory you store your mp3 files in. For this purpose the $mp3path-variable has to be set to a directory that contains all the mp3 files you want to be scanned by muff.

The best way of doing this is to edit the /etc/muff.conf file and set the value of mp3dir to a nice path on your system. The configuration file is well documented, so you don't need to be afraid that you make anything really really stupid ;-)

If the mp3path defined in /etc/muff.conf does not make sense, muff will try to guess a good path for your system, which will very probably result in this path being " / " which is really, really bad.

See also 3.4 and 2.3

   
More on Regular Expressions

As muff uses "egrep" to scan the database for patterns, you can use any regular expression grep understands for searching for files. A few important examples include:

fly would search for any file containing the pattern "fly"
fly.mp3 You may believe, that this finds any files containing the pattern "fly.mp3" but then you are mistaken. In regular expressions, the dot ( . ) represents exactly one arbitrary character. If you want to search for a dot, you have to escape it using a backslash (\. )
fly\.mp3 Only filenames containing "fly.mp3" match this expression
fl[aeiouy] finds all filenames containing either of "fla" "fle" "fli" "flo" "flu" "fly". So you might find filesnames containing "mark knopfler" or "pink floyd", and also "fluid" "flaw" "flown" "fly" "flight" etc but not "berflssig" (which is the german word for superfluous or unneccessary with all the horrible umlauts simply omitted).
fl[^ aeiouy] finds anything that contains a pattern of three letters the first of which are "fl" and the third NOT one of "a" "e" "i" "o" "u" or "y". Hence this would find "berflssig" but not all the things fl[aeiouy] would find.
rem[^ /]\+mp3 Finds all filenames that contain a pattern that begins with "rem", ends with "mp3" and has inbetween an arbitrary number (at least one of characters other than a slash (/). So if all your files from REM are in a subdirectory .../rem/, none of them will be found, unless some have a filename like ".../rem/rem_-_losing_my_religion.mp3". In other words: all files will be found that have the pattern "rem ... mp3" as part of their filename without path. Hence you'll find anything like "song (remix).mp3" or "...remains.mp3" or ".../rem/rem_-_daysleeper.mp3" but not ".../rem/walk_unafraid.mp3"
(ga)* Finds all files whose name contain a sequence of 0 or more matches of "ga". Because we are using egrep, you don't need to escape the brackets. As the expression on the left would find all files (the star means at least zero times, not at least once), it is useless. Therefore you may say:
(ga)\+ To find filenames containing a sequence of at least one match of "ga". If you want to easily find a filename containing "ga ga" this is probably quite stupid, as it will show your whole Peter Gabriel collection as well. Hence you may try
(ga )\+ or of course just
ga ga but that looks so unimpressive ;-)
(drive\.mp3^ ) Finds all filenames that end on "drive.mp3". Useful if you don't want to find files like "... you drive me crazy.mp3".

See the re_syntax manpage ("man re_syntax") for more details. And have a look at the egrep documentation (man egrep) to find out about the most complicated patterns to search for.

   
I don't want to use Eterms. How can I switch to xterm?

Edit the muff shellscript (muff, not muff-run) and just make sure the first command (Eterm ...) does not work by, e.g. switching Eterm to eterm. Muff will notice that this doesn't work and start an xterm instead, assuming that everyone has xterm installed.

I'm using Eterm because on my system the predefined background colour for dialog is more beautiful (a lot darker) in Eterms than in xterms. Now don't ask me why, I don't know and I really don't care that much.

   
Predefining some of muff's variables in the config file

When starting, muff looks in /etc/muff.conf for predefined values of the following variables:

mp3dir the directory underneath which muff searches for mp3 files. Adjust this variable according to you system. Please really do this!
tmpdir the directory in which muff stores its temporary files. I'd recommend not changing this one. If muff notices that it cannot write in $tempdir, it will set this variable to /tmp/muff.$USER, i.e. if your login name is "bill", temporary files will be stored in /tmp/muff.bill
helpdir the directory in which muff looks for its help file. On most systems /usr/share/doc should do fine.
paranoia governs whether muff checks if xmms is running all the time or not. If paranoia is set to 0 (zero), then muff will only check if xmms is running on startup. If paranoia is set to 1, muff will check every time it does something that affects xmms. Actually I think that this option is not that important.
intelligent_grep This setting is for people who like to be totally in control of what is going on on their computer. By default, muff replaces any space in your search-expression by "[ _-]". This means, that if you enter something like "meat loaf", all files will be found whose name contains either of "meat loaf" "meat_loaf" and "meat-loaf". I think that this makes a lot of sence, because of the many different ways in which people name their mp3 files. Anyway, you may not want muff to do this. If you don't, set the intelligent_grep variable to 0 (zero). Leave it on 1 if you like this setting.

It is really important (at the moment, i.e. release 0.1) that you keep the exact layout of the items in /etc/muff.conf . This is: case matters, the Lines that contain parameter settings must not begin with anything else but the parameter name and there has to be exactly one space before and after the "=". Hence, if

>
denotes the beginning of a line, settings must look like
>parameter = setting

   
What does muff mean?

  1. Whitethroat Whitethroat, n. (Zool.)

    Any one of several species of Old World warblers, esp. the common European species (Sylvia cinerea), called also strawsmear, nettlebird, muff, and whitecap, the garden whitethroat, or golden warbler (S. hortensis), and the lesser whitethroat (S. curruca).

  2. Muff Muff (muf), n. Cf. LG. muff, D. mof, G., Dan., & Sw. muff, F. moufle mitten, LL. muffula, MHG. mouwe sleeve, D. mouw, and E. muffle, v.

    1. A soft cover of cylindrical form, usually of fur, worn by women to shield the hands from cold.

    2. (Mech.) A short hollow cylinder surrounding an object, as a pipe.

    3. (Glass Manuf.) A blown cylinder of glass which is afterward flattened out to make a sheet.

    4. Perhaps a different word; cf. Prov. E. maffle to slammer. A stupid fellow; a poor-spirited person. Colloq. ``A muff of a curate.'' -Thackeray.

    5. See (d) (Baseball) A failure to hold a ball when once in the hands.

    6. (Zool.) The whitethroat. Prov. Eng.

  3. Muff Muff, v. t. imp. & p. p. Muffed; p. pr. & vb. n. Muffing.

    To handle awkwardly; to fumble; to fail to hold, as a ball, in catching it.

  4. muff, (Computer)

    acronym for Music File Finder, some shell-scripts for bash.

   
How to use help

Basically, I'd advise to read it if you want to know more about muff than you do already know. If you know pretty much of everything there is to know about it, you'll be disappointed.

If you are reading this help file from within muff, you can scroll up and down using the arrow keys.

By pressing "/" (slash) you can enter an expression to search the help file for. Please not that this search IS case sensitive.

By pressing "n" you can search for the next occurence of the expression.

If some lines are too long you can scroll to the left or to the right using the left or right arrow keys respectively.

   
Copyright and other unimportant issues

muff is published under the gpl. A copy of gpl should be found in /usr/share/doc/muff/ If not, have a look at http://www.gnu.org/copyleft/gpl.html

   
How to install muff

First, download the muff tarball from some appropriate server.

Secondly, copy the tarball to some directory I'll simply call i-dir.

Third, cd to i-dir and type "tar xzvf muff.tar.gz"

Fourth, cd to i-dir/muff and run ./install

You don't need to be root to run i-dir/muff/install, but you'll be asked for your root passwort if you aren't.

If you want to change the default locations for the muff files (see 3.9), you may change some settings in the i-dir/muff/schmeisse shell script. If you change the $helpdir settings there, you'll have to change this variable in muff-run as well.

   
Where are the muff files?

These are the default locations. You may change them during installation (see 3.8)

Executables are /usr/local/bin/muff /usr/local/bin/muff-run

The helpfiles are in /usr/share/doc/muff

If muff ever uses a configuration file, it will be /etc/muff.conf

   
Support

There is not much of support for muff, but if you have any questions you may try to mail me at richard.brauer@physik.rwth-aachen.de or take a look at the muff homepage http://muff.sourceforge.net

Apart from that -- as muff is no more than a bash script making use of dialog, egrep, xmms and xmms-shell, you may want to consult these programs' online documentation (man foo).

About this document ...

The Music File Finder (muff)

This document was generated using the LaTeX2HTML translator Version 2K.1beta (1.48)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 0 -ascii_mode -no_math help.tex

The translation was initiated by Richard Brauer on 2002-01-25


Richard Brauer 2002-01-25

Copyright (C) 2005 Richard Brauer

Valid CSS!

Standard compliant use of css according to http://jigsaw.w3.org/
css-validator/

Valid HTML 4.01!

This page complies to the HTML-4.01 transitional-standard according to validator.w3.org

don't be mean to dogs

Tigerduck.de cannot be held responsible for external web-pages or their contents, not even if these or those are linked from here. If you think that there are links to questionable places on the net from within this web project, then you should tell me so I can check whether my taste or interpretation of laws matches yours. You may also tell me about web pages you absolutely dislike and I may decide to explicitely not link them. Tigerduck.de is not suitable for underaged children because they may choke on it. Attention: hot and greasy (suppose you don't say this in English, but we do in german so please don't bother me if you want to complain about this 'cause I don't care). All rights of the producer and of the owner of the work reproduced reserved. Unauthorised copying, hiring, lending, public performance and public broadcasting prohibited by some law or so. Made in the EU. No animals were harmed or killed during the production of this website and no dragons mistreated or abused. Tigerduck.de is not responsible for the radio program on WDR 2 , even if some people think so.

don't be mean to dogs