From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200609181748.k8IHmC901266@demeter.cs.utwente.nl> To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Ideas??? In-reply-to: Your message of "Mon, 18 Sep 2006 16:53:35 +0200." <15d663864e1f3c5a967cd9a32f4adf18@mail.gmx.net> References: <15d663864e1f3c5a967cd9a32f4adf18@mail.gmx.net> From: Axel Belinfante MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-ID: <1262.1158601691.1@demeter.cs.utwente.nl.cs.utwente.nl> Content-Transfer-Encoding: quoted-printable Date: Mon, 18 Sep 2006 19:48:12 +0200 Topicbox-Message-UUID: ba19c316-ead1-11e9-9d60-3106f5b1d025 > >> 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) it 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/mp3/groupdirname/albumdirname/01_some_name.ogg etc. (I used anyrhines audio/ogg-vorbis stuff) work { some name path {/some/path/mp3} command {sort} work { group 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. for example, 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, such that you track { artist =3D Fay~Lovsky artistpF =3D Fay~Lovsky artistpL =3D Lovsky~~--~~Fay title =3D Christmas~Was~A~Friend~Of~Mine titlepC =3D Christmas~Was~A~Friend~Of~Mine titlepW =3D Was~A~Friend~Of~Mine~~--~~Christmas titlepF =3D Friend~Of~Mine~~--~~Christmas~Was~A titlepO =3D Of~Mine~~--~~Christmas~Was~A~Friend titlepM =3D Mine~~--~~Christmas~Was~A~Friend~Of Fay=C2=B7Lovsky=C2=B7-=C2=B7Christmas=C2=B7Was=C2=B7A=C2=B7Friend=C2=B7O= f=C2=B7Mine file {Fay=C2=B7Lovsky=C2=B7-=C2=B7Christmas=C2=B7Was=C2=B7A=C2=B7Friend=C2= =B7Of=C2=B7Mine.mp3} } (in the 'name=3Dvalue' 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. 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.