lastbash-cvs Mailing List for Last.fm console player (Page 6)
Status: Beta
Brought to you by:
cstroie
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(27) |
Dec
(77) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(14) |
Feb
(8) |
Mar
(41) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
|
From: Costin S. <cs...@us...> - 2006-12-06 15:31:00
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26935 Modified Files: lastbash.1 Log Message: Added content to manpage. Index: lastbash.1 =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash.1,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lastbash.1 13 Nov 2006 21:26:01 -0000 1.1 +++ lastbash.1 6 Dec 2006 15:30:52 -0000 1.2 @@ -5,21 +5,174 @@ .\" .\" $Id$ .\" -.TH "lastbash" "1" "03 Nov 2006" "LastBASH" "Multimedia" +.TH "lastbash" "1" "06 Dec 2006" "LastBASH" "Multimedia" .SH "NAME" lastbash \- Console player for Last.fm .SH "SYNOPSIS" -lastbash [\-vVh] [station] +\fBlastbash\fR [-aAdvh] [-p \fIplayer\fR] [-r \fIrefresh_interval\fR] [-u \fIusername\fR] [-c \fIcommand\fR] [\fIstation\fR] .SH "DESCRIPTION" -To be done +LastBASH is a console/terminal based Last.fm player. +Although the default Last.fm player is a great one, it also is a graphical one and it could be somewhat inadequate for the die-hard terminal users, like some people I know. +LastBASH tries to find its place among the other Last.fm players, filling this gap: the missing console player. +.PP +Basically, it is no more than a TUI frontend, written in Bash. +It displays the information of the current playing track, keeps a history of the played tracks and allows the user to perform some actions on the current track, such as love, skip or ban. .SH "OPTIONS" -To be done -.SH "EXAMPLES" -To be done +.TP +.B -a +Do not start playing automatically. +.TP +.B -A +Start playing automatically. +.TP +.B -d +Enable debug mode (will create a log file at \fI~/.lastbash/lastbash.debug\fR). +.TP +.B -v +Show program name and version. +.TP +.B -h +Show a quick help. +.TP +.B -p \fIplayer\fR +Set the backend player to use. +.TP +.B -r \fIrefresh_interval\fR +Set the refresh interval, in seconds. +.TP +.B -u \fIusername\fR +Set Last.fm username and re-request the password. +.TP +.B -c \fIcommand\fR +Send \fIcommand\fR to the first instance. +See \fBRemote control\fR below. +.TP +.I station +Specify the Last.fm station to connect to when starting or to send to the first instance. +See \fBRemote control\fR below. +.SH "BASIC USAGE" +After you have donwloaded, extracted and installed the program, run it. +You do not need to pass any command line parameters, at least at first start. +.PP +.nf +$ lastbash +.fi +.PP +It will ask your Last.fm username and password. +You should have one. +If not, hmmm... go and create an account on Last.fm +.PP +You can also pass the Last.fm station name to tune directly into it. +.PP +.nf +$ lastbash "lastfm://globaltags/rock" +$ lastbash "lastfm://globaltags/classic rock" +$ lastbash "lastfm://user/cstroie/neighbours" +$ lastbash "lastfm://artist/Rammstein/similarartists" +.fi +.PP +Then, the program will try to connect. +If it succeeds, it will save a playlist in \fI~/.lastbash/playlist.m3u\fR, for you to open with some external player, if you don't want to use the backend it provides. + +If you have MPlayer (for the moment, this is the backend), it will start playing automatically. If not, you will have to tell LastBASH not to try to run it by creating the \fI~/.lastbash/config\fR file and adding this line: +.PP +.nf +USE_PLAYER="n" +.fi +.PP +Then, open your favourite mp3 player, load the above-mentioned playlist and start playing. +LastBASH will show you the current playing track, will keep a history of last played tracks and will allow you to control the stream. +.PP +For example, to run MPlayer manually (just an example), run it this way: +.PP +.nf +$ mplayer -cache 512 -playlist ~/.lastbash/playlist.m3u +.fi +.PP +If you like xmms, run it this way (or just run it and open the playlist): +.PP +.nf +$ xmms ~/.lastbash/playlist.m3u +.fi +.PP +To use mpg123, the command is the following: +.PP +.nf +$ mpg123 -C -v -@ ~/.lastbash/playlist.m3u +.fi +.SH "KEY BINDINGS" +Basic key bindings are the following: +.TP +.B l +Love track +.TP +.B k +Skip track +.TP +.B b +Ban track +.TP +.B r +Refresh track metadata (refresh is automatic, but if you need to, you can use this key to force a refresh) +.TP +.B p +Toggle "Record to Profile" (the P led will change status) +.TP +.B d +Toggle "Discovery mode" (the D led will change status) +.TP +.B s +Toggle history scrolling direction +.TP +.B ^L +Redraw the interface +.TP +.B q +Quit (and stop the backend player too) +.SH "REMOTE CONTROL" +If one instance of LastBASH is already running, a second call can send commands to the first one, for example: +.PP +.nf +$ lastbash -c LOVE +$ lastbash -c SKIP +$ lastbash -c BAN +.fi +.PP +Or you can change the station this way. +.PP +.nf +$ lastbash "lastfm://group/LastBASH" +.fi +.SH "MOZILLA FIREFOX INTEGRATION" +Open Firefox and type in the address bar the following. +.PP +.nf +about:config +.fi +.PP +Right click and select New > String . As name type the next string and press OK. +.PP +.nf +network.protocol-handler.app.lastfm +.fi +.PP +As value type the full path to the LastBASH programs, something like this one. +.PP +.nf +/usr/bin/lastbash +.fi +.PP +Now, go to Last.fm and click any \fIlastfm://\fR url. +This will launch a second instance of the program and pass to the first one the new station. +.SH "LAST.FM" +This is shameless self-promotion, I know. +You can find me on Last.fm as \fIcstroie\fR and, if you like this player and want to share your experience, you can join the \fILastBASH\fR group and tell others about it. .SH "LICENSE" GNU General Public License .SH "AUTHORS" Costin Stroie <cs...@us...> .SH "SEE ALSO" -LastBASH website at: <http://lastbash.sourceforge.net/> +LastBASH website at: <http://lastbash.sourceforge.net> +.br +LastBASH group at Last.fm: <http://www.last.fm/group/LastBASH> .\" vim: set ft=nroff nowrap nu: |
|
From: Costin S. <cs...@us...> - 2006-12-06 13:57:38
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20545 Modified Files: lastbash Log Message: Version 0.3.0. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- lastbash 6 Dec 2006 12:13:32 -0000 1.83 +++ lastbash 6 Dec 2006 13:57:34 -0000 1.84 @@ -36,7 +36,7 @@ PROG_NAME="lastbash" PROG_TITLE="LastBASH" PROG_DESC="Console player for Last.fm" -PROG_VER="0.2.4" +PROG_VER="0.3.0" AUTHOR="Costin Stroie" AUTHOR_EMAIL="cs...@us..." |
|
From: Costin S. <cs...@us...> - 2006-12-06 13:56:10
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20131 Modified Files: INSTALL Log Message: Title changed. Index: INSTALL =================================================================== RCS file: /cvsroot/lastbash/lastbash/INSTALL,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- INSTALL 6 Dec 2006 12:56:06 -0000 1.5 +++ INSTALL 6 Dec 2006 13:56:06 -0000 1.6 @@ -1,4 +1,6 @@ - INSTALL +LastBASH - Console player for Last.fm + +INSTALL |
|
From: Costin S. <cs...@us...> - 2006-12-06 13:55:36
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19756 Modified Files: README Log Message: Updated for 0.3.0. Index: README =================================================================== RCS file: /cvsroot/lastbash/lastbash/README,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- README 28 Nov 2006 17:31:35 -0000 1.3 +++ README 6 Dec 2006 13:55:29 -0000 1.4 @@ -23,18 +23,27 @@ Features ======== -LastBASH is a console player for Last.fm. Even beta, it is quite usable. -Its purpose is to offer a simple interface to Last.fm services. +LastBASH is a console player for Last.fm. Even beta, it is quite usable. +Its purpose is to offer a simple interface to Last.fm services, to allow +you to listen to the streams while you are working in console. Or, +maybe, when you don't want to use any graphical player. + +LastBASH features the following: +* nice and usable Text User Interface * authentication using the md5 password encryption * retrieves the metadata of the current playing track and displays it (artist, album, track name, track duration) * keeps a history of last played tracks -* allows you to control the Last.fm station, by issuing the love, skip - and ban commands +* allows you to change the Last.fm station +* allows you to control the Last.fm station, by issuing the 'love', + 'skip' and 'ban' commands * optionally, it can run a backend player (such as MPlayer or mpg123), which you can control through the same interface, or lets you choose - any external player you wish (capable of playing mp3 streams) + any external player you wish (capable of playing mp3 streams), such as + XMMS, Rhythmbox or even Amarok, if you feel to +* remote control (send commands and station changing) +* easy integration with web browsers Usage @@ -75,6 +84,12 @@ last.fm station You can specify a new Last.fm station to connect to. +You can also pass the Last.fm station name to tune directly into it. + +$ lastbash "lastfm://globaltags/rock" +$ lastbash "lastfm://globaltags/classic rock" +$ lastbash "lastfm://user/cstroie/neighbours" +$ lastbash "lastfm://artist/Rammstein/similarartists" Then, the program will try to connect. If it succeeds, it will save a playlist in ~/.lastbash/playlist.m3u, for you to open with some @@ -86,9 +101,34 @@ USE_PLAYER="n" -Then, open your mp3 player, load the above-mentioned playlist and start -playing. LastBASH will show you the current playing track and will keep -a history of last played tracks. Enjoy! +Then, open your favourite mp3 player, load the above-mentioned playlist +and start playing. LastBASH will show you the current playing track, +will keep a history of last played tracks and will allow you to control +the stream. + +For example, to run MPlayer manually (just an example), run it this way: + +$ mplayer -cache 512 -playlist ~/.lastbash/playlist.m3u + +If you like xmms, run it this way (or just run it and open the playlist +using the GUI): + +$ xmms ~/.lastbash/playlist.m3u + +To use mpg123, the command is the following: + +$ mpg123 -C -v -@ ~/.lastbash/playlist.m3u + +If one instance of LastBASH is already running, a second call can send +commands to the first one, for example: + +$ lastbash -c LOVE +$ lastbash -c SKIP +$ lastbash -c BAN + +Or you can change the station this way. + +$ lastbash "lastfm://group/LastBASH" Key bindings @@ -107,6 +147,16 @@ you can use this key to force a refresh) p Toggle "Record to Profile" (the P led will change status) + +d + Toggle "Discovery Mode" (the D led will change status) + +s + Toggle history scrolling direction + +CTRL-L + Redraw the interface + q Quit (and stop the backend player too) |
|
From: Costin S. <cs...@us...> - 2006-12-06 13:53:45
|
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18954 Modified Files: Install Log Message: Added command line prompts. Index: Install =================================================================== RCS file: /cvsroot/lastbash/blis_pages/Install,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Install 6 Dec 2006 13:15:55 -0000 1.2 +++ Install 6 Dec 2006 13:53:41 -0000 1.3 @@ -13,12 +13,12 @@ First, unpack the archive (replace the version number with the correct one) and enter the directory - tar xzf lastbash-0.3.0.tar.gz - cd lastbash-0.3.0 + $ tar xzf lastbash-0.3.0.tar.gz + $ cd lastbash-0.3.0 Then run the program (assuming @@bash@@ is your shell) - ./lastbash + $ ./lastbash Please see the [[Usage]] page for details on LastBASH usage. @@ -26,15 +26,15 @@ To perform an installation with default options, run the next command as root. - make install + # make install If you like, parameters can be specified in the command line, like this. - make prefix=/usr/bin install + # make prefix=/usr/bin install == Uninstall == To perform the uninstall process, type the next command (with or without some parameters in the command line) as root. - make uninstall + # make uninstall |
|
From: Costin S. <cs...@us...> - 2006-12-06 13:52:58
|
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18558 Modified Files: Usage Log Message: Reviewed. Index: Usage =================================================================== RCS file: /cvsroot/lastbash/blis_pages/Usage,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Usage 6 Dec 2006 12:31:38 -0000 1.1 +++ Usage 6 Dec 2006 13:52:54 -0000 1.2 @@ -4,42 +4,47 @@ (:DESCRIPTION:) Using LastBASH (:REVISION:) $Id$ -Please see the [[Install]] page for quick instructions about how to install and launch LastBASH. You must have a compatible terminal (linux or xterm are supported at the moment) and, if you wish to use the backend player, you should have MPlayer. For now. +Please see the [[Install]] page for quick instructions about how to install and launch LastBASH. +You must have a compatible terminal (linux or xterm are supported at the moment) and, if you wish to use the backend player, you should have MPlayer. +For now. After you have donwloaded, extracted and installed the program, run it. You do not need to pass any command line parameters, at least at first start. - lastbash + $ lastbash It will ask your Last.fm username and password. You should have one. If not, hmmm... go and create an account on [http://www.last.fm|Last.fm] -You can also pass the Last.fm station name to tune directly into it. For now, the url must be %-escaped (replace the SPACE characters with @@%20@@). +You can also pass the Last.fm station name to tune directly into it. - lastbash lastfm://globaltags/rock - lastbash lastfm://globaltags/classic%20rock - lastbash lastfm://user/cstroie/neighbours - lastbash lastfm://artist/Rammstein/similarartists + $ lastbash "lastfm://globaltags/rock" + $ lastbash "lastfm://globaltags/classic rock" + $ lastbash "lastfm://user/cstroie/neighbours" + $ lastbash "lastfm://artist/Rammstein/similarartists" -Then, the program will try to connect. If it succeeds, it will save a playlist in @@~/.lastbash/playlist.m3u@@, for you to open with some external player, if you don't want to use the backend it provides. +Then, the program will try to connect. +If it succeeds, it will save a playlist in @@~/.lastbash/playlist.m3u@@, for you to open with some external player, if you don't want to use the backend it provides. -If you have MPlayer (for the moment, this is the backend), it will start playing automatically. If not, you will have to tell LastBASH not to try to run it by creating the @@~/.lastbash/config@@ file and adding this line: +If you have MPlayer (for the moment, this is the backend), it will start playing automatically. +If not, you will have to tell LastBASH not to try to run it by creating the @@~/.lastbash/config@@ file and adding this line: USE_PLAYER="n" -Then, open your favourite mp3 player, load the above-mentioned playlist and start playing. LastBASH will show you the current playing track, will keep a history of last played tracks and will allow you to control the stream. +Then, open your favourite mp3 player, load the above-mentioned playlist and start playing. +LastBASH will show you the current playing track, will keep a history of last played tracks and will allow you to control the stream. For example, to run MPlayer manually (just an example), run it this way: - mplayer -cache 512 -playlist ~/.lastbash/playlist.m3u + $ mplayer -cache 512 -playlist ~/.lastbash/playlist.m3u If you like xmms, run it this way (or just run it and open the playlist): - xmms ~/.lastbash/playlist.m3u + $ xmms ~/.lastbash/playlist.m3u To use mpg123, the command is the following: - mpg123 -C -v -@ ~/.lastbash/playlist.m3u + $ mpg123 -C -v -@ ~/.lastbash/playlist.m3u Enjoy! @@ -47,13 +52,13 @@ If one instance of LastBASH is already running, a second call can send commands to the first one, for example: - lastbash -c LOVE - lastbash -c SKIP - lastbash -c BAN + $ lastbash -c LOVE + $ lastbash -c SKIP + $ lastbash -c BAN Or you can change the station this way. - lastbash lastfm://group/LastBASH + $ lastbash "lastfm://group/LastBASH" = Mozilla Firefox integration = @@ -83,4 +88,7 @@ :r:Refresh track metadata (refresh is automatic, but if you need to, you can use this key to force a refresh) :p:Toggle ''"Record to Profile"'' (the '''P''' led will change status) :d:Toggle ''"Discovery mode"'' (the '''D''' led will change status) +:s:Toggle history scrolling direction +:^L:Redraw the interface :q:Quit (and stop the backend player too) + |
|
From: Costin S. <cs...@us...> - 2006-12-06 13:43:33
|
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14985 Modified Files: News Log Message: Added 0.3.0 News. Index: News =================================================================== RCS file: /cvsroot/lastbash/blis_pages/News,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- News 6 Dec 2006 12:31:38 -0000 1.1 +++ News 6 Dec 2006 13:43:27 -0000 1.2 @@ -4,6 +4,8 @@ (:DESCRIPTION:) News (:REVISION:) $Id$ +:2006.12.06 v0.3.0: Use special terminal mode for program TUI. Use ncurses (tput) instead of direct escape sequences. Check for webservice errors. Multiple commands per remote call are supported. Check for a minimum terminal size before starting. Added support for external HTTP clients, fixed the Ubuntu related bug. Keep history in memory for redraw. Prevent race conditions in remote command calls. Better quitting sequence (trap signals). + :2006.11.28 v0.2.3: The remote call support has been improved. The history has new headings and the action (Love, Skip, Ban) is displayed. The keys are displayed when the pressed key is not understood. :2006.11.22 v0.2.2: Some new and interesting features added. Search for available players. Support for remote commands and signalling. Added support for terminal resize. |
|
From: Costin S. <cs...@us...> - 2006-12-06 13:15:58
|
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv3942 Modified Files: Install Log Message: Reviewed. Index: Install =================================================================== RCS file: /cvsroot/lastbash/blis_pages/Install,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Install 6 Dec 2006 12:31:38 -0000 1.1 +++ Install 6 Dec 2006 13:15:55 -0000 1.2 @@ -13,8 +13,8 @@ First, unpack the archive (replace the version number with the correct one) and enter the directory - tar xzf lastbash-0.2.3.tar.gz - cd lastbash-0.2.3 + tar xzf lastbash-0.3.0.tar.gz + cd lastbash-0.3.0 Then run the program (assuming @@bash@@ is your shell) |
|
From: Costin S. <cs...@us...> - 2006-12-06 12:56:11
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv28693 Modified Files: INSTALL Log Message: Version up: 0.3.0. Index: INSTALL =================================================================== RCS file: /cvsroot/lastbash/lastbash/INSTALL,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- INSTALL 28 Nov 2006 18:21:58 -0000 1.4 +++ INSTALL 6 Dec 2006 12:56:06 -0000 1.5 @@ -8,8 +8,8 @@ First, unpack the archive (replace the version number with the correct one) and enter the directory -$ tar xzf lastbash-0.2.4.tar.gz -$ cd lastbash-0.2.4 +$ tar xzf lastbash-0.3.0.tar.gz +$ cd lastbash-0.3.0 Then run the program (assuming bash is your shell) |
|
From: Costin S. <cs...@us...> - 2006-12-06 12:51:57
|
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26807 Modified Files: Home Log Message: Reviewed. Index: Home =================================================================== RCS file: /cvsroot/lastbash/blis_pages/Home,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Home 6 Dec 2006 12:31:38 -0000 1.1 +++ Home 6 Dec 2006 12:51:53 -0000 1.2 @@ -4,18 +4,25 @@ (:DESCRIPTION:) Introduction (:REVISION:) $Id$ -LastBASH is a console/terminal based [http://www.last.fm|Last.fm] player. Although the [http://www.last.fm/tools/downloads|default Last.fm player] is a great one, it also is a graphical one and it could be somewhat inadequate for the die-hard terminal users, like some people I know. LastBASH tries to find its place among the other Last.fm players, filling this gap: the missing console player. +LastBASH is a console/terminal based [http://www.last.fm|Last.fm] player. +Although the [http://www.last.fm/tools/downloads|default Last.fm player] is a great one, it also is a graphical one and it could be somewhat inadequate for the die-hard terminal users, like some people I know. +LastBASH tries to find its place among the other Last.fm players, filling this gap: the missing console player. -Basically, it is no more than a <abbr title="Text User Interface">TUI</abbr> frontend, written in [http://www.gnu.org/software/bash|Bash]. It displays the information of the current playing track, keeps a history of the played tracks and allows the user to perform some actions on the current track, such as ''love'', ''skip'' or ''ban''. +Basically, it is no more than a <abbr title="Text User Interface">TUI</abbr> frontend, written in [http://www.gnu.org/software/bash|Bash]. +It displays the information of the current playing track, keeps a history of the played tracks and allows the user to perform some actions on the current track, such as ''love'', ''skip'' or ''ban''. -To listen to Last.fm, you can use any player capable of mp3 streaming (such as [http://www.mplayerhq.hu|MPlayer], [http://www.mpg123.de|mpg123], [http://www.xmms.org|XMMS] and so on) by opening the M3U playlist that LastBASH saves on connecting. But the recommended way is to use the LastBASH frontend features and let it run some compatible player in background (MPlayer or mpg123), that you can control through the same user interface. This way you need to have only one console open to listen and control Last.fm. +To listen to Last.fm, you can use any player capable of mp3 streaming (such as [http://www.mplayerhq.hu|MPlayer], [http://www.mpg123.de|mpg123], [http://www.xmms.org|XMMS] and so on) by opening the M3U playlist that LastBASH saves on connecting. +But the recommended way is to use the LastBASH frontend features and let it run some compatible player in background (MPlayer or mpg123), that you can control through the same user interface. +This way you need to have only one console open to listen and control Last.fm. = Last.fm = -This is shameless self-promotion, I know. You can find me on Last.fm as [http://www.last.fm/user/cstroie|cstroie] and, if you like this player and want to share your experience, you can join the [http://www.last.fm/group/LastBASH|LastBASH group] and tell others about it. +This is shameless self-promotion, I know. +You can find me on Last.fm as [http://www.last.fm/user/cstroie|cstroie] and, if you like this player and want to share your experience, you can join the [http://www.last.fm/group/LastBASH|LastBASH group] and tell others about it. = Website = The website is based on [http://blis.sourceforge.net|Blis], a personal content publishing system. + |
|
From: Costin S. <cs...@us...> - 2006-12-06 12:46:16
|
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24757 Modified Files: Features Log Message: Reviewed. Index: Features =================================================================== RCS file: /cvsroot/lastbash/blis_pages/Features,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Features 6 Dec 2006 12:31:38 -0000 1.1 +++ Features 6 Dec 2006 12:46:13 -0000 1.2 @@ -6,27 +6,31 @@ LastBASH is a console player for Last.fm. Even beta, it is quite usable. -Its purpose is to offer a simple interface to Last.fm services. +Its purpose is to offer a simple interface to Last.fm services, to allow you to listen to the streams while you are working in console. Or, maybe, when you don't want to use any graphical player. +LastBASH features the following: + +* nice and usable Text User Interface * authentication using the md5 password encryption * retrieves the metadata of the current playing track and displays it (artist, album, track name, track duration) * keeps a history of last played tracks * allows you to change the Last.fm station * allows you to control the Last.fm station, by issuing the ''love'', ''skip'' and ''ban'' commands -* optionally, it can run a backend player (such as MPlayer or mpg123), which you can control through the same interface, or lets you choose any external player you wish (capable of playing mp3 streams) +* optionally, it can run a backend player (such as MPlayer or mpg123), which you can control through the same interface, or lets you choose any external player you wish (capable of playing mp3 streams), such as XMMS, Rhythmbox or even Amarok, if you feel to * remote control (send commands and station changing) * easy integration with web browsers = Internal stuff = -The communication with the web service is accomplished internally by using routines to connect, request and parse the resulted data. +The communication with the web service is accomplished using external HTTP clients (wget or curl) or using the built-in client. -The TUI is created using some terminal features such as non-linear cursor movement, scrolling areas and color attributes. +The TUI is created using some terminal features such as non-linear cursor movement, scrolling areas and color attributes, so you need a compatible terminal (Linux or Xterm are tested and they work). Starting with version 0.3.0, the program uses '''tput''' instead of plain escape sequences. = Current version = -For the moment, it lacks documentation (aka manpage), I know, I am working on it. +For the moment, LastBASH lacks documentation (aka manpage), I know, I am working on it. -But, if you are brave enough, you can run it and, if you have MPlayer installed and some supported terminal (such as linux or xterm) it will work smoothly. +But, if you are brave enough, you can run it and, if you have ''MPlayer'' installed and some supported terminal (such as @@linux@@ or @@xterm@@) it will work smoothly. If you don't have MPlayer, open the playlist the program saves in @@~/.lastbash/playlist.m3u@@ with some streaming-capable mp3 player and play it. -You will be able to control Last.fm features from LastBASH and listen with your favourite player. +You will be able to control Last.fm features from LastBASH while listening the stream with your favourite player. + |
|
From: Costin S. <cs...@us...> - 2006-12-06 12:36:12
|
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20798 Modified Files: Download Log Message: Minor reparagraph. Index: Download =================================================================== RCS file: /cvsroot/lastbash/blis_pages/Download,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Download 6 Dec 2006 12:31:38 -0000 1.1 +++ Download 6 Dec 2006 12:36:09 -0000 1.2 @@ -4,19 +4,13 @@ (:DESCRIPTION:) Download a released version or the lates snapshot (:REVISION:) $Id$ -You can download one of the official releases or the latest snapshot from -CVS server. +You can download one of the official releases or the latest snapshot from the CVS server. == Download the release == -The releases can be found on the standard SourceForge -[ http://sourceforge.net/project/showfiles.php?group_id=182040 | project page ] -which will redirect you to the SourceForge mirrors. +The releases can be found on the standard SourceForge [ http://sourceforge.net/project/showfiles.php?group_id=182040 | project page ] which will redirect you to the SourceForge mirrors. == Download the lastest CVS snapshot == -For the latest snapshot, you have to use CVS, according to the -instructions from [ http://sourceforge.net/cvs/?group_id=182040 | this -page ], under the ''Anonymous CVS Access'' section. The ''modulename'' -is @@lastbash@@. +For the latest snapshot, you have to use CVS, according to the instructions from [ http://sourceforge.net/cvs/?group_id=182040 | this page ], under the ''Anonymous CVS Access'' section. The ''modulename'' is @@lastbash@@. |
|
From: Costin S. <cs...@us...> - 2006-12-06 12:34:37
|
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20055 Modified Files: ChangeLog Log Message: Added 0.3.0 ChangeLog. Index: ChangeLog =================================================================== RCS file: /cvsroot/lastbash/blis_pages/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ChangeLog 6 Dec 2006 12:31:38 -0000 1.1 +++ ChangeLog 6 Dec 2006 12:34:34 -0000 1.2 @@ -4,6 +4,20 @@ (:DESCRIPTION:) LastBASH ChangeLog (:REVISION:) $Id$ +'''v0.3.0''' +* Hide the cursor. +* Enter and leave terminal special mode. +* Use ncurses (tput) instead of direct escape sequences. +* Check for webservice errors. +* Multiple commands per call. +* Check for a minimum terminal size before start. +* Added support for external HTTP clients, fixed the Ubuntu related bug. +* Keep history in memory for redraw. +* Prevent race conditions in remote command calls. +* Use USR1 instead of HUP for remote command calls. +* Added a interruptible sleep function. +* Better quitting sequence (trap signals). + '''v0.2.3''' * Display the action (Love, Skip, Ban) in current track area and history. * Limit the line length in current track area. |
Update of /cvsroot/lastbash/blis_pages In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18831 Added Files: _404_ ChangeLog Download Features Home Install _Menu_ News Screenshots Usage Log Message: Blis pages added to cvs. --- NEW FILE: Features --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Console/terminal based player for Last.fm radio (:TITLE:) Features (:DESCRIPTION:) LastBASH Features (:REVISION:) $Id: Features,v 1.1 2006/12/06 12:31:38 cstroie Exp $ LastBASH is a console player for Last.fm. Even beta, it is quite usable. Its purpose is to offer a simple interface to Last.fm services. * authentication using the md5 password encryption * retrieves the metadata of the current playing track and displays it (artist, album, track name, track duration) * keeps a history of last played tracks * allows you to change the Last.fm station * allows you to control the Last.fm station, by issuing the ''love'', ''skip'' and ''ban'' commands * optionally, it can run a backend player (such as MPlayer or mpg123), which you can control through the same interface, or lets you choose any external player you wish (capable of playing mp3 streams) * remote control (send commands and station changing) * easy integration with web browsers = Internal stuff = The communication with the web service is accomplished internally by using routines to connect, request and parse the resulted data. The TUI is created using some terminal features such as non-linear cursor movement, scrolling areas and color attributes. = Current version = For the moment, it lacks documentation (aka manpage), I know, I am working on it. But, if you are brave enough, you can run it and, if you have MPlayer installed and some supported terminal (such as linux or xterm) it will work smoothly. If you don't have MPlayer, open the playlist the program saves in @@~/.lastbash/playlist.m3u@@ with some streaming-capable mp3 player and play it. You will be able to control Last.fm features from LastBASH and listen with your favourite player. --- NEW FILE: ChangeLog --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Last.fm console player (:TITLE:) ChangeLog (:DESCRIPTION:) LastBASH ChangeLog (:REVISION:) $Id: ChangeLog,v 1.1 2006/12/06 12:31:38 cstroie Exp $ '''v0.2.3''' * Display the action (Love, Skip, Ban) in current track area and history. * Limit the line length in current track area. * New headers for history. * Added support for Discovery mode. * Display the keys when the pressed key is not understood. * Basic URL encoding. '''v0.2.2''' * Search for available players. * Check for missing programs. * Support for remote commands and signalling. * Added support for terminal resize. '''v0.2.1''' * Added an area to display only the current track meta. History scrolling can be up or down. The player can be enabled or disabled. '''v0.1''' * LastBASH developping has started. * Added support for the xterm title. * Write a playlist when connecting. * Added support for the backend player, mplayer, for now. * Added support for terminal size detection. * The header and status bar scale the whole terminal width. * Added the RTP command. --- NEW FILE: _Menu_ --- % Main menu * [[ Home ]] * [[ News ]] * [[ Features ]] * [[ Usage ]] * [[ Screenshots ]] * [[ Download ]] * [[ Install ]] * [[ ChangeLog ]] --- NEW FILE: Download --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Last.fm console player (:TITLE:) Download LastBASH (:DESCRIPTION:) Download a released version or the lates snapshot (:REVISION:) $Id: Download,v 1.1 2006/12/06 12:31:38 cstroie Exp $ You can download one of the official releases or the latest snapshot from CVS server. == Download the release == The releases can be found on the standard SourceForge [ http://sourceforge.net/project/showfiles.php?group_id=182040 | project page ] which will redirect you to the SourceForge mirrors. == Download the lastest CVS snapshot == For the latest snapshot, you have to use CVS, according to the instructions from [ http://sourceforge.net/cvs/?group_id=182040 | this page ], under the ''Anonymous CVS Access'' section. The ''modulename'' is @@lastbash@@. --- NEW FILE: Install --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Last.fm console player (:TITLE:) Install and uninstall (:DESCRIPTION:) Installing and uninstalling LastBASH (:REVISION:) $Id: Install,v 1.1 2006/12/06 12:31:38 cstroie Exp $ LastBASH is a shell script. You do not need to install it to run. For a quick test, just run it from its current directory. == Run from the current directory == To test it, [[Download|download]] the latest release and follow the next steps. First, unpack the archive (replace the version number with the correct one) and enter the directory tar xzf lastbash-0.2.3.tar.gz cd lastbash-0.2.3 Then run the program (assuming @@bash@@ is your shell) ./lastbash Please see the [[Usage]] page for details on LastBASH usage. == Install == To perform an installation with default options, run the next command as root. make install If you like, parameters can be specified in the command line, like this. make prefix=/usr/bin install == Uninstall == To perform the uninstall process, type the next command (with or without some parameters in the command line) as root. make uninstall --- NEW FILE: Home --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Last.fm console player (:TITLE:) Introduction (:DESCRIPTION:) Introduction (:REVISION:) $Id: Home,v 1.1 2006/12/06 12:31:38 cstroie Exp $ LastBASH is a console/terminal based [http://www.last.fm|Last.fm] player. Although the [http://www.last.fm/tools/downloads|default Last.fm player] is a great one, it also is a graphical one and it could be somewhat inadequate for the die-hard terminal users, like some people I know. LastBASH tries to find its place among the other Last.fm players, filling this gap: the missing console player. Basically, it is no more than a <abbr title="Text User Interface">TUI</abbr> frontend, written in [http://www.gnu.org/software/bash|Bash]. It displays the information of the current playing track, keeps a history of the played tracks and allows the user to perform some actions on the current track, such as ''love'', ''skip'' or ''ban''. To listen to Last.fm, you can use any player capable of mp3 streaming (such as [http://www.mplayerhq.hu|MPlayer], [http://www.mpg123.de|mpg123], [http://www.xmms.org|XMMS] and so on) by opening the M3U playlist that LastBASH saves on connecting. But the recommended way is to use the LastBASH frontend features and let it run some compatible player in background (MPlayer or mpg123), that you can control through the same user interface. This way you need to have only one console open to listen and control Last.fm. = Last.fm = This is shameless self-promotion, I know. You can find me on Last.fm as [http://www.last.fm/user/cstroie|cstroie] and, if you like this player and want to share your experience, you can join the [http://www.last.fm/group/LastBASH|LastBASH group] and tell others about it. = Website = The website is based on [http://blis.sourceforge.net|Blis], a personal content publishing system. --- NEW FILE: Usage --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Console/terminal based player for Last.fm radio (:TITLE:) Usage (:DESCRIPTION:) Using LastBASH (:REVISION:) $Id: Usage,v 1.1 2006/12/06 12:31:38 cstroie Exp $ Please see the [[Install]] page for quick instructions about how to install and launch LastBASH. You must have a compatible terminal (linux or xterm are supported at the moment) and, if you wish to use the backend player, you should have MPlayer. For now. After you have donwloaded, extracted and installed the program, run it. You do not need to pass any command line parameters, at least at first start. lastbash It will ask your Last.fm username and password. You should have one. If not, hmmm... go and create an account on [http://www.last.fm|Last.fm] You can also pass the Last.fm station name to tune directly into it. For now, the url must be %-escaped (replace the SPACE characters with @@%20@@). lastbash lastfm://globaltags/rock lastbash lastfm://globaltags/classic%20rock lastbash lastfm://user/cstroie/neighbours lastbash lastfm://artist/Rammstein/similarartists Then, the program will try to connect. If it succeeds, it will save a playlist in @@~/.lastbash/playlist.m3u@@, for you to open with some external player, if you don't want to use the backend it provides. If you have MPlayer (for the moment, this is the backend), it will start playing automatically. If not, you will have to tell LastBASH not to try to run it by creating the @@~/.lastbash/config@@ file and adding this line: USE_PLAYER="n" Then, open your favourite mp3 player, load the above-mentioned playlist and start playing. LastBASH will show you the current playing track, will keep a history of last played tracks and will allow you to control the stream. For example, to run MPlayer manually (just an example), run it this way: mplayer -cache 512 -playlist ~/.lastbash/playlist.m3u If you like xmms, run it this way (or just run it and open the playlist): xmms ~/.lastbash/playlist.m3u To use mpg123, the command is the following: mpg123 -C -v -@ ~/.lastbash/playlist.m3u Enjoy! = Remote control = If one instance of LastBASH is already running, a second call can send commands to the first one, for example: lastbash -c LOVE lastbash -c SKIP lastbash -c BAN Or you can change the station this way. lastbash lastfm://group/LastBASH = Mozilla Firefox integration = Open Firefox and type in the address bar the following. about:config Right click and select ''New > String ''. As name type the next string and press '''OK'''. network.protocol-handler.app.lastfm As value type the full path to the LastBASH programs, something like this one. /usr/bin/lastbash Now, go to [http://www.last.fm|Last.fm] and click any ''lastfm://'' url. This will launch a second instance of the program and pass to the first one the new station. = Key bindings = Basic key bindings are the following: :l:Love track :k:Skip track :b:Ban track :r:Refresh track metadata (refresh is automatic, but if you need to, you can use this key to force a refresh) :p:Toggle ''"Record to Profile"'' (the '''P''' led will change status) :d:Toggle ''"Discovery mode"'' (the '''D''' led will change status) :q:Quit (and stop the backend player too) --- NEW FILE: News --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Last.fm console player (:TITLE:) News (:DESCRIPTION:) News (:REVISION:) $Id: News,v 1.1 2006/12/06 12:31:38 cstroie Exp $ :2006.11.28 v0.2.3: The remote call support has been improved. The history has new headings and the action (Love, Skip, Ban) is displayed. The keys are displayed when the pressed key is not understood. :2006.11.22 v0.2.2: Some new and interesting features added. Search for available players. Support for remote commands and signalling. Added support for terminal resize. :2006.11.16 v0.2: This realease brings a better user interface, displaying separately the current track info and history. The interface uses all terminal width. You should expect bugs, though. :2006.11.13 v0.1: A quick snapshot of the first beta of LastBASH. It plays. = ChangeLog = For more details, please see the [[ChangeLog]]. --- NEW FILE: Screenshots --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Last.fm console player (:TITLE:) Screenshots (:DESCRIPTION:) LastBASH screenshots (:REVISION:) $Id: Screenshots,v 1.1 2006/12/06 12:31:38 cstroie Exp $ == Version 0.2.4 == [[image:thumbnails/lastbash-0.2.4.png | LastBASH 0.2.4 playing ]] Normal operation of LastBASH. You can see the new history header, the action in the current playing area and in history (the first letter). The status bar shows the current listening station, the Last.fm user name and the status leds. Click [ /blis/images/lastbash-0.2.4.png | here ] for full-size image. == Version 0.2 == [[image:thumbnails/lastbash-0.2.png | LastBASH 0.2 playing ]] This is normal LastBASH operation. You can see the current track details on top and the history on bottom. The status bar displays the current station we are listening to, the Last.fm user name and the leds (the active led is "Record to Profile"). Click [ /blis/images/lastbash-0.2.png | here ] for full-size image. For more, please see the screenshots from [ http://sourceforge.net/project/screenshots.php?group_id=182040 | the project page]. --- NEW FILE: _404_ --- (:SITE_NAME:) LastBASH (:SITE_DESCRIPTION:) Last.fm console player (:TITLE:) Page not found (:DESCRIPTION:) We are sorry. The page you were looking for is not here. (:REVISION:) $Id: _404_,v 1.1 2006/12/06 12:31:38 cstroie Exp $ '''Obi-Wan:''' This is not the page you are looking for.<br> '''Trooper:''' This is not the page we're looking for.<br> '''Obi-Wan:''' You can go about your business.<br> '''Trooper:''' We can go about our business.<br> '''Obi-Wan:''' Move along.<br> '''Trooper:''' [[Home | Move along... move along]]. |
|
From: Costin S. <cs...@us...> - 2006-12-06 12:13:35
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11997 Modified Files: lastbash Log Message: Sleep is internal function. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- lastbash 5 Dec 2006 21:39:55 -0000 1.82 +++ lastbash 6 Dec 2006 12:13:32 -0000 1.83 @@ -63,7 +63,7 @@ # Internal stuff PLAYERS="mplayer" HTTP_CLIENTS="wget curl" -REQ_PROGRAMS="rm date sleep tput md5sum dd chmod" +REQ_PROGRAMS="rm date tput md5sum dd chmod" declare -a HTTP_HEADERS HTTP_RESPONSE declare -a HISTORY_ARTIST HISTORY_ALBUM HISTORY_TRACK HISTORY_DURATION HISTORY_MIN_SEC HISTORY_ACTION CR=$'\x0d' |
|
From: Costin S. <cs...@us...> - 2006-12-06 12:12:59
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11594 Modified Files: ChangeLog Log Message: ChangeLog for 0.3.0. Index: ChangeLog =================================================================== RCS file: /cvsroot/lastbash/lastbash/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChangeLog 28 Nov 2006 17:28:45 -0000 1.3 +++ ChangeLog 6 Dec 2006 12:12:51 -0000 1.4 @@ -1,3 +1,17 @@ +v0.3.0 +* Hide the cursor. +* Enter and leave terminal special mode. +* Use ncurses (tput) instead of direct escape sequences. +* Check for webservice errors. +* Multiple commands per call. +* Check for a minimum terminal size before start. +* Added support for external HTTP clients, fixed the Ubuntu related bug. +* Keep history in memory for redraw. +* Prevent race conditions in remote command calls. +* Use USR1 instead of HUP for remote command calls. +* Added a interruptible sleep function. +* Better quitting sequence (trap signals). + v0.2.3 * Display the action (Love, Skip, Ban) in current track area and history. * Limit the line length in current track area. |
|
From: Costin S. <cs...@us...> - 2006-12-05 23:06:03
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32375 Modified Files: TODO Log Message: New todo. Index: TODO =================================================================== RCS file: /cvsroot/lastbash/lastbash/TODO,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- TODO 5 Dec 2006 15:43:17 -0000 1.14 +++ TODO 5 Dec 2006 23:05:55 -0000 1.15 @@ -2,6 +2,7 @@ # $Id$ TODO +- use getopts - use arrow keys to browse the history - add more led monitored stuff - improve player support |
|
From: Costin S. <cs...@us...> - 2006-12-05 21:39:58
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30372 Modified Files: lastbash Log Message: Display tui_current at start. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- lastbash 5 Dec 2006 21:00:09 -0000 1.81 +++ lastbash 5 Dec 2006 21:39:55 -0000 1.82 @@ -1872,6 +1872,7 @@ # Start the Text User Interface tui_start +tui_current # Trap INT, TERM, HUP and EXIT signals trap sigint INT TERM HUP |
|
From: Costin S. <cs...@us...> - 2006-12-05 21:00:14
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv13937 Modified Files: lastbash Log Message: Added a timing function to tui_sbar. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- lastbash 5 Dec 2006 20:35:58 -0000 1.80 +++ lastbash 5 Dec 2006 21:00:09 -0000 1.81 @@ -897,14 +897,36 @@ echo -ne "${T_COLOR_WHITE}${T_BGCOLOR_BLUE}${LINE}${T_COLOR_NORMAL}" } +# Function: Display the status bar and control the timing {{{1 +#----------------------------------------------------------------------------- +function tui_sbar() +{ + # $1 - the text to print + # $2 - interval (seconds) before restoring default status bar + + if [ "$1" ] + then + # Display the status + tui_statusbar "$1" + if [ "$2" ] + then + # If timed, sleep and display the default status + sleep "$2" + tui_statusbar + fi + else + # Display default status + tui_statusbar + fi +} # Function: Display the status bar {{{1 #----------------------------------------------------------------------------- -function tui_sbar() +function tui_statusbar() { # $1 - the text to print - local LINE L1 L2 L3 L4 S + local LINE L1 L2 L3 L4 S MSG # Set the leds # - R: the player is running # - P: record to profile is on @@ -917,16 +939,19 @@ # Compute the main field size S=$(( T_COLUMNS - 27 )) - # Format the status line + # Set the message to display if [ "$1" ] then - printf -v LINE " %-${S}s %-15s [%c%c%c%c] " "${1:0:$S}" "${LASTFM_USER}" "${L1}" "${L2}" "${L3}" "${L4}" + MSG="${1}" elif [ "${META_STREAMING}" == "true" ] then - printf -v LINE " %-${S}s %-15s [%c%c%c%c] " "${META_STATION:0:$S}" "${LASTFM_USER}" "${L1}" "${L2}" "${L3}" "${L4}" + MSG="${META_STATION}" else - printf -v LINE " %-${S}s %-15s [%c%c%c%c] " "Not streaming, please launch the player" "${LASTFM_USER}" "${L1}" "${L2}" "${L3}" "${L4}" + MSG="Not streaming, please launch the player" fi + + # Format the status line + printf -v LINE " %-${S}s %-15s [%c%c%c%c] " "${MSG:0:$S}" "${LASTFM_USER}" "${L1}" "${L2}" "${L3}" "${L4}" # Move the cursor on lower-left corner and print tput cup ${T_LINES} 0 echo -ne "${T_COLOR_WHITE}${T_BGCOLOR_BLUE}${LINE}${T_COLOR_NORMAL}" @@ -1171,10 +1196,10 @@ else RET="1" tui_sbar "Metadata retrieving failed" - sleep 1 fi - # Set the new status bar + # Restore the status bar + sleep 1 tui_sbar # Return the status code @@ -1531,11 +1556,7 @@ sleep 1 # Update the status line - tui_sbar "Stream loaded and playing" - - # Restore the status bar - sleep 1 - tui_sbar + tui_sbar "Stream loaded and playing" "1" } # Function: Stop playing {{{1 @@ -1578,11 +1599,7 @@ rm -f "${PLAYER_PIPE}" # Set the status line - tui_sbar "Player closed" - - # Restore the status bar - sleep 1 - tui_sbar + tui_sbar "Player closed" "1" } # Function: Check if another instance is running {{{1 @@ -1649,11 +1666,7 @@ # FIXME Terminal left in wrong status "QUIT") quit 0 ;; # Any other command - *) - tui_sbar "Command not understood: $1" - sleep 1 - tui_sbar - ;; + *) tui_sbar "Command not understood: $1" "1" ;; esac } @@ -1729,9 +1742,7 @@ #----------------------------------------------------------------------------- function sigtstp() { - tui_sbar "Cannot suspend" - sleep 1 - tui_sbar + tui_sbar "Cannot suspend" "1" } # Function: The read key loop {{{1 |
|
From: Costin S. <cs...@us...> - 2006-12-05 20:36:06
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4012 Modified Files: lastbash Log Message: Added the sleep function, interruptible by keypress. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- lastbash 5 Dec 2006 17:09:32 -0000 1.79 +++ lastbash 5 Dec 2006 20:35:58 -0000 1.80 @@ -121,6 +121,16 @@ echo "${1// /%20}" } +# Function: Sleep function (interrupted by keypress) {{{1 +#----------------------------------------------------------------------------- +function sleep() +{ + # $1 - seconds to sleep + + read -n 1 -s -t "$1" SLEEP_KEY +} + + # Function: Initialization {{{1 #----------------------------------------------------------------------------- function init() @@ -1731,7 +1741,7 @@ local KEY DONE while [ ! "${DONE}" ] do - read -n 1 -s -t ${REFRESH_INTERVAL} KEY + read -n 1 -s -t "${REFRESH_INTERVAL}" KEY case "${KEY}" in "r") tui_metadata ;; "l") tui_lastfm_command_love ;; |
|
From: Costin S. <cs...@us...> - 2006-12-05 17:09:39
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv13693 Modified Files: lastbash Log Message: Using USR1 instead on HUP. HUP is used when xterm exits. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- lastbash 5 Dec 2006 16:46:38 -0000 1.78 +++ lastbash 5 Dec 2006 17:09:32 -0000 1.79 @@ -1615,7 +1615,7 @@ # Remove the lock rm -f "${COMMAND_FILE_LOCK}" # Signal the first instance - kill -HUP "$(< $PID_FILE)" + kill -USR1 "$(< $PID_FILE)" else echo "Lockfile present, commands not sent" fi @@ -1647,9 +1647,9 @@ esac } -# Function: Receive the HUP signal {{{1 +# Function: Receive the USR1 signal {{{1 #----------------------------------------------------------------------------- -function sighup() +function sigusr1() { local CMD ARGS @@ -1714,6 +1714,16 @@ fi } + +# Function: Receive the TSTP signal {{{1 +#----------------------------------------------------------------------------- +function sigtstp() +{ + tui_sbar "Cannot suspend" + sleep 1 + tui_sbar +} + # Function: The read key loop {{{1 #----------------------------------------------------------------------------- function read_key_loop() @@ -1830,22 +1840,25 @@ # Now, let's save the PID echo -n $$ > "${PID_FILE}" -# And trap the HUP signal -trap sighup HUP +# And trap the USR1 signal +trap sigusr1 USR1 # Trap the WINCH signal, too trap sigwinch WINCH -# Trap INT, TERM and EXIT signals -trap sigint INT TERM -trap sigexit EXIT - # Initialize the terminal term_init # Start the Text User Interface tui_start +# Trap INT, TERM, HUP and EXIT signals +trap sigint INT TERM HUP +trap sigexit EXIT + +# Trap TSTP (suspend) +trap sigtstp TSTP + # Next, connect to the Last.fm station if tui_lastfm_connect then |
|
From: Costin S. <cs...@us...> - 2006-12-05 16:47:34
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4057 Modified Files: lastbash Log Message: Prevent race conditions in remote calls. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- lastbash 5 Dec 2006 16:42:36 -0000 1.77 +++ lastbash 5 Dec 2006 16:46:38 -0000 1.78 @@ -1605,10 +1605,9 @@ { # $@ - the commands - if [ -f "${COMMAND_FILE_LOCK}" ] + # Check and create the lock + if ( set -o noclobber; echo "$$" > "${COMMAND_FILE_LOCK}" ) 2>/dev/null then - echo "Lockfile present, commands not sent" - else # Create the lock echo "$$" > "${COMMAND_FILE_LOCK}" # Send the commands @@ -1617,6 +1616,8 @@ rm -f "${COMMAND_FILE_LOCK}" # Signal the first instance kill -HUP "$(< $PID_FILE)" + else + echo "Lockfile present, commands not sent" fi } @@ -1652,13 +1653,9 @@ { local CMD ARGS - if [ -f "${COMMAND_FILE_LOCK}" ] + # Check and create the lock + if ( set -o noclobber; echo "$$" > "${COMMAND_FILE_LOCK}" ) 2>/dev/null then - tui_sbar "Lockfile present, remote call ignored" - else - # Create the lock - echo "$$" > "${COMMAND_FILE_LOCK}" - # Check the command file exists if [ -f "${COMMAND_FILE}" ] then @@ -1677,6 +1674,8 @@ # Remove the lock rm -f "${COMMAND_FILE_LOCK}" + else + tui_sbar "Lockfile present, remote call ignored" fi # Restore the status bar |
|
From: Costin S. <cs...@us...> - 2006-12-05 16:42:43
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2471 Modified Files: lastbash Log Message: Better support for quitting by trapping signals. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- lastbash 5 Dec 2006 15:39:26 -0000 1.76 +++ lastbash 5 Dec 2006 16:42:36 -0000 1.77 @@ -236,6 +236,29 @@ fi } +# Function: Quit {{{1 +#----------------------------------------------------------------------------- +function quit() +{ + # $1 - exit code + + if [ "${FIRST_INSTANCE}" ] + then + # One last message + tui_sbar "Quitting. Good bye." + + # Stop the player, if running + player_stop + + # Restore the terminal + term_exit + + # Eventually, save the settings + #save_settings + fi + exit $1 +} + # Function: Save the settings {{{1 #----------------------------------------------------------------------------- function save_settings() @@ -1612,7 +1635,8 @@ "LOVE") tui_lastfm_command_love ;; "RTP") tui_lastfm_rtp ;; # Quit - #"QUIT") DONE="y" ;; + # FIXME Terminal left in wrong status + "QUIT") quit 0 ;; # Any other command *) tui_sbar "Command not understood: $1" @@ -1673,6 +1697,23 @@ tui_history_redisplay } +# Function: Receive the INT and TERM signals {{{1 +#----------------------------------------------------------------------------- +function sigint() +{ + quit 0 +} + +# Function: Receive the EXIT signal {{{1 +#----------------------------------------------------------------------------- +function sigexit() +{ + if [ "${FIRST_INSTANCE}" ] + then + # Remove stale files + rm -f "${PID_FILE}" "${PLAYER_PIPE}" "${COMMAND_FILE}" "${COMMAND_FILE_LOCK}" + fi +} # Function: The read key loop {{{1 #----------------------------------------------------------------------------- @@ -1744,11 +1785,14 @@ debug " Debug started on `date`" debug "------------------------------------------------" +# Set a parameter, if this is the first instance +first_instance && FIRST_INSTANCE="y" + # This should be the Last.fm station if [[ "$1" =~ "^lastfm://" ]] then # This is the new station to tune into - if first_instance + if [ "${FIRST_INSTANCE}" ] then # Store the station to load after the init LASTFM_STATION="$1" @@ -1765,7 +1809,7 @@ fi # Check if this is not the first instance -if ! first_instance +if [ ! "${FIRST_INSTANCE}" ] then # Check if there is a command to execute if [ "${LASTFM_COMMAND}" ] @@ -1774,7 +1818,7 @@ exit 0 else # Nothing to do - echo "There is another program instance running" + echo "There is another program instance running (PID: $(<${PID_FILE}))" exit 1 fi fi @@ -1788,10 +1832,14 @@ # Now, let's save the PID echo -n $$ > "${PID_FILE}" # And trap the HUP signal -trap sighup SIGHUP +trap sighup HUP # Trap the WINCH signal, too -trap sigwinch SIGWINCH +trap sigwinch WINCH + +# Trap INT, TERM and EXIT signals +trap sigint INT TERM +trap sigexit EXIT # Initialize the terminal term_init @@ -1808,17 +1856,12 @@ tui_metadata # Enter the readkey loop read_key_loop - # Stop the player - player_stop else # Wait for the user read the status and exit read -n 1 -s -t ${REFRESH_INTERVAL} JUNK fi -# Restore the terminal -term_exit - -# On exit, save the data -#save_settings +# Quit +quit 0 # vim: set ft=sh nowrap nu foldmethod=marker: |
|
From: Costin S. <cs...@us...> - 2006-12-05 15:43:24
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11159 Modified Files: TODO Log Message: One more to do. Index: TODO =================================================================== RCS file: /cvsroot/lastbash/lastbash/TODO,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TODO 5 Dec 2006 15:40:42 -0000 1.13 +++ TODO 5 Dec 2006 15:43:17 -0000 1.14 @@ -2,6 +2,7 @@ # $Id$ TODO +- use arrow keys to browse the history - add more led monitored stuff - improve player support - add more players |
|
From: Costin S. <cs...@us...> - 2006-12-05 15:40:48
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10019 Modified Files: TODO Log Message: One more done. Index: TODO =================================================================== RCS file: /cvsroot/lastbash/lastbash/TODO,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TODO 30 Nov 2006 21:49:24 -0000 1.12 +++ TODO 5 Dec 2006 15:40:42 -0000 1.13 @@ -10,10 +10,10 @@ - save a html file with album cover, links, etc. - maybe save a csv history file - add support for changing stations in interface -- improve support for interface refresh (keep history) - add support for color and bw interface DONE +- improve support for interface refresh (keep history) - implement the leds - maybe mark the loved/banned/skipped tracks - more commands per remote call |