Dynamic list generator for CMus (C* Music Player) based on the LastFm database
- to create a dynamic playlist, similar to the extension in Amarok 1.2
- to maintain a low-level script able to work with CMus smoothly
- it creates a playlist based on a list of songs, matching the result with a local library
- it creates a playlist based on current song playing/queuing
- it specifies the size of the playlist
- Loop playlist songs
- Get lastfm similartracks
- Limit the method to retrieve xml data
- Check existence in CMus library (*.lb)
- Verify generation of playlists in CMus
- fn() Selector: current song or playlist (and live re-make amarok)
- playlist size
- create playbase.txt or CMus/playlist.pl
- Add subset to playlist
- live-mode playlist generator
- use
jq
instead ofxml
cmus
- is a small ncurses based music player. It supports various output methods by output-plugins. cmus has completely configurable keybindings and can be controlled from the outside via cmus-remotecurl
- is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.tr
- is an UNIX utility for translating, or deleting, or squeezing repeated characters.awk
- is a powerful method for processing or analysing text files—in particular, data files that are organised by lines (rows) and columns.xml
- is a command lines utility to parse xml files
In any folder, download cmus-dynamiclistfm
by cloning the project
git clone https://github.com/guxsousa/cmus-dynamiclistfm.git
or by getting a zip
wget https://github.com/guxsousa/cmus-dynamiclistfm/archive/master.zip
unzip cmus-dynamiclistfm-master.zip
Get inside the folder and check permissions to make the files executable
cd cmus-dynamiclistfm-master/
chmod 755 *.sh
cd ..
Get an API key from LastFm. Create a file called API_file
and paste the key there.
touch API_file
vi API_file
<paste key here>
or just
YOURAPIKEYFROMLASTFM > API_file
So that the API_file
content is:
YOURAPIKEYFROMLASTFM
add_songs.sh
is used to add songs into an external file (*.txt), while a song is playing in CMus
./add_songs.sh
list_file.sh
reads an external file and creates a playlist. This file can be the one created with add_songs
or a file created manually.
./list_files.sh playlist.txt 21
list_current.sh
creates a playlist based on the song played in CMus.
./list_current.sh 45
1 : tree
2 : library
3 : queue
4 : playlists
5 : directory
6 : filters
7 : Settings
u : refresh
c : continue
r : repeat
s : shuffle
This software is licensed under the MIT License.
Gus Sousa -- guxsousa