[I'm reposting this (slightly edited) after a first post seemed not to
 have made it through. I'm sorry if this is just a duplicate after all]

> >> And I have no idea how I easily create playlists.
> >> It's shell magic for mplayer, and GUIs using mplayer
> >> may also provide ways - as I read the manpages,
> >> I am supposed to write maps myself. :-(

> > it is possible to generate (template) maps.
> > either when you get the music from cd (readcd does this)
> > or using the tags that are present in (e.g.) mp3 files.

> As I recall you need a map to actually start up playlistfs/juke*,
> so how does one start? Can you give an example? :)

I think you were the one who mentioned
> >> man 7 juke # juke(7)
:-)

juke(7) does contain an example.
it can be even simpler, something like below, where you just
follow the file system hierarchy.
the following assumes that the actual files are like
/some/path/to/music/groupdirname/albumdirname/01_some_name.ogg
etc. (I used anyrhines audio/ogg-vorbis stuff)


work {
        some name you invent yourself
        path {/some/path/to/music}
        command {sort}
        work {
                group name
                path {groupdirname}
                command {sort}
                work {
                        album title
                        path {albumdirname}
                        command {sort}
                        track {
                                02 name of second track
                                file {02_second_track.ogg}
                        }
                        track {
                                01 name of first track
                                file {01_some_name.ogg}
                        }
                        ...
                }
        }
}

if you put the tracks of the album in the right order
you can leave out the innermost 'command {sort}'.



however, the real power of the maps comes from being able to
use arbitrary attributes. this allows you to browse your
music via various 'angles'. for example, the juke(1)
example allows you to browse also by compose, orchestra
and conductor.
(some time ago I played a bit with the source of the juke gui
to improve the 'hyperlinking' you can get by 'clicking through'
the various attributes shown for each item (song). i.e. you see
the song that is playing. it has among the attributes: soloist=blup .
you click on it and now get are in the view by solist,
seeing the items that have solist blup. you pick one,
and it has among the attributes: composer=mahler .
you click on that and are in the view by composer,
seeing the items that have composer mahler. etc.
and from the view of items of soloist blup you can go up
to see all soloists. etc.
don't recall how much it differs from the distribution -
i haven't used it for quite some time.)


another use of attributes is the following:
i have run a script over my map that adds something
like the permuted index that we have for the manual pages,
by shifting names/titles around, which allows browsing
by any word in title or artist.

        track {
                artist = Fay~Lovsky
                artistpF = Fay~Lovsky
                artistpL = Lovsky~~--~~Fay
                title = Christmas~Was~A~Friend~Of~Mine
                titlepC = Christmas~Was~A~Friend~Of~Mine
                titlepW = Was~A~Friend~Of~Mine~~--~~Christmas
                titlepF = Friend~Of~Mine~~--~~Christmas~Was~A
                titlepO = Of~Mine~~--~~Christmas~Was~A~Friend
                titlepM = Mine~~--~~Christmas~Was~A~Friend~Of
                Fay Lovsky -- Christmas Was A Friend Of Mine
                file {Fay_Lovsky-Christmas_Was_A_Friend_Of_Mine.mp3}
        }

(in the 'name=value' lines ~ denotes a space)
this allows you to 'sort' your data on any word from title or name.
I split the permuted title and artist indexs on first letter, because
they would be to big otherwise, hence the artistpF, artistpL etc.


I have added two scripts (one to generate a map from 'du -a' output,
one to permute a map as discussed above) 'as is' on sources in
contrib/axel/music.  they are not polished. they are in perl.


of course, it should be possible to write something that,
to juke, offers the same interface as jukefs, but does not
read the maps but just takes the structure of the filesystem
instead.


Axel.

Reply via email to