From aa98de9b6c9432747cf84171dfa00c8b5b34b7ba Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 4 Jun 2008 07:33:20 +0000 Subject: [PATCH] import mkplaylist: The script scans the given directories for media files with known file name extensions and writes the names into a playlist file in M3U, extended M3U or PLS format. Those very simple formats are used or at least understood by the vast majority of media players on different platforms. For huge collections which have to be rescanned after adding or modifying some files, the program can cache the meta data to speed up subsequent runs. from maintainer Girish Venkatachalam, reworked to use python.port.mk and setuptools by wcmaier@ --- audio/mkplaylist/Makefile | 32 ++++++++++++++ audio/mkplaylist/distinfo | 5 +++ audio/mkplaylist/files/mkplaylist.1 | 67 +++++++++++++++++++++++++++++ audio/mkplaylist/files/setup.py | 15 +++++++ audio/mkplaylist/pkg/DESCR | 9 ++++ audio/mkplaylist/pkg/PLIST | 4 ++ 6 files changed, 132 insertions(+) create mode 100644 audio/mkplaylist/Makefile create mode 100644 audio/mkplaylist/distinfo create mode 100644 audio/mkplaylist/files/mkplaylist.1 create mode 100644 audio/mkplaylist/files/setup.py create mode 100644 audio/mkplaylist/pkg/DESCR create mode 100644 audio/mkplaylist/pkg/PLIST diff --git a/audio/mkplaylist/Makefile b/audio/mkplaylist/Makefile new file mode 100644 index 00000000000..317ba86a73f --- /dev/null +++ b/audio/mkplaylist/Makefile @@ -0,0 +1,32 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2008/06/04 07:33:20 sthen Exp $ + +COMMENT= creates playlists from directory trees + +MODPY_EGG_VERSION= 0.4.5 +DISTNAME= mkplaylist-${MODPY_EGG_VERSION} +CATEGORIES= audio +HOMEPAGE= http://bj.spline.de/software.html + +MAINTAINER= Girish Venkatachalam + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= http://bj.spline.de/download/mkplaylist/ + +MODULES= lang/python +PKG_ARCH = * + +NO_REGRESS= Yes + +pre-patch: + @cp ${FILESDIR}/setup.py ${WRKSRC}/. + @mv ${WRKSRC}/mkplaylist.py ${WRKSRC}/mkplaylist + +post-install: + ${INSTALL_MAN} files/mkplaylist.1 ${PREFIX}/man/man1/ + +.include diff --git a/audio/mkplaylist/distinfo b/audio/mkplaylist/distinfo new file mode 100644 index 00000000000..205b42fe61f --- /dev/null +++ b/audio/mkplaylist/distinfo @@ -0,0 +1,5 @@ +MD5 (mkplaylist-0.4.5.tar.gz) = wHOVDtILOjomospudQt+uw== +RMD160 (mkplaylist-0.4.5.tar.gz) = 6sWgHMZBdqkaNUBfVX6c/UT+qHc= +SHA1 (mkplaylist-0.4.5.tar.gz) = WVWYxSaARIVWtTSFXb1qH2KGPxA= +SHA256 (mkplaylist-0.4.5.tar.gz) = 5r5E0Z/kFz601HF+JLKx5F6bc4nUt8t4zSx9g0Req4w= +SIZE (mkplaylist-0.4.5.tar.gz) = 21922 diff --git a/audio/mkplaylist/files/mkplaylist.1 b/audio/mkplaylist/files/mkplaylist.1 new file mode 100644 index 00000000000..ad232541751 --- /dev/null +++ b/audio/mkplaylist/files/mkplaylist.1 @@ -0,0 +1,67 @@ +.\" Copyright (c) 2007, Girish Venkatachalam, +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd +.Dt MKPLAYLIST 1 +.Os +.Sh NAME +.Nm mkplaylist +.Nd create a playlist from directories +.Sh SYNOPSIS +.Nm +.Bk -words +.Op Fl chqrv +.Op Fl f Ar playlist_format +.Op Fl o Ar playlist_file +.Ek +.Sh DESCRIPTION +.Nm +is a small python script that creates m3u, extended m3u or PLS playlists +from ac3, flac, it, mod, mp3, ogg, s3m and wav files. +.Pp +.Sh OPTIONS +Here are the command line options. +.Bl -tag -width Ds +.It Fl c +use a cache file. Default is not to use one. +.It Fl h +help message +.It Fl q +be really quiet +.It Fl r +write relative paths. Default is absolute paths. +.It Fl v +be verbose +.It Fl -shuffle +shuffle the playlist before saving it +.It Fl o +output playlist filename +.El +.Pp +.Sh EXAMPLES +.Bd -literal + +Create the playlist playlist.m3u from the audio files in +/data/music directory. + + mkplaylist --cache -o playlist.m3u /data/music + +Create a playlist in m3u format with relative paths from +two directories /data/music/Various and /data/music/Soundtracks. + + mkplaylist -r -f m3u --shuffle /data/music/Various \ + /data/music/Soundtracks + +.Ed + diff --git a/audio/mkplaylist/files/setup.py b/audio/mkplaylist/files/setup.py new file mode 100644 index 00000000000..36c69bdc392 --- /dev/null +++ b/audio/mkplaylist/files/setup.py @@ -0,0 +1,15 @@ +# $OpenBSD: setup.py,v 1.1.1.1 2008/06/04 07:33:20 sthen Exp $ + +from distutils.core import setup +import sys, os + +setup( + name = "mkplaylist.py", + version = "0.4.5", + description = "creates playlists from directory trees", + author = "Marc 'BlackJack' Rintsch", + author_email = "marc@rintsch.de", + license = "GPL", + url = "http://bj.spline.de/software.html", + scripts = ('mkplaylist',), +) diff --git a/audio/mkplaylist/pkg/DESCR b/audio/mkplaylist/pkg/DESCR new file mode 100644 index 00000000000..43c51f96b2a --- /dev/null +++ b/audio/mkplaylist/pkg/DESCR @@ -0,0 +1,9 @@ +The script scans the given directories for media files with known file +name extensions and writes the names into a playlist file in M3U, +extended M3U or PLS format. Those very simple formats are used or at +least understood by the vast majority of media players on different +platforms. + +For huge collections which have to be rescanned after adding or +modifying some files, the program can cache the meta data to speed up +subsequent runs. diff --git a/audio/mkplaylist/pkg/PLIST b/audio/mkplaylist/pkg/PLIST new file mode 100644 index 00000000000..8f0d74c1977 --- /dev/null +++ b/audio/mkplaylist/pkg/PLIST @@ -0,0 +1,4 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2008/06/04 07:33:20 sthen Exp $ +bin/mkplaylist +lib/python${MODPY_VERSION}/site-packages/mkplaylist.py-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info +@man man/man1/mkplaylist.1