Re: Confusing stack effects
- From: "Dragontamer" <prtiglao@xxxxxxxxx>
- Date: 12 Feb 2006 10:57:54 -0800
\~o/~///annabee wrote:
//I've been able to hack together this program.
#!/bin/bash
sound_files=(`find . -type f \( -name "*.wav" -o -name "*.mp3" \)
-printf "%p \n"`)
num_sound_files=${#sound_files[*]}
file=${sound_files[$((RANDOM % num_sound_files))]}
mplayer $file
It searches the current directory, so just run it in / and you'll
search the whole
computer.//
This is not what my program does. It search the harddrive, once, and
create a list of the files for searching with a filter. You can move
them into a list of favorites, or a playqueue. And each time the
program starts, those files are fast available.
As I see it, you would have to create several scripts to do this in
Linux, and assuming you are working in a text environment? You would
have to present options to the user, a sort of text menu, so he could
enter filters to get back the list of interessting files, and a list of
options so that she could tag them, for the queue, and for the
"favortie" menu. Or you would have the scripts generate several
additional scripts, and print out their name and purpose to the user.
Several scripts would be enough, no need for a menu. (akin to
ImageMagik)
But what you really seem to be aiming for is an easy to use GUI
application, which is obviously not what the CLI was designed for.
Pipes and Command line are for the tasks that should not be
performed by a human, such as making a thumbnail of your
5000 photos (aka: ImageMagick)
I am not one to say "Command line pwns your GUI", but instead,
"There are some tasks a GUI will never be able to perform easily,
whereas
a Command Line app would be able to do the task and be created in
less than an hour"
As for your menus and playlists... that isn't how you should go about
this
task in the command-line.
I'd do it like this: A few scripts: createplaylist and playplaylist.
"createplaylist" would basically be a modified version of "find",
except
it will output all the music files to a file. Its decisions will be
based
on regex, there are 3 things you can regex: what to include, what to
exclude,
and what to ask the user for. It will then display the name of the file
with a
[y/n], where y == include the file in the playlist, and n == exclude
it.
After that, call "sort" to sort the list, and then remove double
entries.
From there, the file is saved.
The user can edit the file by hand using his favorite text editor, and
then
"playplaylist" will have several options. -r == random order, and so
on,
so forth.
As for actually making this... I don't got music files :-p It doesn't
really interest
me to make a program like that.
Anyway, the command-line is for maximum flexibility, not ease of use.
The simple issue of recall vs recognition is more than enough to show
why
GUIs are easier to use, even though they may be slower.
http://www.unc.edu/~eckerman/recrec.jpg
Good graph to show my point.
--Dragontamer
.
- Follow-Ups:
- Re: Confusing stack effects
- From: \\\~\o/~///annabee
- Re: Confusing stack effects
- From: Betov
- Re: Confusing stack effects
- References:
- Confusing stack effects
- From: James Daughtry
- Re: Confusing stack effects
- From: Betov
- Re: Confusing stack effects
- From: James Daughtry
- Re: Confusing stack effects
- From: Betov
- Re: Confusing stack effects
- From: James Daughtry
- Re: Confusing stack effects
- From: Betov
- Re: Confusing stack effects
- From: James Daughtry
- Re: Confusing stack effects
- From: randyhyde@xxxxxxxxxxxxx
- Re: Confusing stack effects
- From: \\\\\\o///annabee
- Re: Confusing stack effects
- From: Robert Redelmeier
- Re: Confusing stack effects
- From: \\\~\o/~///annabee
- Re: Confusing stack effects
- From: Dragontamer
- Re: Confusing stack effects
- From: \\\~\o/~///annabee
- Confusing stack effects
- Prev by Date: Re: Confusing stack effects
- Next by Date: Re: ESI as string iterator
- Previous by thread: Re: Confusing stack effects
- Next by thread: Re: Confusing stack effects
- Index(es):
Relevant Pages
|
Loading