lastbash-cvs Mailing List for Last.fm console player (Page 3)
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...> - 2007-03-05 12:43:06
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12965 Modified Files: Makefile Log Message: Removed the debian stuff. Index: Makefile =================================================================== RCS file: /cvsroot/lastbash/lastbash/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 25 Jan 2007 16:54:13 -0000 1.6 +++ Makefile 5 Mar 2007 12:42:53 -0000 1.7 @@ -23,20 +23,11 @@ datadir = $(DESTDIR)$(prefix)/share/$(name) srcdir = . -# Debian stuff -ifdef DEB - revision = 1 - DESTDIR = /tmp/$(name) - prefix = /usr - docdir = $(DESTDIR)$(prefix)/share/doc/$(name) - DEB_CONTROL = debian/control - DEB_CHLOG = debian/changelog -endif - # Tools MKDIR = mkdir INSTALL = install RM = rm +SED = sed # Tools configuration MK_DIR = $(MKDIR) -p -m 755 @@ -58,8 +49,14 @@ %.html: % groff -man -Thtml $< > $@ +# Configure +config: lastbash.config + +lastbash.config: lastbash.config.in + $(SED) -e '/^HTML_TEMPLATE/s/@HTML_TEMPLATE@/$${HOME_DIR}\/lastbash-template.html/g' $< > $@ + # Install section -install: install_dirs install_prog install_conf install_man install_doc +install: config install_dirs install_prog install_conf install_man install_doc install_dirs: $(MK_DIR) $(bindir) $(confdir) $(man1dir) $(docdir) $(datadir) @@ -87,25 +84,14 @@ for i in $(conflist); do $(RM) -f $(confdir)/$$i; done for i in $(man1list); do $(RM) -f $(man1dir)/$$i; done +clean: + $(RM) -f *.ps *.html + +distclean: + $(RM) -f lastbash.config + # Packaging pack: cd .. && tar zcvf /tmp/$(name)-$(version).tar.gz $(name)-$(version) -deb: - $(MAKE) DEB=1 install - $(MAKE) DEB=1 deb_files - $(MAKE) DEB=1 deb_build - -deb_files: - mkdir $(DESTDIR)/DEBIAN - sed -e '/Version:/s/@VERSION@/$(version)-$(revision)/' < $(DEB_CONTROL) > $(DESTDIR)/DEBIAN/control - cp $(DEB_CHLOG) $(docdir)/changelog - mv $(docdir)/COPYING $(docdir)/copyright - find $(docdir) -type f -exec gzip -9 {} \; - find $(mandir) -type f -exec gzip -9 {} \; - find $(DESTDIR) -type d -exec chmod 755 {} \; - -deb_build: - cd /tmp && fakeroot dpkg-deb --build $(name) . - # vim: set ft=make nowrap nu: |
|
From: Costin S. <cs...@us...> - 2007-03-05 12:42:36
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12892 Added Files: lastbash.config.in Log Message: The initial config file. --- NEW FILE: lastbash.config.in --- # LastBASH Configuration file # This file should be placed in '/etc/lastbash.config' or '~/.lastbash/config' # Enable debug mode. Possible values: 'y' or 'n' DEBUG="n" # History scrolling direction: up or down. Possible values: 'y' or 'n' HISTORY_SCROLL_DOWN="y" # Relative proportions of the history field units: artist, album and title. HISTORY_FIELD_UNITS=(2 2 3) # Metadata refresh interval, in seconds. REFRESH_INTERVAL="30" # Use the backend player. Possible values: 'y' or 'n' USE_PLAYER="y" # Backend player to use. Possible values: 'mplayer', 'auto' PLAYER="auto" # Automatically start playing. Possible values: 'y' or 'n' AUTO_PLAY="y" # HTTP client to use. Possible values: 'wget', 'curl', 'builtin', 'auto' HTTP_CLIENT="auto" # Save the metadata (artist-track) of the current playing track to a file SAVE_NOWPLAYING="y" # Save the metadata of the current playing track to a html file SAVE_HTML="y" # The location of the html template HTML_TEMPLATE="@HTML_TEMPLATE@" # Save history in CVS format SAVE_HISTORY_CSV="y" |
|
From: Costin S. <cs...@us...> - 2007-03-05 12:42:13
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12480 Removed Files: lastbash.config Log Message: This should be generated at install time. --- lastbash.config DELETED --- |
|
From: Costin S. <cs...@us...> - 2007-03-05 12:40:42
|
Update of /cvsroot/lastbash/lastbash/debian In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11809 Added Files: compat conffiles copyright lastbash.dirs lastbash.docs lastbash.install lastbash.manpages lastbash.menu rules watch Log Message: Added debian specific files. --- NEW FILE: lastbash.menu --- ?package(lastbash):needs="text" section="Apps/Sound" title="LastBASH" command="lastbash" --- NEW FILE: lastbash.docs --- AUTHORS README TODO --- NEW FILE: copyright --- This is LastBASH, written and maintained by Costin Stroie <cs...@us...> The original source can always be found at: http://sourceforge.net/projects/lastbash Copyright Holder: Costin Stroie <cs...@us...> License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. --- NEW FILE: lastbash.install --- lastbash usr/bin lastbash.config etc html/lastbash.html usr/share/lastbash --- NEW FILE: rules --- #!/usr/bin/make -f # -*- makefile -*- # LastBASH debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: build-stamp lastbash-config lastbash-config: lastbash.config lastbash.config: lastbash.config.in sed -e '/^HTML_TEMPLATE/s/@HTML_TEMPLATE@/\/usr\/share\/lastbash\/lastbash.html/g' $< > $@ build-stamp: configure-stamp dh_testdir touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp lastbash.config dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs dh_install dh_installman dh_installchangelogs ChangeLog dh_installdocs dh_installmenu # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples # dh_install # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_python # dh_installinit # dh_installcron # dh_installinfo dh_installman dh_link dh_strip dh_compress dh_fixperms # dh_perl # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure --- NEW FILE: lastbash.dirs --- usr/bin usr/share/man/man1 usr/share/lastbash --- NEW FILE: conffiles --- --- NEW FILE: compat --- 4 --- NEW FILE: watch --- # Compulsory line, this is a version 3 file version=3 # Find new files on sourceforge, for debscripts >= 2.9 http://sf.net/lastbash/lastbash-(.*)\.tar\.gz --- NEW FILE: lastbash.manpages --- lastbash.1 |
|
From: Costin S. <cs...@us...> - 2007-03-05 12:40:16
|
Update of /cvsroot/lastbash/lastbash/debian In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11441 Modified Files: control Log Message: Better control file. Index: control =================================================================== RCS file: /cvsroot/lastbash/lastbash/debian/control,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- control 25 Jan 2007 16:54:13 -0000 1.1 +++ control 5 Mar 2007 12:40:11 -0000 1.2 @@ -1,12 +1,20 @@ +Source: lastbash +Section: contrib/sound +Priority: extra +Maintainer: Costin Stroie <cs...@us...> +Build-Depends: debhelper +Standards-Version: 3.7.2 + Package: lastbash -Version: @VERSION@ -Architecture: i386 -Priority: optional -Maintainer: Costin STROIE <cs...@us...> -Depends: bash (>= 3.0), tput, coreutils +Architecture: all +Section: contrib/sound +Priority: extra +Depends: bash (>= 3.1), tput, coreutils, wget +Recommends: mplayer | mpg123 +Suggests: curl Description: Console player for Last.fm - 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. - LastBASH tries to find its place among the other Last.fm players, + 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. + LastBASH tries to find its place among the other Last.fm players, filling this gap: the missing console player. |
|
From: Costin S. <cs...@us...> - 2007-03-05 12:39:59
|
Update of /cvsroot/lastbash/lastbash/debian In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11306 Modified Files: changelog Log Message: New package. Index: changelog =================================================================== RCS file: /cvsroot/lastbash/lastbash/debian/changelog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- changelog 25 Jan 2007 16:54:13 -0000 1.1 +++ changelog 5 Mar 2007 12:39:54 -0000 1.2 @@ -1,4 +1,12 @@ -lastbash (0.3.2) unstable; urgency=low +lastbash (0.3.2-2) unstable; urgency=low + + * Added the copyright, conffiles, dir and watch files. + + * Use the recommended debian way to build the package. + + -- Costin STROIE <cs...@us...> Mon, 05 Mar 2007 12:24:28 +0200 + +lastbash (0.3.2-1) unstable; urgency=low * Initial Debian package. |
|
From: Costin S. <cs...@us...> - 2007-02-08 17:15:19
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24598 Modified Files: lastbash Log Message: Improved the support for html output and csv file. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- lastbash 7 Feb 2007 13:09:44 -0000 1.118 +++ lastbash 8 Feb 2007 17:14:41 -0000 1.119 @@ -176,22 +176,32 @@ # @TITLE@ @COVER_URL@ @ARTIST_URL@ @ARTIST_NAME@ @TRACK_URL@ @LENGTH@ # @TRACK_NAME@ @ALBUM_URL@ @ALBUM_NAME@ @STATION_URL@ @STATION_NAME@ - local META_COVER + local COVER_URL ARTIST_URL ARTIST_NAME TRACK_URL LENGTH TRACK_NAME ALBUM_URL ALBUM_NAME STATION_URL STATION_NAME - # Some checks + # Some safety checks [ "${META_COVER}" ] && COVER_URL="${META_COVER}" || COVER_URL="http://static.last.fm/depth/catalogue/noimage/cover_large.gif" + ARTIST_NAME="${META_ARTIST//&/\&}" + TRACK_NAME="${META_TRACK//&/\&}" + ALBUM_NAME="${META_ALBUM//&/\&}" + STATION_NAME="${META_STATION//&/\&}" + + [ "${META_ARTIST_URL}" ] && ARTIST_URL="${META_ARTIST_URL}" || ARTIST_URL="#" + [ "${META_TRACK_URL}" ] && TRACK_URL="${META_TRACK_URL}" || ARTIST_URL="#" + [ "${META_ALBUM_URL}" ] && ALBUM_URL="${META_ALBUM_URL}" || ARTIST_URL="#" + [ "${META_STATION_URL}" ] && STATION_URL="${META_STATION_URL}" || ARTIST_URL="#" + cat "${HTML_TEMPLATE}" | \ - sed -e "/@TITLE@/s#@TITLE@#${META_ARTIST} - ${META_TRACK}#g" | \ - sed -e "/@COVER_URL@/s#@COVER_URL@#${META_COVER}#g" | \ - sed -e "/@ARTIST_URL@/s#@ARTIST_URL@#${META_ARTIST_URL}#g" | \ - sed -e "/@ARTIST_NAME@/s#@ARTIST_NAME@#${META_ARTIST}#g" | \ - sed -e "/@TRACK_URL@/s#@TRACK_URL@#${META_TRACK_URL}#g" | \ - sed -e "/@TRACK_NAME@/s#@TRACK_NAME@#${META_TRACK}#g" | \ - sed -e "/@ALBUM_URL@/s#@ALBUM_URL@#${META_ALBUM_URL}#g" | \ - sed -e "/@ALBUM_NAME@/s#@ALBUM_NAME@#${META_ALBUM}#g" | \ - sed -e "/@STATION_URL@/s#@STATION_URL@#${META_STATION}#g" | \ - sed -e "/@STATION_NAME@/s#@STATION_NAME@#${META_STATION}#g" | \ + sed -e "/@TITLE@/s#@TITLE@#${ARTIST_NAME} - ${TRACK_NAME}#g" | \ + sed -e "/@COVER_URL@/s#@COVER_URL@#${COVER_URL}#g" | \ + sed -e "/@ARTIST_URL@/s#@ARTIST_URL@#${ARTIST_URL}#g" | \ + sed -e "/@ARTIST_NAME@/s#@ARTIST_NAME@#${ARTIST_NAME}#g" | \ + sed -e "/@TRACK_URL@/s#@TRACK_URL@#${TRACK_URL}#g" | \ + sed -e "/@TRACK_NAME@/s#@TRACK_NAME@#${TRACK_NAME}#g" | \ + sed -e "/@ALBUM_URL@/s#@ALBUM_URL@#${ALBUM_URL}#g" | \ + sed -e "/@ALBUM_NAME@/s#@ALBUM_NAME@#${ALBUM_NAME}#g" | \ + sed -e "/@STATION_URL@/s#@STATION_URL@#${STATION_URL}#g" | \ + sed -e "/@STATION_NAME@/s#@STATION_NAME@#${STATION_NAME}#g" | \ sed -e "/@LENGTH@/s#@LENGTH@#${META_MIN_SEC}#g" > "${HTML_FILE}" } @@ -213,8 +223,17 @@ # The first row contains the columns titles [ -f "${HISTORY_CVS_FILE}" ] || echo "\"Artist\",\"Album\",\"Track\",\"Length\",\"Action\"" > "${HISTORY_CVS_FILE}" + local ARTIST ALBUM TRACK DURATION ACTION + + # Safety stuff + ARTIST="${HISTORY_ARTIST[$1]//\"/\"\"}" + ALBUM="${HISTORY_ALBUM[$1]//\"/\"\"}" + TRACK="${HISTORY_TRACK[$1]//\"/\"\"}" + DURATION="${HISTORY_DURATION[$1]//\"/\"\"}" + ACTION="${HISTORY_ACTION[$1]//\"/\"\"}" + # Save the history items - echo "\"${HISTORY_ARTIST[$1]}\",\"${HISTORY_ALBUM[$1]}\",\"${HISTORY_TRACK[$1]}\",\"${HISTORY_DURATION[$1]}\",\"${HISTORY_ACTION[$1]}\"" >> "${HISTORY_CVS_FILE}" + echo "\"${ARTIST}\",\"${ALBUM}\",\"${TRACK}\",\"${DURATION}\",\"${ACTION}\"" >> "${HISTORY_CVS_FILE}" } # Function: Print usage summary {{{1 |
|
From: Costin S. <cs...@us...> - 2007-02-08 17:13:40
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24154 Modified Files: lastbash.config Log Message: Added the location of the html template. Index: lastbash.config =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash.config,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- lastbash.config 5 Feb 2007 13:23:29 -0000 1.3 +++ lastbash.config 8 Feb 2007 17:13:24 -0000 1.4 @@ -31,5 +31,9 @@ # Save the metadata of the current playing track to a html file SAVE_HTML="y" +# The location of the html template +HTML_TEMPLATE="${HOME_DIR}/lastbash-template.html" + # Save history in CVS format SAVE_HISTORY_CSV="y" + |
|
From: Costin S. <cs...@us...> - 2007-02-07 13:10:04
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32073 Modified Files: lastbash Log Message: Use a default cover if missing. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- lastbash 5 Feb 2007 13:41:52 -0000 1.117 +++ lastbash 7 Feb 2007 13:09:44 -0000 1.118 @@ -176,6 +176,11 @@ # @TITLE@ @COVER_URL@ @ARTIST_URL@ @ARTIST_NAME@ @TRACK_URL@ @LENGTH@ # @TRACK_NAME@ @ALBUM_URL@ @ALBUM_NAME@ @STATION_URL@ @STATION_NAME@ + local META_COVER + + # Some checks + [ "${META_COVER}" ] && COVER_URL="${META_COVER}" || COVER_URL="http://static.last.fm/depth/catalogue/noimage/cover_large.gif" + cat "${HTML_TEMPLATE}" | \ sed -e "/@TITLE@/s#@TITLE@#${META_ARTIST} - ${META_TRACK}#g" | \ sed -e "/@COVER_URL@/s#@COVER_URL@#${META_COVER}#g" | \ |
|
From: Costin S. <cs...@us...> - 2007-02-05 13:42:45
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19605 Modified Files: lastbash Log Message: Added experimental support for saving csv formatted history. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 --- lastbash 29 Jan 2007 16:47:37 -0000 1.116 +++ lastbash 5 Feb 2007 13:41:52 -0000 1.117 @@ -32,6 +32,7 @@ HTTP_CLIENT="auto" # $HTTP_CLIENTS, builtin, auto SAVE_NOWPLAYING="y" SAVE_HTML="y" +SAVE_HISTORY_CSV="y" # Program identification PROG_NAME="lastbash" @@ -62,6 +63,7 @@ COMMAND_FILE="${HOME_DIR}/command" COMMAND_FILE_LOCK="${HOME_DIR}/command.lock" NOWPLAYING_FILE="${HOME_DIR}/now_playing" +HISTORY_CVS_FILE="${HOME_DIR}/history.csv" # Internal stuff PLAYERS="mplayer" @@ -188,6 +190,28 @@ sed -e "/@LENGTH@/s#@LENGTH@#${META_MIN_SEC}#g" > "${HTML_FILE}" } +# Function: Save the history in a CSV formatted file {{{1 +#----------------------------------------------------------------------------- +function save_history_csv() +{ + # $1 - index of HISTORY array to display + + # Return if we should not save the history + [ "${SAVE_HISTORY_CSV}" == "y" ] || return + + # Return if the index is invalid + if [ "$1" -ge "${#HISTORY_ARTIST[*]}" ] || [ "$1" -lt 0 ] + then + return + fi + + # The first row contains the columns titles + [ -f "${HISTORY_CVS_FILE}" ] || echo "\"Artist\",\"Album\",\"Track\",\"Length\",\"Action\"" > "${HISTORY_CVS_FILE}" + + # Save the history items + echo "\"${HISTORY_ARTIST[$1]}\",\"${HISTORY_ALBUM[$1]}\",\"${HISTORY_TRACK[$1]}\",\"${HISTORY_DURATION[$1]}\",\"${HISTORY_ACTION[$1]}\"" >> "${HISTORY_CVS_FILE}" +} + # Function: Print usage summary {{{1 #----------------------------------------------------------------------------- function url_encode() @@ -1373,6 +1397,7 @@ HISTORY_ACTION[$HINDEX]="${PREV_ACTION}" tui_history "${HINDEX}" + save_history_csv "${HINDEX}" fi fi RET="0" |
|
From: Costin S. <cs...@us...> - 2007-02-05 13:23:33
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11686 Modified Files: lastbash.config Log Message: Added configuration support for html output and csv history. Index: lastbash.config =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash.config,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- lastbash.config 9 Dec 2006 12:27:50 -0000 1.2 +++ lastbash.config 5 Feb 2007 13:23:29 -0000 1.3 @@ -25,6 +25,11 @@ # HTTP client to use. Possible values: 'wget', 'curl', 'builtin', 'auto' HTTP_CLIENT="auto" -# Save the metadata (artist-track) of the current playing track to a file. +# Save the metadata (artist-track) of the current playing track to a file SAVE_NOWPLAYING="y" +# Save the metadata of the current playing track to a html file +SAVE_HTML="y" + +# Save history in CVS format +SAVE_HISTORY_CSV="y" |
|
From: Costin S. <cs...@us...> - 2007-02-05 12:41:39
|
Update of /cvsroot/lastbash/lastbash/html In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25025 Modified Files: lastbash.html Log Message: Added titles to anchors. Index: lastbash.html =================================================================== RCS file: /cvsroot/lastbash/lastbash/html/lastbash.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- lastbash.html 5 Feb 2007 12:25:07 -0000 1.6 +++ lastbash.html 5 Feb 2007 12:41:36 -0000 1.7 @@ -113,10 +113,10 @@ } function write_button() { if (self.name == "LastBash") { - content = "<a href=\"javascript:eval(\'self.close();\')\">Close</a>"; + content = "<a title=\"Close this window\" href=\"javascript:eval(\'self.close();\')\">Close</a>"; } else { - content = "<a href=\"javascript:eval(\'new_lastbash_window(); self.refresh();\')\">New window</a>"; + content = "<a title=\"Show this content in a new window\" href=\"javascript:eval(\'new_lastbash_window(); self.refresh();\')\">New window</a>"; } document.write(content); } |
|
From: Costin S. <cs...@us...> - 2007-02-05 12:25:10
|
Update of /cvsroot/lastbash/lastbash/html In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16928 Modified Files: lastbash.html Log Message: Detect if the window is a popup and write specific code. Index: lastbash.html =================================================================== RCS file: /cvsroot/lastbash/lastbash/html/lastbash.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- lastbash.html 5 Feb 2007 10:29:03 -0000 1.5 +++ lastbash.html 5 Feb 2007 12:25:07 -0000 1.6 @@ -91,7 +91,37 @@ padding: 0 10px; margin: 0; } + + table td#winbutton { + text-align: right; + padding: 2px; + } + + table td#winbutton a { + padding: 1px 10px; + border: solid 1px #e0e0d0; + } + table td#winbutton a:hover { + background-color: #e0e0d0; + } </style> + <script language="JavaScript"> + <!-- + function new_lastbash_window() { + winLastBash = window.open(''+self.location, 'LastBash', 'width=520,height=190,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no'); + return false + } + function write_button() { + if (self.name == "LastBash") { + content = "<a href=\"javascript:eval(\'self.close();\')\">Close</a>"; + } + else { + content = "<a href=\"javascript:eval(\'new_lastbash_window(); self.refresh();\')\">New window</a>"; + } + document.write(content); + } + //--> + </script> </head> <body> <table> @@ -123,7 +153,9 @@ </tr> <tr> <td class="label"> </td> - <td class="data" align="right"><a href="" onclick="window.open(''+self.location,'lastbash_window','width=520,height=190,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no'); return false;">[ New window ]</a></td> + <td class="data" id="winbutton"> + <script language="JavaScript">write_button();</script> + </td> </tr> </table> </body> |
|
From: Costin S. <cs...@us...> - 2007-02-05 10:37:50
|
Update of /cvsroot/lastbash/lastbash/html In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25802 Modified Files: lastbash.html Log Message: Added a link for opening a new window without toolbar, statusbar, etc. Index: lastbash.html =================================================================== RCS file: /cvsroot/lastbash/lastbash/html/lastbash.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- lastbash.html 29 Jan 2007 16:30:50 -0000 1.4 +++ lastbash.html 5 Feb 2007 10:29:03 -0000 1.5 @@ -99,19 +99,19 @@ <td rowspan="7" class="cover"> <img src="@COVER_URL@" height="160px" width="160px" alt="Album cover"> </td> - <td colspan="2" class="header"><a href="http://lastbash.sourceforge.net" title="LastBASH homepage">LastBASH</a></td> + <td colspan="2" class="header"><a href="http://lastbash.sourceforge.net" title="LastBASH homepage" target="_blank">LastBASH</a></td> </tr> <tr> <td class="label">Artist</td> - <td class="data"><a href="@ARTIST_URL@" title="Last.fm artist homepage">@ARTIST_NAME@</a></td> + <td class="data"><a href="@ARTIST_URL@" title="Last.fm artist homepage" target="_blank">@ARTIST_NAME@</a></td> </tr> <tr> <td class="label">Track</td> - <td class="data"><a href="@TRACK_URL@" title="Last.fm track homepage">@TRACK_NAME@</a></td> + <td class="data"><a href="@TRACK_URL@" title="Last.fm track homepage" target="_blank">@TRACK_NAME@</a></td> </tr> <tr> <td class="label">Album</td> - <td class="data"><a href="@ALBUM_URL@" title="Last.fm album homepage">@ALBUM_NAME@</a></td> + <td class="data"><a href="@ALBUM_URL@" title="Last.fm album homepage" target="_blank">@ALBUM_NAME@</a></td> </tr> <tr> <td class="label">Length</td> @@ -119,11 +119,11 @@ </tr> <tr> <td class="label">Station</td> - <td class="data"><a href="@STATION_URL@" title="Last.fm station homepage">@STATION_NAME@</a></td> + <td class="data"><a href="@STATION_URL@" title="Last.fm station homepage" target="_blank">@STATION_NAME@</a></td> </tr> <tr> <td class="label"> </td> - <td class="data"> </td> + <td class="data" align="right"><a href="" onclick="window.open(''+self.location,'lastbash_window','width=520,height=190,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no'); return false;">[ New window ]</a></td> </tr> </table> </body> |
|
From: Costin S. <cs...@us...> - 2007-01-29 16:47:46
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv23267 Modified Files: lastbash Log Message: Quick and dirty HTML output. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- lastbash 24 Jan 2007 15:22:14 -0000 1.115 +++ lastbash 29 Jan 2007 16:47:37 -0000 1.116 @@ -31,6 +31,7 @@ AUTO_PLAY="y" HTTP_CLIENT="auto" # $HTTP_CLIENTS, builtin, auto SAVE_NOWPLAYING="y" +SAVE_HTML="y" # Program identification PROG_NAME="lastbash" @@ -66,6 +67,7 @@ PLAYERS="mplayer" HTTP_CLIENTS="wget curl" REQ_PROGRAMS="rm date tput stty md5sum dd chmod" +HTML_TEMPLATE="${HOME_DIR}/lastbash-template.html" PLAYER_PID="" declare -a HTTP_HEADERS HTTP_RESPONSE declare -a HISTORY_ARTIST HISTORY_ALBUM HISTORY_TRACK HISTORY_DURATION HISTORY_MIN_SEC HISTORY_ACTION @@ -157,6 +159,35 @@ [ "${SAVE_NOWPLAYING}" == "y" ] && echo -n "$1" > "${NOWPLAYING_FILE}" } +# Function: Save the HTML file {{{1 +#----------------------------------------------------------------------------- +function save_html() +{ + # Return if we should not save the html file or the template is missing + if [ "${SAVE_HTML}" != "y" ] || [ ! -f "${HTML_TEMPLATE}" ] + then + return + fi + + # Replace the placeholders in template + # Placeholders: + # @TITLE@ @COVER_URL@ @ARTIST_URL@ @ARTIST_NAME@ @TRACK_URL@ @LENGTH@ + # @TRACK_NAME@ @ALBUM_URL@ @ALBUM_NAME@ @STATION_URL@ @STATION_NAME@ + + cat "${HTML_TEMPLATE}" | \ + sed -e "/@TITLE@/s#@TITLE@#${META_ARTIST} - ${META_TRACK}#g" | \ + sed -e "/@COVER_URL@/s#@COVER_URL@#${META_COVER}#g" | \ + sed -e "/@ARTIST_URL@/s#@ARTIST_URL@#${META_ARTIST_URL}#g" | \ + sed -e "/@ARTIST_NAME@/s#@ARTIST_NAME@#${META_ARTIST}#g" | \ + sed -e "/@TRACK_URL@/s#@TRACK_URL@#${META_TRACK_URL}#g" | \ + sed -e "/@TRACK_NAME@/s#@TRACK_NAME@#${META_TRACK}#g" | \ + sed -e "/@ALBUM_URL@/s#@ALBUM_URL@#${META_ALBUM_URL}#g" | \ + sed -e "/@ALBUM_NAME@/s#@ALBUM_NAME@#${META_ALBUM}#g" | \ + sed -e "/@STATION_URL@/s#@STATION_URL@#${META_STATION}#g" | \ + sed -e "/@STATION_NAME@/s#@STATION_NAME@#${META_STATION}#g" | \ + sed -e "/@LENGTH@/s#@LENGTH@#${META_MIN_SEC}#g" > "${HTML_FILE}" +} + # Function: Print usage summary {{{1 #----------------------------------------------------------------------------- function url_encode() @@ -650,7 +681,7 @@ then # Do this only if ok unset META_ARTIST META_ARTIST_URL META_TRACK META_TRACK_URL META_ALBUM META_ALBUM_URL META_COVER - unset META_DURATION META_STATION META_STREAMING META_DISCOVERY META_RADIOMODE META_RTP + unset META_DURATION META_STATION META_STATION_URL META_STREAMING META_DISCOVERY META_RADIOMODE META_RTP # Parse the result for ((N=0; N<=${#HTTP_RESPONSE[@]}; N++)) @@ -667,6 +698,7 @@ "albumcover_medium") META_COVER="${VALUE}" ;; "trackduration") META_DURATION="${VALUE}" ;; "station") META_STATION="${VALUE}" ;; + "station_url") META_STATION_URL="${VALUE}" ;; "streaming") META_STREAMING="${VALUE}" ;; "discovery") META_DISCOVERY="${VALUE}" ;; "radiomode") META_RADIOMODE="${VALUE}" ;; @@ -1091,9 +1123,11 @@ then set_term_title "${META_ARTIST} - ${META_TRACK}" save_nowplaying "${META_ARTIST} - ${META_TRACK}" + save_html "1" else set_term_title "${PROG_TITLE}: Not streaming" save_nowplaying + save_html fi } |
|
From: Costin S. <cs...@us...> - 2007-01-29 16:31:01
|
Update of /cvsroot/lastbash/lastbash/html In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16617 Modified Files: lastbash.html Log Message: Added LENGTH. Index: lastbash.html =================================================================== RCS file: /cvsroot/lastbash/lastbash/html/lastbash.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- lastbash.html 29 Jan 2007 16:18:18 -0000 1.3 +++ lastbash.html 29 Jan 2007 16:30:50 -0000 1.4 @@ -115,7 +115,7 @@ </tr> <tr> <td class="label">Length</td> - <td class="data">4:33</td> + <td class="data">@LENGTH@</td> </tr> <tr> <td class="label">Station</td> |
|
From: Costin S. <cs...@us...> - 2007-01-29 16:18:29
|
Update of /cvsroot/lastbash/lastbash/html In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11804 Modified Files: lastbash.html Log Message: Using placeholders. Index: lastbash.html =================================================================== RCS file: /cvsroot/lastbash/lastbash/html/lastbash.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- lastbash.html 29 Jan 2007 16:13:35 -0000 1.2 +++ lastbash.html 29 Jan 2007 16:18:18 -0000 1.3 @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> - <title>LastBASH</title> + <title>@TITLE@</title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <meta name="author" content="Costin Stroie"> <meta name="copyright" content="© 2007 Costin Stroie <cs...@us...>"> @@ -97,21 +97,21 @@ <table> <tr> <td rowspan="7" class="cover"> - <img src="http://images.amazon.com/images/P/B00004YWEG.01._SCMZZZZZZZ_.jpg" height="160px" width="160px" alt="Album cover"> + <img src="@COVER_URL@" height="160px" width="160px" alt="Album cover"> </td> <td colspan="2" class="header"><a href="http://lastbash.sourceforge.net" title="LastBASH homepage">LastBASH</a></td> </tr> <tr> <td class="label">Artist</td> - <td class="data"><a href="http://www.last.fm/music/AC%252FDC" title="Last.fm artist homepage">AC/DC</a></td> + <td class="data"><a href="@ARTIST_URL@" title="Last.fm artist homepage">@ARTIST_NAME@</a></td> </tr> <tr> <td class="label">Track</td> - <td class="data"><a href="http://www.last.fm/music/AC%252FDC/_/Cover+You+in+Oil" title="Last.fm track homepage">Cover You in Oil</a></td> + <td class="data"><a href="@TRACK_URL@" title="Last.fm track homepage">@TRACK_NAME@</a></td> </tr> <tr> <td class="label">Album</td> - <td class="data"><a href="http://www.last.fm/music/AC%252FDC/Ballbreaker" title="Last.fm album homepage">Ballbreaker</a></td> + <td class="data"><a href="@ALBUM_URL@" title="Last.fm album homepage">@ALBUM_NAME@</a></td> </tr> <tr> <td class="label">Length</td> @@ -119,7 +119,7 @@ </tr> <tr> <td class="label">Station</td> - <td class="data"><a href="http://www.last.fm/music/Queen" title="Last.fm station homepage">Similar music to Queen</a></td> + <td class="data"><a href="@STATION_URL@" title="Last.fm station homepage">@STATION_NAME@</a></td> </tr> <tr> <td class="label"> </td> |
|
From: Costin S. <cs...@us...> - 2007-01-29 16:13:51
|
Update of /cvsroot/lastbash/lastbash/html In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9862 Modified Files: lastbash.html Log Message: Better HTML output. Index: lastbash.html =================================================================== RCS file: /cvsroot/lastbash/lastbash/html/lastbash.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lastbash.html 21 Nov 2006 13:59:25 -0000 1.1 +++ lastbash.html 29 Jan 2007 16:13:35 -0000 1.2 @@ -2,23 +2,129 @@ <html> <head> <title>LastBASH</title> - <link rel="stylesheet" href="css/screen.css" type="text/css" media="screen"> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <meta name="author" content="Costin Stroie"> + <meta name="copyright" content="© 2007 Costin Stroie <cs...@us...>"> <meta name="revision" content="$Id$"> + <meta http-equiv="refresh" content="30"> + <style type="text/css" media="screen"> + html, body { + margin: 0; + padding: 0; + text-align: center; + } + + body { + background-color: #a9ac99; + padding: 10px 10px; + color: #404040; + } + + a { + background: inherit; + color: #707070; + text-decoration: none; + } + + a:hover { + color: #a06000; + background: inherit; + text-decoration: none; + } + + img { + background-color: #fdfdfa; + border: solid 1px #e0e0d0; + padding: 1px; + margin: 1px; + } + + table { + border-style: none; + border-collapse: collapse; + text-align: left; + width: 500px; + } + + table tr { + background-color: #f5f5ee; + color: #404040; + border: solid 1px #e0e0d0; + } + + table td { + padding: 2px 0; + margin: 0; + font: 12px Arial, Helvetica, sans-serif; + } + + table td.label { + background-color: #f5f5ee; + padding: 1px 0.5em 1px 1em; + } + + table td.data { + background-color: #fdfdfa; + padding: 1px 0.5em 1px 1em; + width: 100%; + } + + table td.cover { + background-color: #fdfdfa; + padding: 0; + margin: 0; + vertical-align: middle; + text-align: center; + height: 160px; + width: 160px; + } + + table td.header { + background-color: #f5f5ee; + padding: 10px; + text-align: right; + } + + table td.header a { + color: #a9ac99; + font: 24px Georgia, 'Times New Roman', Times, serif; + padding: 0 10px; + margin: 0; + } + </style> </head> <body> <table> - <tr class="title"><td colspan="2"><h1><a>LastBASH</a></h1></td></tr> - <tr id="header"><td colspan="2">TEXT</td></tr> <tr> - <td>1</td> - <td>2</td> + <td rowspan="7" class="cover"> + <img src="http://images.amazon.com/images/P/B00004YWEG.01._SCMZZZZZZZ_.jpg" height="160px" width="160px" alt="Album cover"> + </td> + <td colspan="2" class="header"><a href="http://lastbash.sourceforge.net" title="LastBASH homepage">LastBASH</a></td> </tr> <tr> - <td>1</td> - <td>2</td> + <td class="label">Artist</td> + <td class="data"><a href="http://www.last.fm/music/AC%252FDC" title="Last.fm artist homepage">AC/DC</a></td> + </tr> + <tr> + <td class="label">Track</td> + <td class="data"><a href="http://www.last.fm/music/AC%252FDC/_/Cover+You+in+Oil" title="Last.fm track homepage">Cover You in Oil</a></td> + </tr> + <tr> + <td class="label">Album</td> + <td class="data"><a href="http://www.last.fm/music/AC%252FDC/Ballbreaker" title="Last.fm album homepage">Ballbreaker</a></td> + </tr> + <tr> + <td class="label">Length</td> + <td class="data">4:33</td> + </tr> + <tr> + <td class="label">Station</td> + <td class="data"><a href="http://www.last.fm/music/Queen" title="Last.fm station homepage">Similar music to Queen</a></td> + </tr> + <tr> + <td class="label"> </td> + <td class="data"> </td> </tr> - <tr id="footer"><td colspan="2">Next Page »</td></tr> </table> </body> </html> |
|
From: Costin S. <cs...@us...> - 2007-01-29 16:10:26
|
Update of /cvsroot/lastbash/lastbash/html/css In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv8155 Modified Files: screen.css Log Message: CSS for HTML output. Index: screen.css =================================================================== RCS file: /cvsroot/lastbash/lastbash/html/css/screen.css,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- screen.css 21 Nov 2006 13:59:24 -0000 1.1 +++ screen.css 29 Jan 2007 16:09:53 -0000 1.2 @@ -15,86 +15,78 @@ body { background-color: #a9ac99; - font-size: 13px; - font-family: 'Trebuchet MS', 'Bitstream Vera Sans', Verdana, Arial, 'Lucida Sans', 'Lucida Sans Unicode', Helvetica, sans-serif; - padding: 20px 0; - color: #000000; + padding: 10px 10px; + color: #404040; } a { background: inherit; - color: #a06000; + color: #707070; text-decoration: none; } -h1 { +a:hover { + color: #a06000; background: inherit; - color: #a9ac99; - font-weight: 16pt Georgia, 'Times New Roman', Times, serif normal; - margin: 10pt 0 5pt 0; - padding: 0; text-decoration: none; - letter-spacing: 0.1em; -} - -h2, h2 a { - background: inherit; - color: #990000; - font-size: 16px; - font-weight: normal; - letter-spacing: 0.05em; - margin: 0; - padding: 1em 0 0 0; -} - -h3, h3 a { - background: inherit; - color: #990000; - font-size: 14px; - font-weight: normal; - letter-spacing: 0.05em; - margin: 0; - padding: 1em 0 0 0; -} - -h4 { - background: inherit; - color: #005577; - font-size: 13px; - font-weight: normal; - letter-spacing: 0.05em; - margin: 0; - padding: 1em 0 0 0; } img { - border: none; + background-color: #fdfdfa; + border: solid 1px #e0e0d0; + padding: 1px; + margin: 1px; } table { border-style: none; border-collapse: collapse; text-align: left; - width: 100%; + width: 500px; } table tr { - background: #fdfdfa; + background-color: #f5f5ee; + color: #404040; + border: solid 1px #e0e0d0; } -table tr#header { - background: #f5f5ee; +table td { + padding: 2px 0; + margin: 0; + font: 12px Arial, Helvetica, sans-serif; } -table tr#footer { - background: #f5f5ee; +table td.label { + background-color: #f5f5ee; + padding: 1px 0.5em 1px 1em; +} -table td { - padding: 1pt 5pt; +table td.data { + background-color: #fdfdfa; + padding: 1px 0.5em 1px 1em; + width: 100%; } -table td { - padding: 1pt 5pt; +table td.cover { + background-color: #fdfdfa; + padding: 0; + margin: 0; + vertical-align: middle; + text-align: center; +} + +table td.header { + background-color: #f5f5ee; + padding: 10px; + text-align: right; +} + +table td.header a { + color: #a9ac99; + font: 24px Georgia, 'Times New Roman', Times, serif; + padding: 0 10px; + margin: 0; } /* vim: set ft=css nowrap nu */ |
|
From: Costin S. <cs...@us...> - 2007-01-25 16:54:23
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv17667 Modified Files: Makefile Log Message: Added experimental Debian packaging. Index: Makefile =================================================================== RCS file: /cvsroot/lastbash/lastbash/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 12 Dec 2006 13:44:50 -0000 1.5 +++ Makefile 25 Jan 2007 16:54:13 -0000 1.6 @@ -23,6 +23,16 @@ datadir = $(DESTDIR)$(prefix)/share/$(name) srcdir = . +# Debian stuff +ifdef DEB + revision = 1 + DESTDIR = /tmp/$(name) + prefix = /usr + docdir = $(DESTDIR)$(prefix)/share/doc/$(name) + DEB_CONTROL = debian/control + DEB_CHLOG = debian/changelog +endif + # Tools MKDIR = mkdir INSTALL = install @@ -81,4 +91,21 @@ pack: cd .. && tar zcvf /tmp/$(name)-$(version).tar.gz $(name)-$(version) +deb: + $(MAKE) DEB=1 install + $(MAKE) DEB=1 deb_files + $(MAKE) DEB=1 deb_build + +deb_files: + mkdir $(DESTDIR)/DEBIAN + sed -e '/Version:/s/@VERSION@/$(version)-$(revision)/' < $(DEB_CONTROL) > $(DESTDIR)/DEBIAN/control + cp $(DEB_CHLOG) $(docdir)/changelog + mv $(docdir)/COPYING $(docdir)/copyright + find $(docdir) -type f -exec gzip -9 {} \; + find $(mandir) -type f -exec gzip -9 {} \; + find $(DESTDIR) -type d -exec chmod 755 {} \; + +deb_build: + cd /tmp && fakeroot dpkg-deb --build $(name) . + # vim: set ft=make nowrap nu: |
|
From: Costin S. <cs...@us...> - 2007-01-25 16:54:21
|
Update of /cvsroot/lastbash/lastbash/debian In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv17667/debian Added Files: changelog control Log Message: Added experimental Debian packaging. --- NEW FILE: control --- Package: lastbash Version: @VERSION@ Architecture: i386 Priority: optional Maintainer: Costin STROIE <cs...@us...> Depends: bash (>= 3.0), tput, coreutils Description: Console player for Last.fm 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. LastBASH tries to find its place among the other Last.fm players, filling this gap: the missing console player. --- NEW FILE: changelog --- lastbash (0.3.2) unstable; urgency=low * Initial Debian package. -- Costin STROIE <cs...@us...> Thu, 25 Jan 2007 16:56:09 +0200 |
|
From: Costin S. <cs...@us...> - 2007-01-25 16:52:20
|
Update of /cvsroot/lastbash/lastbash/debian In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16948/debian Log Message: Directory /cvsroot/lastbash/lastbash/debian added to the repository |
|
From: Costin S. <cs...@us...> - 2007-01-24 15:22:18
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15992 Modified Files: lastbash Log Message: Set the screen window title. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- lastbash 24 Jan 2007 13:17:55 -0000 1.114 +++ lastbash 24 Jan 2007 15:22:14 -0000 1.115 @@ -129,17 +129,22 @@ debug "--------------------------------------------------------" } -# Function: Set the xterm title {{{1 +# Function: Set the terminal title {{{1 #----------------------------------------------------------------------------- function set_term_title() { - # Set the title for xterm and rxvt + # $1 - new terminal title + if [ "${TERM:0:5}" == "xterm" ] || [ "${TERM:0:4}" == "rxvt" ] then + # Set the title for xterm and rxvt echo -ne "\e]0;$1\a" elif [ "${TERM:0:6}" == "screen" ] then - echo -ne "\e^$1\e\\" + # Set the window title + echo -ne "\ek$1\e\\" + # Set the window hardstatus + echo -ne "\e]0;$1\a" fi } @@ -147,6 +152,8 @@ #----------------------------------------------------------------------------- function save_nowplaying() { + # $1 - string to save in the now_playing file + [ "${SAVE_NOWPLAYING}" == "y" ] && echo -n "$1" > "${NOWPLAYING_FILE}" } |
|
From: Costin S. <cs...@us...> - 2007-01-24 13:17:59
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30200 Modified Files: lastbash Log Message: Added support for rxvt and screen terminal title. Index: lastbash =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -r1.113 -r1.114 --- lastbash 24 Jan 2007 12:16:34 -0000 1.113 +++ lastbash 24 Jan 2007 13:17:55 -0000 1.114 @@ -131,9 +131,16 @@ # Function: Set the xterm title {{{1 #----------------------------------------------------------------------------- -function set_xterm() +function set_term_title() { - [[ "${TERM}" =~ "^xterm" ]] && echo -ne "\e]0;$1\a" + # Set the title for xterm and rxvt + if [ "${TERM:0:5}" == "xterm" ] || [ "${TERM:0:4}" == "rxvt" ] + then + echo -ne "\e]0;$1\a" + elif [ "${TERM:0:6}" == "screen" ] + then + echo -ne "\e^$1\e\\" + fi } # Function: Save the now_playing file {{{1 @@ -808,7 +815,7 @@ # Enter special mode tput smcup # Set a welcome xterm title - set_xterm "Welcome to ${PROG_TITLE}!" + set_term_title "Welcome to ${PROG_TITLE}!" # Define colors T_COLOR_BLACK="$(tput setaf 0)" @@ -853,7 +860,7 @@ function term_exit() { # Set a goodbye xterm title - set_xterm "Thank you for flying ${PROG_TITLE}!" + set_term_title "Thank you for flying ${PROG_TITLE}!" # Make sure to reset the scrolling area tput csr 0 ${T_LINES} # Move the cursor on upper-left corner and clear the entire screen @@ -1075,10 +1082,10 @@ # Set the xterm title and save the now_playing file if [ "${META_STREAMING}" == "true" ] then - set_xterm "${META_ARTIST} - ${META_TRACK}" + set_term_title "${META_ARTIST} - ${META_TRACK}" save_nowplaying "${META_ARTIST} - ${META_TRACK}" else - set_xterm "${PROG_TITLE}: Not streaming" + set_term_title "${PROG_TITLE}: Not streaming" save_nowplaying fi } |
|
From: Costin S. <cs...@us...> - 2007-01-24 12:21:42
|
Update of /cvsroot/lastbash/lastbash In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv3964 Modified Files: lastbash.1 Log Message: Documented the station changing keys. Index: lastbash.1 =================================================================== RCS file: /cvsroot/lastbash/lastbash/lastbash.1,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- lastbash.1 12 Dec 2006 12:16:29 -0000 1.5 +++ lastbash.1 24 Jan 2007 12:21:35 -0000 1.6 @@ -127,6 +127,33 @@ .B d Toggle "Discovery mode" (the D led will change status) .TP +.B u +Enter new last.fm URL. +.TP +.B t +Listen to global tags station. +You are asked the tags. +.TP +.B g +Listen to some group's station. +You are asked the group name. +.TP +.B n +Listen to the neighbours's station. +You are asked the username. +.TP +.B c +Listen to the recommended station. +You are asked the username. +.TP +.B a +Listen to the similar artists station. +You are asked the artists names. +.TP +.B f +Listen to the artist's fan station. +You are asked the artist's name. +.TP .B ^S Toggle history scrolling direction .TP |