Permalink
Browse files

*** 1.44 released ***

	* cplay:
	- partial support for madplay
	- partial support for mikmod (yason)
	- removed sox support - unless someone needs it
	- toggle counter mode: time done / time left
	- seek acceleration based on song length
	- avoid listing dot-files (Martin Michlmayr)
	- remove ".." entry from root (Martin Michlmayr)
	- show playlist upon startup if playing (Patrice Neff)
	- removed TERMIOS warning with recent python versions
	- add directories from command line (Han)
	- fixed x-bug (Chris Liechti)
	- changed write_playlist key from 'o' to 'w'
	- changed goto command key from 'g' to 'o'
	- added 'g' (home) and 'G' (end) keys
	- added '/' and '?' keys for searching
	- misc tweaks

	* cplay.1:
	- update

	* README:
	- update
  • Loading branch information...
1 parent c008371 commit 6744952bd36c2f1ab1745e000bbbca20edbd4379 Ulf Betlehem committed with Dec 1, 2001
Showing with 81 additions and 43 deletions.
  1. +27 −0 ChangeLog
  2. +5 −4 README
  3. +9 −6 TODO
  4. +33 −28 cplay
  5. +7 −5 cplay.1
View
@@ -1,3 +1,30 @@
+2001-12-01 Ulf Betlehem <flu@iki.fi>
+
+ *** 1.44 released ***
+
+ * cplay:
+ - partial support for madplay
+ - partial support for mikmod (yason)
+ - removed sox support - unless someone needs it
+ - toggle counter mode: time done / time left
+ - seek acceleration based on song length
+ - avoid listing dot-files (Martin Michlmayr)
+ - remove ".." entry from root (Martin Michlmayr)
+ - show playlist upon startup if playing (Patrice Neff)
+ - removed TERMIOS warning with recent python versions
+ - add directories from command line (Han)
+ - fixed x-bug (Chris Liechti)
+ - changed write_playlist key from 'o' to 'w'
+ - changed goto command key from 'g' to 'o'
+ - added 'g' (home) and 'G' (end) keys
+ - added '/' and '?' keys for searching
+ - misc tweaks
+
+ * cplay.1:
+ - update
+
+ * README:
+ - update
2001-03-15 Ulf Betlehem <flu@iki.fi>
*** 1.43 released ***
View
9 README
@@ -2,24 +2,25 @@ Description:
cplay is a curses front-end for various audio players. It aims
to provide a power-user-friendly interface with simple filelist
and playlist control. It is written in Python and can use
- either pyncurses or the standard curses module. The list of
- supported players include ogg123, mpg123, splay and sox.
+ either pyncurses or the standard curses module.
Requirements:
- cplay http://www.tf.hut.fi/~flu/cplay/
- python http://www.python.org/
+ - mpg321 (optional) http://sourceforge.net/projects/mpg321/
- ogg123 (optional) http://www.vorbis.com/
- mpg123 (optional) http://www.mpg123.org/
- splay (optional) http://splay.sourceforge.net/
- - sox (optional) http://home.sprynet.com/~cbagwell/sox.html
+ - madplay (optional) http://www.mars.org/home/rob/proj/mpeg/
+ - mikmod (optional) http://www.mikmod.org/
- fintl (optional) http://www.python.org/sigs/i18n-sig/
- pyncurses (optional) http://pyncurses.sourceforge.net/
Installation:
make install
Usage:
- cplay [-rR] [ filename | playlist.m3u ] ...
+ cplay [-rR] [ file | dir | playlist.m3u ] ...
Documentation:
When in doubt, press 'h' for a friendly help page.
View
15 TODO
@@ -1,11 +1,8 @@
high priority
------------------------------------------
-- madplay support
+- alternative scrolling method
+- delayed commands
- framework for displaying alternative metadata
-- automatic *_Player instantiation
-- shuffle/sort marked tracks?
-- seek acceleration based on total_time
-- toggle time done / time left
- scrollbar / position indicator
- hide cursor after SUSP & CONT cycle
- tilde expansion
@@ -22,10 +19,13 @@ low priority
- delwin when resizing
- invert playlist markings
- hierarchical playlists?
+- better madplay support
+- shuffle/sort marked tracks?
+- delete files (Han)
misc thoughts
------------------------------------------
-- alsaplayer, xmp, mikmod, others?
+- support alsaplayer, xmp, others?
- delayed play command (play after current song is finished)
- reset progress when changing song?
- restore xterm title (not possible with aterm, rxvt, etc?)
@@ -44,3 +44,6 @@ misc thoughts
- support slang?
- icecast/shoutcast support
- fade in/out mode (a la repeat/random)
+- filtered view (based on glob / regex)
+- Enter and cursor position logical / intuitive?
+- lots of suggestions from Chris Liechti
View
61 cplay
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- python -*-
-__version__ = "cplay 1.44pre4"
+__version__ = "cplay 1.44"
"""
cplay - A curses front-end for various audio players
@@ -592,6 +592,8 @@ class FilelistWindow(ListWindow):
self.mtime = os.stat(self.cwd)[8]
self.mtime_when = time.time()
for entry in os.listdir(self.cwd):
+ if entry[0] == ".":
+ continue
if os.path.isdir(self.cwd + entry):
self.dirs.append("%s/" % entry)
elif VALID_SONG(entry):
@@ -601,7 +603,8 @@ class FilelistWindow(ListWindow):
except os.error: pass
self.dirs.sort()
self.files.sort()
- self.buffer = ["../"] + self.dirs + self.files
+ self.buffer = self.dirs + self.files
+ self.cwd != "/" and self.buffer.insert(0, "../")
if self.oldposition.has_key(self.cwd):
self.bufptr = self.oldposition[self.cwd]
else:
@@ -662,28 +665,8 @@ class FilelistWindow(ListWindow):
self.cursor_move(+1)
def command_add_recursively(self):
- if os.path.isdir(self.cwd + self.current()):
- self.add_dir(self.cwd + self.current())
- self.cursor_move(+1)
- elif VALID_PLAYLIST(self.current()):
- app.win_playlist.append(self.cwd + self.current())
- self.cursor_move(+1)
-
- def add_dir(self, dir):
- if os.path.isdir(dir):
- try:
- entries = []
- for entry in os.listdir(dir):
- entries.append(os.path.join(dir, entry))
- except os.error: return
- songs = filter(VALID_SONG, entries)
- dirs = filter(os.path.isdir, entries)
- songs.sort()
- for song in songs:
- app.win_playlist.append(song)
- dirs.sort()
- for subdir in dirs:
- self.add_dir(subdir)
+ app.win_playlist.append(self.cwd + self.current())
+ self.cursor_move(+1)
# ------------------------------------------
class PlaylistEntry:
@@ -739,8 +722,29 @@ class PlaylistWindow(ListWindow):
or " " * len(_("[repeat]")), self.random and _("[random]")
or " " * len(_("[random]")))
+ def add_dir(self, dir):
+ if os.path.isdir(dir):
+ try:
+ entries = []
+ for entry in os.listdir(dir):
+ entries.append(os.path.join(dir, entry))
+ except os.error: return
+ songs = filter(VALID_SONG, entries)
+ dirs = filter(os.path.isdir, entries)
+ songs.sort()
+ for song in songs:
+ entry = PlaylistEntry(song)
+ self.buffer.append(entry)
+ dirs.sort()
+ for subdir in dirs:
+ self.add_dir(subdir)
+
def append(self, pathname):
- if VALID_PLAYLIST(pathname):
+ if os.path.isdir(pathname):
+ app.status(_("Adding dir: %s") % pathname)
+ self.add_dir(pathname)
+ app.restore_default_status()
+ elif VALID_PLAYLIST(pathname):
try:
file = open(pathname)
for filename in map(string.strip, file.readlines()):
@@ -965,6 +969,7 @@ class Player:
self.stopped = 0
self.paused = 0
self.time_setup = None
+ self.offset = 0
def is_stopped(self):
return self.stopped
@@ -1281,7 +1286,7 @@ def main():
try:
opts, args = getopt.getopt(sys.argv[1:], "rR")
except:
- usage = _("Usage: %s [-rR] [ filename | playlist.m3u ] ...\n")
+ usage = _("Usage: %s [-rR] [ file | dir | playlist.m3u ] ...\n")
sys.stderr.write(usage % sys.argv[0])
sys.exit(1)
@@ -1314,11 +1319,11 @@ def main():
PLAYERS = [
FrameOffsetPlayer("mpg321 -q -v -k %d %s", ".*\.mp[123]$", 38.28),
-## ByteOffsetPlayer("mpg321 -q -v -k %d %s", ".*\.mp[123]$"),
FrameOffsetPlayer("ogg123 -q -v -d oss -k %d %s", ".*\.ogg$"),
- FrameOffsetPlayer("mpg123 -q -v -k %d %s", ".*\.mp[123]$", 38.28),
FrameOffsetPlayer("splay -f -k %d %s", ".*\.mp[123]$", 38.28),
+ FrameOffsetPlayer("mpg123 -q -v -k %d %s", ".*\.mp[123]$", 38.28),
NoOffsetPlayer("madplay -q -v %s", ".*\.mp[123]$"),
+ NoOffsetPlayer("mikmod -p1 -t %s", "(^mod\.|.*\.(mod|xm|fm|s3m|med))$")
]
def VALID_SONG(name):
View
12 cplay.1
@@ -3,15 +3,15 @@
.\" It was originally written for Debian GNU/Linux (but may be used
.\" by others).
.\"
-.TH CPLAY 1 "March 2001"
+.TH CPLAY 1 "December 2001"
.SH NAME
.PP
cplay \- a front-end for various audio players
.SH SYNOPSIS
.PP
-\fBcplay\fR [-options] [ \fIfile\fP | \fIplaylist.m3u\fP ] ...
+\fBcplay\fR [-options] [ \fIfile\fP | \fIdir\fP |\fIplaylist.m3u\fP ] ...
.SH DESCRIPTION
.PP
@@ -28,8 +28,8 @@ automatically adds it to the playlist which can be accessed
by pressing the tabulator key.
.PP
Currently, the folloging audio formats are supported: MP3 (through
-mpg123), Ogg Vorbis (through ogg123), and WAV, AU, CDR and AIFF
-(through sox).
+mpg321, splay, mpg123 or madplay), Ogg Vorbis (through ogg123), and
+various module-formats (through mikmod).
.SH OPTIONS
.IP \fB-r
@@ -41,8 +41,10 @@ Toggles playlist \fIrandom\fP mode
.PP
.BR ogg123 (1),
.BR mpg123 (1),
+.BR mpg321 (1),
.BR splay (1),
-.BR sox (1)
+.BR madplay (1),
+.BR mikmod (1)
.SH AUTHOR
.PP

0 comments on commit 6744952

Please sign in to comment.