dslinux/user/mpc/doc Makefile.am Makefile.in m3u-handler.sh mpc-bashrc mpc.1 pls-handler.sh

stsp stsp at user.in-berlin.de
Mon Aug 21 17:43:35 CEST 2006


Update of /cvsroot/dslinux/dslinux/user/mpc/doc
In directory antilope:/tmp/cvs-serv21800/doc

Added Files:
	Makefile.am Makefile.in m3u-handler.sh mpc-bashrc mpc.1 
	pls-handler.sh 
Log Message:
Adding pristine copy of mpc so I can branch from it.


--- NEW FILE: mpc.1 ---
.TH "Music Player Command" 1
.SH "NAME"
mpc \- Program for controlling Music Player Daemon (MPD)
.SH "SYNOPSIS"
mpc [<command> <arguments>]
.SH "DESCRIPTION"
mpc is a client for MPD, the Music Player Daemon. mpc connects to a MPD running on a machine on the local network and controls MPD according to commands and arguments passed to it. If no arguments are passed, current status is given. 

.SH "OPTIONS"
.TP
.BI --format
.br
Configure the format of song display for status and the playlist.  The metadata delimeters are "%name%", "%artist%", "%album%", "%title%", "%track%", "%time%", and "%file%".  The [] operator is used to group output such that if no metadata delimeters are found or matched between '[' and ']', then none of the characters between '[' and ']' are output.  '&' and '|' are logical operators for and and or.  '#' is used to escape characters.  Some useful examples for format are: "%file%" and "[[%artist% - ]%title%]|[%file%]"
.SH COMMANDS 
.TP
.B add <song>
Adds a song from the music database to the playlist. Can also read input from pipes. Use "mpc ls | mpc add" to add all files to the playlist.
.TP
.B clear
Empties playlist.
.TP
.B crop
Remove all songs except for the currently playing song.
.TP
.B crossfade [<seconds>]
Gets and sets the current amount of crossfading between songs (0 disables crossfading).
.TP
.B del <song>
Removes a song from the playlist. Can also read input from pipes.
.TP
.B listall [<song>]
Lists <song> from playlist. If no <song> is specified, lists all songs.
.TP
.B load <file>
Loads <file> as playlist.
.TP
.B ls [<directory>]
Lists all files/folders in <directory>. If no <directory> is specified, lists all files in music directory.
.TP
.B lsplaylists
Lists available playlists.
.TP 
.B move <from> <to>
Moves song at position <from> to the postion <to> in the playlist.
.TP
.B next
Starts playing next song on playlist.
.TP
.B pause
Pauses playing.
.TP
.B play <number>
Starts playing the song-number specified. If none is specified, plays number 1.
.TP
.B playlist
Prints entire playlist.
.TP
.B prev
Starts playing previous song.
.TP
.B random [<state>]
Toggle random mode if state ("on" or "off") is not specified.
.TP
.B repeat [<state>]
Toggle repeat mode if state ("on" or "off") is not specified.
.TP
.B rm <file>
Deletes a specific playlist.
.TP
.B save <file>
Saves playlist as <file>.
.TP
.B search <table> <pattern>
Searches for songs that match the pattern, where table is "artist", "album", "title", or "filename".
.TP
.B seek [+-][<HH:MM:SS>] or <[+-]<0-100>%>
Seeks by hour, minute or seconds, hours or minutes can be omitted.
If seeking by percentage, seeks within the current song in the specified manner.  If a "+" or "-" is used, the seek is done relative to the current song position. Absolute seeking by default.
.TP
.B shuffle
Shuffles all songs on the playlist.
.TP
.B stats
Displays statistics about MPD
.TP
.B stop
Stops playing.
.TP
.B toggle
Toggles between play and pause. If stopped starts playing. Does not support start playing at song number (use play).
.TP
.B update [<path>]
Scans music directory for updates if no <path> is specified.  If one or more <path>'s are specified, scans only those path's for updates.  Can take input from a pipe.
.TP
.B version
Reports the version of MPD.
.TP
.B volume <[+-]value>
Sets the volume to <value> (0-100).  If "+" or "-" is used, then it adjusts
the volume relative to the current volume.
.SH "ENVIRONMENT"
.TP
This section describes some environment variables that affect how mpc operates.
.br
	MPD_HOST
.br
	MPD_PORT
.br
		By default, mpc connects to localhost:6600. This can be changed either at compile-time, or by exporting the MPD_HOST and MPD_PORT environment variables.
.br
		To use a password with mpd, set MPD_HOST to password at host.
.SH "EXAMPLES"
.TP
Here is a script to load and play m3u playlists (useful for mozilla):
.br

.br
#!/bin/bash
.br
mpc clear
.br
cat $1 | mpc add
.br
mpc play
.br
.TP
This script can be used to load and play pls playlists (again, useful for mozilla):
.br

.br
#!/bin/bash
.br
mpc clear
.br
grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//' | mpc add
.br
mpc play
.br
.SH "BUGS"
Report bugs on http://www.musicpd.org/mantis/
.SH "NOTE"
Since MPD uses UTF\-8, mpc needs to convert characters to the
charset used by the local system. If you get character conversion errors when your running mpc you probably need to set up your locale. This is done by setting any of the LC_CTYPE, LANG or LC_ALL enviroment vatiables (LC_CTYPE only affects character handling).
.SH "SEE ALSO"
mpd(1)
.SH "AUTHOR"
	See <http://svn.musicpd.org/mpc/trunk/AUTHORS>, for contributors to mpc

--- NEW FILE: pls-handler.sh ---
#!/bin/sh
mpc clear
grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//' | mpc add
mpc play

--- NEW FILE: Makefile.am ---
man_MANS = mpc.1
pkgdata_DATA =
docdir = $(prefix)/share/doc/$(PACKAGE)
doc_DATA = mpc-bashrc m3u-handler.sh pls-handler.sh
EXTRA_DIST = $(pkgdata_DATA) $(man_MANS) $(doc_DATA)

--- NEW FILE: mpc-bashrc ---
# put this in your bashrc for bash tab completion with mpc
# $ cat mpc-bashrc >> ~/.bashrc

#export MPD_HOST="127.0.0.1"
#export MPD_PORT="6600"

 _mpdadd_complete_func ()
{
	cur="${COMP_WORDS[COMP_CWORD]}"
	first=${COMP_WORDS[1]}
	hold="";
	
	# add more escape stuff as needed:
	scrub='s/\([\\\>\\\<\\\(\\\)\\\";]\)/\\\1/g';
	
	case "$first" in
		add) 
		hold=`mpc tab ${cur}`;
		COMPREPLY=($(compgen -W "${hold}" | sed "$scrub"))
		return 0
		;;
		play|del|move)
		hold=`mpc playlist | sed 's/\#\([[:digit:]]\+\).*/\1/g'` # | grep "^${cur}"`
		COMPREPLY=($(compgen -W "${hold}" "${cur}"))
		return 0
		;;
		# TODO add trailing 's' for seconds in seek (total song time needed)
		seek|volume)
		COMPREPLY=($(compgen -W "`seq 0 100; seq -f +%g 0 100; seq -f -%g 0 100`" "${cur}"))
		return 0
		;;
		# TODO get total song time and use that as a limit
		crossfade)
		COMPREPLY=($(compgen -W "`seq 0 99`" "${cur}"))
		return 0
		;;
		ls)
                if [ "x$cur" = "x" ]; then
                        hold=`mpc ls`;
                else
		        hold=`mpc lstab ${cur}`;
                fi
		COMPREPLY=($(compgen -W "${hold}" | sed "$scrub"))
		return 0
		;;
		search)
		COMPREPLY=($(compgen -W "album artist title filename" "${cur}"))
		return 0
		;;
		load|save|rm)
                if [ "x$cur" = "x" ]; then
                        hold=`mpc lsplaylists`;
                else
		        hold=`mpc loadtab ${cur}`;
                fi
		COMPREPLY=($(compgen -W "${hold}" | sed "$scrub"))
		return 0
		;;
		repeat|random)
		COMPREPLY=($(compgen -W "0 1 true false yes no on off" "${cur}"))
		return 0
		;;
		*)
		hold=`mpc help 2>&1 | grep "^mpc [a-z]\+ " | awk '{print $2}'`;
		COMPREPLY=($(compgen -W "${hold} status" ${cur}))
		return 0
		;;
	esac
}
complete -F _mpdadd_complete_func mpc

--- NEW FILE: Makefile.in ---
# Makefile.in generated by automake 1.6.3 from Makefile.am.
# @configure_input@

# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
SHELL = @SHELL@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..

ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@

am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :

EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
DEPDIR = @DEPDIR@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
PACKAGE = @PACKAGE@
STRIP = @STRIP@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
man_MANS = mpc.1
pkgdata_DATA = 
docdir = $(prefix)/share/doc/$(PACKAGE)
doc_DATA = mpc-bashrc m3u-handler.sh pls-handler.sh
EXTRA_DIST = $(pkgdata_DATA) $(man_MANS) $(doc_DATA)
subdir = doc
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =

NROFF = nroff
MANS = $(man_MANS)
DATA = $(doc_DATA) $(pkgdata_DATA)

DIST_COMMON = Makefile.am Makefile.in
all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --gnu  doc/Makefile
Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
uninstall-info-am:

man1dir = $(mandir)/man1
install-man1: $(man1_MANS) $(man_MANS)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(DESTDIR)$(man1dir)
	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
	for i in $$l2; do \
	  case "$$i" in \
	    *.1*) list="$$list $$i" ;; \
	  esac; \
	done; \
	for i in $$list; do \
	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
	  else file=$$i; fi; \
	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
	  case "$$ext" in \
	    1*) ;; \
	    *) ext='1' ;; \
	  esac; \
	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
	done
uninstall-man1:
	@$(NORMAL_UNINSTALL)
	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
	for i in $$l2; do \
	  case "$$i" in \
	    *.1*) list="$$list $$i" ;; \
	  esac; \
	done; \
	for i in $$list; do \
	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
	done
docDATA_INSTALL = $(INSTALL_DATA)
install-docDATA: $(doc_DATA)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(DESTDIR)$(docdir)
	@list='$(doc_DATA)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  echo " $(docDATA_INSTALL) $$d$$p $(DESTDIR)$(docdir)/$$f"; \
	  $(docDATA_INSTALL) $$d$$p $(DESTDIR)$(docdir)/$$f; \
	done

uninstall-docDATA:
	@$(NORMAL_UNINSTALL)
	@list='$(doc_DATA)'; for p in $$list; do \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  echo " rm -f $(DESTDIR)$(docdir)/$$f"; \
	  rm -f $(DESTDIR)$(docdir)/$$f; \
	done
pkgdataDATA_INSTALL = $(INSTALL_DATA)
install-pkgdataDATA: $(pkgdata_DATA)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
	@list='$(pkgdata_DATA)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  echo " $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
	  $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
	done

uninstall-pkgdataDATA:
	@$(NORMAL_UNINSTALL)
	@list='$(pkgdata_DATA)'; for p in $$list; do \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
	  rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
	done
tags: TAGS
TAGS:

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)

top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)

distdir: $(DISTFILES)
	@list='$(DISTFILES)'; for file in $$list; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
	    dir="/$$dir"; \
	    $(mkinstalldirs) "$(distdir)$$dir"; \
	  else \
	    dir=''; \
	  fi; \
	  if test -d $$d/$$file; then \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
	    fi; \
	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
	  else \
	    test -f $(distdir)/$$file \
	    || cp -p $$d/$$file $(distdir)/$$file \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(MANS) $(DATA)

installdirs:
	$(mkinstalldirs) $(DESTDIR)$(man1dir) $(DESTDIR)$(docdir) $(DESTDIR)$(pkgdatadir)

install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	  INSTALL_STRIP_FLAG=-s \
	  `test -z '$(STRIP)' || \
	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

clean-generic:

distclean-generic:
	-rm -f Makefile $(CONFIG_CLEAN_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic mostlyclean-am

distclean: distclean-am

distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

info: info-am

info-am:

install-data-am: install-docDATA install-man install-pkgdataDATA

install-exec-am:

install-info: install-info-am

install-man: install-man1

installcheck-am:

maintainer-clean: maintainer-clean-am

maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic

uninstall-am: uninstall-docDATA uninstall-info-am uninstall-man \
	uninstall-pkgdataDATA

uninstall-man: uninstall-man1

.PHONY: all all-am check check-am clean clean-generic distclean \
	distclean-generic distdir dvi dvi-am info info-am install \
	install-am install-data install-data-am install-docDATA \
	install-exec install-exec-am install-info install-info-am \
	install-man install-man1 install-pkgdataDATA install-strip \
	installcheck installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-generic \
	uninstall uninstall-am uninstall-docDATA uninstall-info-am \
	uninstall-man uninstall-man1 uninstall-pkgdataDATA

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

--- NEW FILE: m3u-handler.sh ---
#!/bin/sh
mpc clear
cat $1 | mpc add
mpc play




More information about the dslinux-commit mailing list