Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there any way to create a playlist in XMMS consisting of a whole directory via the terminal? I have a ton of mp3s, and it's a little unruly to do it through Nautilus...
should be easy enough, just look at a playlist in a text browser and write a simople script to parse a "find" output into that format. can't remember the format offhand though so i can't give an example.
Thanks, guys. I didn't know you could do that. That's pretty handy. I have one question, though. The file begins with #EXTM3U. Could I create other file types by identifying the extension that way in VIM?
--Erich
Last edited by General_Tso; 03-18-2003 at 11:38 PM.
I wrote a script that will prompt you for songs and add them to an .m3u playlist.
You just need to keep in mind that filepaths to songs need to be reletive to where the playlist will be ie: if the playlist will be in /home/music and the song you want to add is /home/music/atol/ab/song.ogg then you need to add the song as ./atol/ab/song.ogg, or else just use full paths...
It will work for oggs or mp3s, and you can add more songs to the playlist at a later time (it just appends them to the end) by putting in the name of a previous playlist when prompted for the playlist name.
So anyway....here it is:
Code:
#!/bin/bash
#
echo -n "Enter playlist name: "
read playlist
echo -n "Enter directory to place the playlist: "
read listdir
genericvariable=0
while [ $genericvariable = 0 ]
do
echo -n "Enter song to add to playlist (type 'done' if finished): "
read file
if [ ${file} = "done" ]; then
echo "Thanks for using playlist generator"
exit 0
fi
echo "${file}" | cat >> ${listdir}/${playlist}.m3u
done
That's really cool, bro. I'm going to have to start playing with scripts. I love that stuff. If any one comes across this post looking to learn scripts, here you go.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.