FreeBSD Port: streamripper-1.61.3

Harald Meub harald at meub.net
Wed Mar 16 00:18:20 PST 2005


Hi Trevor!

I noticed you marked current streamripper as broken.

> IGNORE: "is marked as broken: "fails to split up 
> streams into tracks""

It works perfectly if you change the regex default rules, the default 
rules aren't compatible with the used regex lib. I currently just 
override the default with an adapted 'parse_rules.txt' file (calling 
streamripper with '-w <rulesfile>').

The broken rules are:
>>>
# This is the normal parsing rule: "Artist - Title"
# The trailing "A1" means that the artist (A) matches subpattern 1
# The trailing "T2" means that the title (T) matches subpattern 2
m/^[[:space:]]*([^-]*?)[[:space:]]*-
[[:space:]]*(.*?)[[:space:]]*$/A1T2

# This is slightly different parsing rule: "Artist, Title"
m/^[[:space:]]*([^,]*?)[[:space:]]*,[[:space:]]*(.*?)[[:space:]]*$/A1T
2
<<<

I use this rule instead:
m/^[[:space:]]*([^-]*)[[:space:]]*-[[:space:]]*(.*)[[:space:]]*$/A1T2

The difference is the '?' minimal match modifier. With this, 
streamripper complains a malformed rule when starting and fails to 
split.

Best should IMHO be to patch the default which you can find in 
lib/parse.c simply by removing the two question marks in line 78!
>>>
-	"^[[:space:]]*([^-]*?)[[:space:]]*-[[:space:]]*(.*?)[[:space:]]*$",
+	"^[[:space:]]*([^-]*)[[:space:]]*-[[:space:]]*(.*)[[:space:]]*$",
<<<
I haven't tested it but this should do!

hope it helps,
bye, harald

---
Harald Meub
harald at meub.net


More information about the freebsd-ports mailing list