Change log file for FAPG
+version 0.36 (2007-01-17) (by Hank Barta)
+ * Added .pla output (to work with Sansa e200 series player)
+ * Fix segmentation fault with backslash option (patch by Antoine Jacquet)
+
version 0.35 (2006-02-08) (by Andreas Neuper)
* BUG fix: no more ampersand in RSS feeds are passed
* BUG fix: no more spaces or non-printables in links of RSS feeds
-FAPG 0.35 (Fast Audio Playlist Generator)
+FAPG 0.36 (Fast Audio Playlist Generator)
site: http://royale.zerezo.com/fapg/
mail: royale@zerezo.com
make install
usage:
-fapg [-b|--backslash] [-d|--debug] [-f|--format=m3u|pls|html|rss] [-g|--genre=#:#:...] [-o|--output=/path/to/file.m3u] [-p|--prefix=/the/prefix] [-r|--recursive] [-w|--windows] [-x|--exclude=#:#:...] [-c|--command=<intern|...>] /path/to/mp3/dir1 [/path/to/mp3/dir2 ...]
+fapg [-b|--backslash] [-d|--debug] [-f|--format=m3u|pls|html|rss|pla] [-g|--genre=#:#:...] [-o|--output=/path/to/file.m3u] [-p|--prefix=/the/prefix] [-r|--recursive] [-w|--windows] [-x|--exclude=#:#:...] [-c|--command=<intern|...>] /path/to/mp3/dir1 [/path/to/mp3/dir2 ...]
- backslash : replace the '/' with '\' in Unix path.
- debug : display useful messages if the program fails ;)
- format : choose which format of playlist you want to generate (default is m3u).
.\" Process this file with
.\" groff -man -Tascii foo.1
.\"
-.TH FAPG 1 "APRIL 2004" Linux "User Manuals"
+.TH FAPG 1 "JANUARY 2007" Linux "User Manuals"
.SH NAME
fapg \- Fast Audio Playlist Generator
Replace the '/' with '\' in Unix path.
.IP -d|--debug
Display useful messages if the program fails ;)
-.IP -f|--format=m3u|pls|html|rss
+.IP -f|--format=m3u|pls|html|rss|pla
Choose which format of playlist you want to generate (default is m3u).
.IP -g|--genre=#:#:...
Choose which genres (numerical values only) will be included in the generated playlist (default is all).
Generate a podcasting XML file using an external program rss.sh to generate a detailed description:
.B fapg --output=dir.xml -f rss -c /usr/local/bin/rss.sh -r --prefix=http://thisserver/basedir path/to/mp3
+
+Generate a playlist that will work on a Sansa e200 series MP3 player:
+.B fapg -f pla -o /path/to/playlist.pla /path/to/all/music
+
if command starts with
.I intern
the build-in description (Author,Title,Link) is generated.
-/*
- * FAPG
- */
-#define VERSION "0.35"
/*
* FAPG means Fast Audio Playlist Generator.
* It is a tool to generate list of audio files (Wav, MP3, Ogg, etc)
#include <assert.h>
#include "genres.h"
+#define VERSION "0.36"
#define MP3_BASE 1024
#define OGG_BASE 1024*10
#define MAX 1024*200 /* 200ko for ID3 with JPEG images in it */
void usage()
{
fprintf(stderr,
- "Usage >> fapg [-b|--backslash] [-d|--debug] [-f|--format=m3u|pls|html|rss] [-g|--genre=#:#:...] [-n|--nohardlink] [-o|--output=/path/to/file.m3u] [-p|--prefix=/the/prefix] [-r|--recursive] [-w|--windows] [-c|--command=<intern|....>] [-x|--exclude=#:#:...] /path/to/mp3/dir1 [/path/to/mp3/dir2 ...]\n");
+ "Usage >> fapg [-b|--backslash] [-d|--debug] [-f|--format=m3u|pls|html|rss|pla] [-g|--genre=#:#:...] [-n|--nohardlink] [-o|--output=/path/to/file.m3u] [-p|--prefix=/the/prefix] [-r|--recursive] [-w|--windows] [-c|--command=<intern|....>] [-x|--exclude=#:#:...] /path/to/mp3/dir1 [/path/to/mp3/dir2 ...]\n");
exit(1);
}
#define mywebputchar(x) { fputs(iso2web[(unsigned char)winorunix[(unsigned char)x]], stdout); }
#define myputchar(x) { putchar(basemap[(unsigned char)winorunix[(unsigned char)x]]); }
+/* #define myplaputchar(x) { putchar(basemap[(unsigned char)winorunix[(unsigned char)x]]);putchar('\0');} */
+void myplaputchar(const char x)
+{
+ putchar(basemap[(unsigned char)winorunix[(unsigned char)x]]);
+ putchar('\0');
+}
void mywebputstr(const char *c)
{
}
}
+void myplaputstr(const char *c)
+{
+ while(*c != 0) {
+ if( *c == '/')
+ myplaputchar('\\'); /* translate slash to backslash */
+ else
+ myplaputchar(*c);
+ c++;
+ /* remove multiple slashes "//" when parsing a directory ending with a "/" */
+ while(*c == '/' && c[1] == '/')
+ c++;
+ }
+}
+
void myputstr(const char *c)
{
while(*c != 0) {
format = 2;
else if(strcmp(optarg, "rss") == 0)
format = 3;
+ else if(strcmp(optarg, "pla") == 0)
+ format = 4;
else
usage();
break;
// there are no tag infos read
// use file name to state substitute it
char *c = strrchr(newpath, separator);
+ if (c == NULL) c = newpath;
strcpy(artist, ++c);
// arbitrarily use the first '-'
// to separate artist and title
printf("\t</item>%s", eol);
}
break;
+ case 4: // printing output for Sansa players
+ myplaputstr("HARP, ");
+ myplaputstr(newpath);
+ myplaputstr(eol);
+ break;
}
}
}
basemap = noand;
}
break;
+ case 4:
+ {
+ eol = "\r\n";
+ myplaputstr( "PLP PLAYLIST\r\nVERSION 1.20\r\n\r\n" );
+ }
}
for(; optind < argc; optind++) {
parse_directory(argv[optind]);