PDA

View Full Version : Public Radio Program Playlist Creator



Michael Tarr
2004-12-17, 05:34
Thanks Ben!

Would be useful, alas, when I try to execute the script on Mac OS X, I
get:

dmin% ./prfan_playlist.pl
Can't locate LWP/UserAgent.pm in @INC (@INC contains: /sw/lib/perl5
/sw/lib/perl5/darwin
/System/Library/Perl/5.8.1/darwin-thread-multi-2level
/System/Library/Perl/5.8.1
/Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1
/Library/Perl /Network/Library/Perl/5.8.1/darwin-thread-multi-2level
/Network/Library/Perl/5.8.1 /Network/Library/Perl .) at
../prfan_playlist.pl line 35.
BEGIN failed--compilation aborted at ./prfan_playlist.pl line 35.


Any ideas?

Also, would love a version that simply compiled a playlist of all This
American Life's (http://www.thislife.org) with titles

Best, and Thanks, Mike

Thomas B. Malsbury
2004-12-17, 05:50
Michael Tarr wrote:

> Also, would love a version that simply compiled a playlist of all This
> American Life's (http://www.thislife.org) with titles
>
This is actually why I am curently trying to teach myself perl. My
plans are to rework the AlienBBC plugin to pull the titles from the This
American Life archive and play the real audio streams, in a sense
creating a ThisAlienLife plugin......

Tom

Victor Brilon
2004-12-17, 07:23
As root, do this:
perl -MCPAN -e shell
install LWP


Michael Tarr wrote:
> Thanks Ben!
>
> Would be useful, alas, when I try to execute the script on Mac OS X, I get:
>
> dmin% ./prfan_playlist.pl
> Can't locate LWP/UserAgent.pm in @INC (@INC contains: /sw/lib/perl5
> /sw/lib/perl5/darwin
> /System/Library/Perl/5.8.1/darwin-thread-multi-2level
> /System/Library/Perl/5.8.1
> /Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1
> /Library/Perl /Network/Library/Perl/5.8.1/darwin-thread-multi-2level
> /Network/Library/Perl/5.8.1 /Network/Library/Perl .) at
> ./prfan_playlist.pl line 35.
> BEGIN failed--compilation aborted at ./prfan_playlist.pl line 35.
>
>
> Any ideas?
>
> Also, would love a version that simply compiled a playlist of all This
> American Life's (http://www.thislife.org) with titles
>
> Best, and Thanks, Mike
>
>

Craig Eales
2004-12-17, 07:38
Michael,

Adding a new menu & parser to alienBBC is straight forward, there is already an
"other streams" menu.

Rather than creating a fork I would suggest that you get your parsing
code working, and then post it for Jules or myself to integrate into
the next release.

Jules and I would certainly help with any questions you might have
about writing a parser for alienBBC.

Craig

On Fri, 17 Dec 2004 07:50:24 -0500, Thomas B. Malsbury
<slim (AT) malsbury (DOT) net> wrote:
> Michael Tarr wrote:
>
> > Also, would love a version that simply compiled a playlist of all This
> > American Life's (http://www.thislife.org) with titles
> >
> This is actually why I am curently trying to teach myself perl. My
> plans are to rework the AlienBBC plugin to pull the titles from the This
> American Life archive and play the real audio streams, in a sense
> creating a ThisAlienLife plugin......
>
> Tom
>
>

Thomas B. Malsbury
2004-12-17, 09:29
Craig,

This is the page I would like to parse out for playback through AlienBBC:

http://www.thislife.org/pages/archives/archivemain.html

I envision a sub-folder for each year with the show listed by title in
order by date. I really haven't got a good handle on where to start, if
you could send me a copy of a working parser for me to reverse engineer,
that would be great. Any other suggestions would also be welcome.

Tom

Craig Eales wrote:

>Adding a new menu & parser to alienBBC is straight forward, there is already an
>"other streams" menu.
>
>Rather than creating a fork I would suggest that you get your parsing
>code working, and then post it for Jules or myself to integrate into
>the next release.
>
>Jules and I would certainly help with any questions you might have
>about writing a parser for alienBBC.
>
>Craig
>
>On Fri, 17 Dec 2004 07:50:24 -0500, Thomas B. Malsbury
><slim (AT) malsbury (DOT) net> wrote:
>
>
>>Michael Tarr wrote:
>>
>>
>>
>>>Also, would love a version that simply compiled a playlist of all This
>>>American Life's (http://www.thislife.org) with titles
>>>
>>>
>>>
>>This is actually why I am curently trying to teach myself perl. My
>>plans are to rework the AlienBBC plugin to pull the titles from the This
>>American Life archive and play the real audio streams, in a sense
>>creating a ThisAlienLife plugin......
>>
>>Tom
>>
>>

Ben Klaas
2004-12-17, 09:45
I would be willing to work on the parsing side of this if it isn't
already being worked on. It looks very much like what I did for the
public radio fan website. Looking at the html for the page, I think I
could parse it without the help of any of the LWP modules, too. Let me
know if I can help.
#!/ben

Thomas B. Malsbury wrote:

> Craig,
>
> This is the page I would like to parse out for playback through AlienBBC:
>
> http://www.thislife.org/pages/archives/archivemain.html
>
> I envision a sub-folder for each year with the show listed by title in
> order by date. I really haven't got a good handle on where to start,
> if you could send me a copy of a working parser for me to reverse
> engineer, that would be great. Any other suggestions would also be
> welcome.
>
> Tom
>
> Craig Eales wrote:
>
>>Adding a new menu & parser to alienBBC is straight forward, there is already an
>>"other streams" menu.
>>
>>Rather than creating a fork I would suggest that you get your parsing
>>code working, and then post it for Jules or myself to integrate into
>>the next release.
>>
>>Jules and I would certainly help with any questions you might have
>>about writing a parser for alienBBC.
>>
>>Craig
>>
>>On Fri, 17 Dec 2004 07:50:24 -0500, Thomas B. Malsbury
>><slim (AT) malsbury (DOT) net> wrote:
>>
>>
>>>Michael Tarr wrote:
>>>
>>>
>>>
>>>>Also, would love a version that simply compiled a playlist of all This
>>>>American Life's (http://www.thislife.org) with titles
>>>>
>>>>
>>>>
>>>This is actually why I am curently trying to teach myself perl. My
>>>plans are to rework the AlienBBC plugin to pull the titles from the This
>>>American Life archive and play the real audio streams, in a sense
>>>creating a ThisAlienLife plugin......
>>>
>>>Tom
>>>
>>>

Thomas B. Malsbury
2004-12-17, 11:52
Ben,

To date I have done no work on this project. I would be more then
willing to work with you on it. Unfortunately, I would probably only be
good as a sounding board and tester as my skill in perl is still
limited. Let me know how you would like to proceed. I will also look
more into AlienBBC to see how it expects playlists to be formatted.

Tom

Ben Klaas wrote:

> I would be willing to work on the parsing side of this if it isn't
> already being worked on. It looks very much like what I did for the
> public radio fan website. Looking at the html for the page, I think I
> could parse it without the help of any of the LWP modules, too. Let me
> know if I can help.
> #!/ben
>
> Thomas B. Malsbury wrote:
>
>> This is the page I would like to parse out for playback through
>> AlienBBC:
>>
>> http://www.thislife.org/pages/archives/archivemain.html
>>
>> I envision a sub-folder for each year with the show listed by title
>> in order by date. I really haven't got a good handle on where to
>> start, if you could send me a copy of a working parser for me to
>> reverse engineer, that would be great. Any other suggestions would
>> also be welcome.
>>
>> Tom
>>
>> Craig Eales wrote:
>>
>>> Adding a new menu & parser to alienBBC is straight forward, there is
>>> already an "other streams" menu.
>>>
>>> Rather than creating a fork I would suggest that you get your parsing
>>> code working, and then post it for Jules or myself to integrate into
>>> the next release.
>>>
>>> Jules and I would certainly help with any questions you might have
>>> about writing a parser for alienBBC.
>>>
>>> Craig
>>>
>>> Thomas B. Malsbury wrote:
>>>
>>>> This is actually why I am curently trying to teach myself perl. My
>>>> plans are to rework the AlienBBC plugin to pull the titles from the
>>>> This
>>>> American Life archive and play the real audio streams, in a sense
>>>> creating a ThisAlienLife plugin......
>>>>
>>>> Tom
>>>>
>>>> Michael Tarr wrote:
>>>>
>>>>> Also, would love a version that simply compiled a playlist of all
>>>>> This
>>>>> American Life's (http://www.thislife.org) with titles
>>>>
>>>>

Ben Klaas
2004-12-17, 13:55
Tom--

it's a deal-- I'll parse that page, you look into AlienBBC expectations
(feel free to email me offline). Once I get all the This American Life
URLs and Titles into a perl data structure, we should be able to do
anything we please with it.

as long as we're vaguely on the subject, I have a slimserver newbie
question: how does Slimserver support real audio streams? Is that what
AlienBBC's magic is?

#!/ben


Thomas B. Malsbury wrote:
> Ben,
>
> To date I have done no work on this project. I would be more then
> willing to work with you on it. Unfortunately, I would probably only be
> good as a sounding board and tester as my skill in perl is still
> limited. Let me know how you would like to proceed. I will also look
> more into AlienBBC to see how it expects playlists to be formatted.
>
> Tom
>
> Ben Klaas wrote:
>
>> I would be willing to work on the parsing side of this if it isn't
>> already being worked on. It looks very much like what I did for the
>> public radio fan website. Looking at the html for the page, I think I
>> could parse it without the help of any of the LWP modules, too. Let me
>> know if I can help.
>> #!/ben
>>
>> Thomas B. Malsbury wrote:
>>
>>> This is the page I would like to parse out for playback through
>>> AlienBBC:
>>>
>>> http://www.thislife.org/pages/archives/archivemain.html
>>>
>>> I envision a sub-folder for each year with the show listed by title
>>> in order by date. I really haven't got a good handle on where to
>>> start, if you could send me a copy of a working parser for me to
>>> reverse engineer, that would be great. Any other suggestions would
>>> also be welcome.
>>>
>>> Tom
>>>
>>> Craig Eales wrote:
>>>
>>>> Adding a new menu & parser to alienBBC is straight forward, there is
>>>> already an "other streams" menu.
>>>>
>>>> Rather than creating a fork I would suggest that you get your parsing
>>>> code working, and then post it for Jules or myself to integrate into
>>>> the next release.
>>>>
>>>> Jules and I would certainly help with any questions you might have
>>>> about writing a parser for alienBBC.
>>>>
>>>> Craig
>>>>
>>>> Thomas B. Malsbury wrote:
>>>>
>>>>> This is actually why I am curently trying to teach myself perl. My
>>>>> plans are to rework the AlienBBC plugin to pull the titles from the
>>>>> This
>>>>> American Life archive and play the real audio streams, in a sense
>>>>> creating a ThisAlienLife plugin......
>>>>>
>>>>> Tom
>>>>>
>>>>> Michael Tarr wrote:
>>>>>
>>>>>> Also, would love a version that simply compiled a playlist of all
>>>>>> This
>>>>>> American Life's (http://www.thislife.org) with titles
>>>>>
>>>>>
>>>>>
>
>
>

Jules Taplin
2004-12-18, 04:58
Hi Tom.

You probably wouldn't need to rework AlienBBC - it's already designed to
accomodate additional parsers. Basically... all you'd need to do is to
create a new parser.pm file (there are probably 7 or 8 of these in the
distribution already - there's probably one close to what you need, and
add a single entry in Plugin.pm to add it to the main menu.

Then... if it works robustly... send it on, and I'll stick it in the
main distribution so that everybody can use it ;)


-- Jules


Thomas B. Malsbury wrote:

> Michael Tarr wrote:
>
>> Also, would love a version that simply compiled a playlist of all
>> This American Life's (http://www.thislife.org) with titles
>>
> This is actually why I am curently trying to teach myself perl. My
> plans are to rework the AlienBBC plugin to pull the titles from the
> This American Life archive and play the real audio streams, in a
> sense creating a ThisAlienLife plugin......
>
> Tom
>
>

Jules Taplin
2004-12-18, 04:59
Damn. I'm obviously reading the list too late.

Great minds think alike, eh Craig ;)


-- Jules


Craig Eales wrote:

>Michael,
>
>Adding a new menu & parser to alienBBC is straight forward, there is already an
>"other streams" menu.
>
>Rather than creating a fork I would suggest that you get your parsing
>code working, and then post it for Jules or myself to integrate into
>the next release.
>
>Jules and I would certainly help with any questions you might have
>about writing a parser for alienBBC.
>
>Craig
>
>On Fri, 17 Dec 2004 07:50:24 -0500, Thomas B. Malsbury
><slim (AT) malsbury (DOT) net> wrote:
>
>
>>Michael Tarr wrote:
>>
>>
>>
>>>Also, would love a version that simply compiled a playlist of all This
>>>American Life's (http://www.thislife.org) with titles
>>>
>>>
>>>
>>This is actually why I am curently trying to teach myself perl. My
>>plans are to rework the AlienBBC plugin to pull the titles from the This
>>American Life archive and play the real audio streams, in a sense
>>creating a ThisAlienLife plugin......
>>
>>Tom
>>
>>

Jules Taplin
2004-12-18, 05:05
Hey Ben.

Currently... that magic is indeed in AlienBBC. It packages a tiny
web-proxy, which does precious little other than to transcode non-native
streams to either mp3 or PCM formats. Needless to say... the proxy
doesn't actually do the heavy lifting either, but relies on either
mplayer or the xine libraries to do the magic.

Triode has a set of patches that should eventually replace the proxy
altogether, but that's a somewhat more complicated question. ;)


-- Jules


Ben Klaas wrote:

> Tom--
>
> it's a deal-- I'll parse that page, you look into AlienBBC
> expectations (feel free to email me offline). Once I get all the This
> American Life URLs and Titles into a perl data structure, we should be
> able to do anything we please with it.
>
> as long as we're vaguely on the subject, I have a slimserver newbie
> question: how does Slimserver support real audio streams? Is that what
> AlienBBC's magic is?
>
> #!/ben
>
>
> Thomas B. Malsbury wrote:
>
>> Ben,
>>
>> To date I have done no work on this project. I would be more then
>> willing to work with you on it. Unfortunately, I would probably only
>> be good as a sounding board and tester as my skill in perl is still
>> limited. Let me know how you would like to proceed. I will also
>> look more into AlienBBC to see how it expects playlists to be formatted.
>>
>> Tom
>>
>> Ben Klaas wrote:
>>
>>> I would be willing to work on the parsing side of this if it isn't
>>> already being worked on. It looks very much like what I did for the
>>> public radio fan website. Looking at the html for the page, I think
>>> I could parse it without the help of any of the LWP modules, too.
>>> Let me know if I can help.
>>> #!/ben
>>>
>>> Thomas B. Malsbury wrote:
>>>
>>>> This is the page I would like to parse out for playback through
>>>> AlienBBC:
>>>>
>>>> http://www.thislife.org/pages/archives/archivemain.html
>>>>
>>>> I envision a sub-folder for each year with the show listed by title
>>>> in order by date. I really haven't got a good handle on where to
>>>> start, if you could send me a copy of a working parser for me to
>>>> reverse engineer, that would be great. Any other suggestions would
>>>> also be welcome.
>>>>
>>>> Tom
>>>>
>>>> Craig Eales wrote:
>>>>
>>>>> Adding a new menu & parser to alienBBC is straight forward, there
>>>>> is already an "other streams" menu.
>>>>>
>>>>> Rather than creating a fork I would suggest that you get your parsing
>>>>> code working, and then post it for Jules or myself to integrate into
>>>>> the next release.
>>>>>
>>>>> Jules and I would certainly help with any questions you might have
>>>>> about writing a parser for alienBBC.
>>>>>
>>>>> Craig
>>>>>
>>>>> Thomas B. Malsbury wrote:
>>>>>
>>>>>> This is actually why I am curently trying to teach myself perl. My
>>>>>> plans are to rework the AlienBBC plugin to pull the titles from
>>>>>> the This
>>>>>> American Life archive and play the real audio streams, in a sense
>>>>>> creating a ThisAlienLife plugin......
>>>>>>
>>>>>> Tom
>>>>>>
>>>>>> Michael Tarr wrote:
>>>>>>
>>>>>>> Also, would love a version that simply compiled a playlist of
>>>>>>> all This
>>>>>>> American Life's (http://www.thislife.org) with titles
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>
>>
>>

2004-12-18, 08:46
I see that now. I have to admit that the last time I checked in with
AlienBBC was v0.6 and that is when I came up with the idea. I grabbed
v0.11 last night and I have to say that I am amazed with the improvements.
I have yet to get the playback working, but based on you're great trouble
shooting guide, I think it has to do with my mplayer install and not
AlienBBC.

Ben is working on a parser as we speak, and if it works out you'll be the
first to know.

Tom

> Hi Tom.
>
> You probably wouldn't need to rework AlienBBC - it's already designed to
> accomodate additional parsers. Basically... all you'd need to do is to
> create a new parser.pm file (there are probably 7 or 8 of these in the
> distribution already - there's probably one close to what you need, and
> add a single entry in Plugin.pm to add it to the main menu.
>
> Then... if it works robustly... send it on, and I'll stick it in the
> main distribution so that everybody can use it ;)
>
>
> -- Jules

Jack Coates
2004-12-18, 09:07
slim (AT) malsbury (DOT) net wrote:
> I see that now. I have to admit that the last time I checked in with
> AlienBBC was v0.6 and that is when I came up with the idea. I grabbed
> v0.11 last night and I have to say that I am amazed with the improvements.
> I have yet to get the playback working, but based on you're great trouble
> shooting guide, I think it has to do with my mplayer install and not
> AlienBBC.
>

I'll second that, I had no joy with AlienBBC until I just downloaded and
compiled mplayer. Nothing fancy was required, just a ./configure && make
&& make install.

--
Jack at Monkeynoodle dot Org: It's a Scientific Venture...
Riding the Emergency Third Rail Power Trip since 1996!

Jules Taplin
2004-12-18, 15:42
Well... we've basically got Craig to thank for that. If it was left with
me, the parsers would still be the horrible pile of proof-of-concept
nastiness that I came up with in the first place.

;)

-- Jules



slim (AT) malsbury (DOT) net wrote:

>I see that now. I have to admit that the last time I checked in with
>AlienBBC was v0.6 and that is when I came up with the idea. I grabbed
>v0.11 last night and I have to say that I am amazed with the improvements.
> I have yet to get the playback working, but based on you're great trouble
>shooting guide, I think it has to do with my mplayer install and not
>AlienBBC.
>
>Ben is working on a parser as we speak, and if it works out you'll be the
>first to know.
>
>Tom
>
>
>
>>Hi Tom.
>>
>>You probably wouldn't need to rework AlienBBC - it's already designed to
>> accomodate additional parsers. Basically... all you'd need to do is to
>>create a new parser.pm file (there are probably 7 or 8 of these in the
>>distribution already - there's probably one close to what you need, and
>>add a single entry in Plugin.pm to add it to the main menu.
>>
>>Then... if it works robustly... send it on, and I'll stick it in the
>>main distribution so that everybody can use it ;)
>>
>>
>>-- Jules
>>
>>
>
>
>
>

Ben Klaas
2004-12-18, 17:26
success!

Attached is my This American Life playlist generator, TAL_parser.pl. It
grabs the TAL archive webpage, parses all the stream URLs, titles, and
show dates, and then dynamically creates playlist(s) formatted
specifically for AlienBBC, sorted in one of 3 user-configurable ways
(default is first by year, then alphabetically by title).

Man, I love Perl.

I haven't installed AlienBBC yet, so I haven't been able to prove this
works, but the playlists I created look properly formatted and
slimserver is reading them correctly. Thanks to everybody on this thread
for input, esp. Tom for feedback on my first version of the script,
Micheal for the playlist format, and the AlienBBC guys for doing much
cooler things than this script.

note-- like the PublicRadioFan playlist creator I wrote, you'll need LWP
installed with your Perl. Otherwise, this script should work on any
Perl-enabled OS.

also, the script will take a few seconds to run because the download of
http://www.thislife.org/pages/archives/archivemain.html is not a quick one.

sort styles are done via a command argument to the script. I even
included a help string, which is shown below.

cheers,
#!/ben

[bklaas@shaggy bin]$ ./TAL_parser.pl --help

################################################## #####
TAL_parser.pl A parser and playlist creator
for the online webpage archive listing for This American Life

usage: TAL_parser.pl (--sort sort_style)
Options for --sort are:
alpha
sorts entire This American Life episode list
alphabetically by title
creates 1 playlist file called "This American Life.pls"
alpha_by_year (default)
sorts episode list by year first, then alphabetically
by title
creates a directory called "This American Life"
and a playlist for each year, sorted alphabetically by
title
chrono_by_year
sorts episode list by year first, then reverse
chronologically by title
creates a directory called "This American Life"
and a playlist for each year, sorted in chronological
order,
with the most recent episode first

################################################## #####


Jules Taplin wrote:
> Hey Ben.
>
> Currently... that magic is indeed in AlienBBC. It packages a tiny
> web-proxy, which does precious little other than to transcode non-native
> streams to either mp3 or PCM formats. Needless to say... the proxy
> doesn't actually do the heavy lifting either, but relies on either
> mplayer or the xine libraries to do the magic.
>
> Triode has a set of patches that should eventually replace the proxy
> altogether, but that's a somewhat more complicated question. ;)
>
>
> -- Jules
>
>
> Ben Klaas wrote:
>
>> Tom--
>>
>> it's a deal-- I'll parse that page, you look into AlienBBC
>> expectations (feel free to email me offline). Once I get all the This
>> American Life URLs and Titles into a perl data structure, we should be
>> able to do anything we please with it.
>>
>> as long as we're vaguely on the subject, I have a slimserver newbie
>> question: how does Slimserver support real audio streams? Is that what
>> AlienBBC's magic is?
>>
>> #!/ben
>>
>>
>> Thomas B. Malsbury wrote:
>>
>>> Ben,
>>>
>>> To date I have done no work on this project. I would be more then
>>> willing to work with you on it. Unfortunately, I would probably only
>>> be good as a sounding board and tester as my skill in perl is still
>>> limited. Let me know how you would like to proceed. I will also
>>> look more into AlienBBC to see how it expects playlists to be formatted.
>>>
>>> Tom
>>>
>>> Ben Klaas wrote:
>>>
>>>> I would be willing to work on the parsing side of this if it isn't
>>>> already being worked on. It looks very much like what I did for the
>>>> public radio fan website. Looking at the html for the page, I think
>>>> I could parse it without the help of any of the LWP modules, too.
>>>> Let me know if I can help.
>>>> #!/ben
>>>>
>>>> Thomas B. Malsbury wrote:
>>>>
>>>>> This is the page I would like to parse out for playback through
>>>>> AlienBBC:
>>>>>
>>>>> http://www.thislife.org/pages/archives/archivemain.html
>>>>>
>>>>> I envision a sub-folder for each year with the show listed by title
>>>>> in order by date. I really haven't got a good handle on where to
>>>>> start, if you could send me a copy of a working parser for me to
>>>>> reverse engineer, that would be great. Any other suggestions would
>>>>> also be welcome.
>>>>>
>>>>> Tom
>>>>>
>>>>> Craig Eales wrote:
>>>>>
>>>>>> Adding a new menu & parser to alienBBC is straight forward, there
>>>>>> is already an "other streams" menu.
>>>>>>
>>>>>> Rather than creating a fork I would suggest that you get your parsing
>>>>>> code working, and then post it for Jules or myself to integrate into
>>>>>> the next release.
>>>>>>
>>>>>> Jules and I would certainly help with any questions you might have
>>>>>> about writing a parser for alienBBC.
>>>>>>
>>>>>> Craig
>>>>>>
>>>>>> Thomas B. Malsbury wrote:
>>>>>>
>>>>>>> This is actually why I am curently trying to teach myself perl. My
>>>>>>> plans are to rework the AlienBBC plugin to pull the titles from
>>>>>>> the This
>>>>>>> American Life archive and play the real audio streams, in a sense
>>>>>>> creating a ThisAlienLife plugin......
>>>>>>>
>>>>>>> Tom
>>>>>>>
>>>>>>> Michael Tarr wrote:
>>>>>>>
>>>>>>>> Also, would love a version that simply compiled a playlist of
>>>>>>>> all This
>>>>>>>> American Life's (http://www.thislife.org) with titles
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>
>>>
>>>

Jack Coates
2004-12-18, 21:22
Ben Klaas wrote:
> success!
>
> Attached is my This American Life playlist generator, TAL_parser.pl. It
> grabs the TAL archive webpage, parses all the stream URLs, titles, and
> show dates, and then dynamically creates playlist(s) formatted
> specifically for AlienBBC, sorted in one of 3 user-configurable ways
> (default is first by year, then alphabetically by title).
>
> Man, I love Perl.
>
> I haven't installed AlienBBC yet, so I haven't been able to prove this
> works, but the playlists I created look properly formatted and
> slimserver is reading them correctly. Thanks to everybody on this thread
> for input, esp. Tom for feedback on my first version of the script,
> Micheal for the playlist format, and the AlienBBC guys for doing much
> cooler things than this script.
>
> note-- like the PublicRadioFan playlist creator I wrote, you'll need LWP
> installed with your Perl. Otherwise, this script should work on any
> Perl-enabled OS.
>
> also, the script will take a few seconds to run because the download of
> http://www.thislife.org/pages/archives/archivemain.html is not a quick one.
>
> sort styles are done via a command argument to the script. I even
> included a help string, which is shown below.
>


way cool, thanks! I added -w to the interpreter line and got plenty of
uninitialized values errors:

Use of uninitialized value in pattern match (m//) at ./TAL_parser.pl
line 25.
Use of uninitialized value in pattern match (m//) at ./TAL_parser.pl
line 54.
Use of uninitialized value in pattern match (m//) at ./TAL_parser.pl
line 25.

That's using sort chrono_by_year. But the playlist generator still does
its job just fine. I moved the generated folder into my playlists folder
and I'm now listening to a show from 1999. Faboo! Thanks again to you,
the AlienBBC team, and the Slim Devices team.

By the way, my "thanks for being a customer, here's $20 off" card came
in the mail today. I mentioned we should buy another Squeezebox, but I'm
afraid my wife didn't even dignify it with a response :) Next year
though, I'm sure.
--
Jack at Monkeynoodle dot Org: It's a Scientific Venture...
Riding the Emergency Third Rail Power Trip since 1996!

2004-12-19, 07:55
> success!
>

Indeed it is. I ran it and it worked perfectly!

I moved the created directory to my Playlist folder, and can browse it
directly through slim and start playback directly. No need to browse and
reparse through AlienBBC.

I think that I am just going to setup a cron job to run it once a week to
grab new shows as they are posted to the archive and replace the
playlists.

I eventually gave up trying to install mplayer. I just set AlienBBC to
use the succesful install of Alienstream I already had installed. I will
try again, but I just had to walk away from it for a little while.

This new TAL feature combined with the PublicRadioFan plugin have pushed
the household approval of Slimserver to all time highs.

Thanks again Ben,

Tom

Craig Eales
2004-12-21, 06:45
I didn't have a choice - my wife only agreed to let me buy a slim box
because I promised it would play BBC radio archives ;-)

I've seen that Ben Klass has written a standalone parser for a big
archive of US Public Radio stuff (This American Life).

I am getting away from the paying job for a while over the holidays,
so I will modify it into an AlienBBC parser, and roll it into the next
release.

Ben - as you posted the code on this list - I take it that you have
placed your parser in the public domain (and have no objections to it
being added into alienBBC)?

I also have some other changes (patches to the main server code) I am
working on that could help with squeaky stream syndrome (sample rate
problems etc), hopefully, these will get done over the holidays too.

Craig

On Sat, 18 Dec 2004 22:42:14 +0000, Jules Taplin
<slim-discuss (AT) ourhouse (DOT) org.uk> wrote:
> Well... we've basically got Craig to thank for that. If it was left with
> me, the parsers would still be the horrible pile of proof-of-concept
> nastiness that I came up with in the first place.
>
> ;)
>
> -- Jules
>
>
> slim (AT) malsbury (DOT) net wrote:
>
> >I see that now. I have to admit that the last time I checked in with
> >AlienBBC was v0.6 and that is when I came up with the idea. I grabbed
> >v0.11 last night and I have to say that I am amazed with the improvements.
> > I have yet to get the playback working, but based on you're great trouble
> >shooting guide, I think it has to do with my mplayer install and not
> >AlienBBC.
> >
> >Ben is working on a parser as we speak, and if it works out you'll be the
> >first to know.
> >
> >Tom
> >
> >
> >
> >>Hi Tom.
> >>
> >>You probably wouldn't need to rework AlienBBC - it's already designed to
> >> accomodate additional parsers. Basically... all you'd need to do is to
> >>create a new parser.pm file (there are probably 7 or 8 of these in the
> >>distribution already - there's probably one close to what you need, and
> >>add a single entry in Plugin.pm to add it to the main menu.
> >>
> >>Then... if it works robustly... send it on, and I'll stick it in the
> >>main distribution so that everybody can use it ;)
> >>
> >>
> >>-- Jules
> >>
> >>
> >
> >
> >
> >

Ben Klaas
2004-12-21, 08:05
absolutely. Actually, I'm going to license it under the "Klaas Domain",
which means that if you can give me any pointers shortcomings of my
Perl, I'll be happy to hear them ;)

my parser uses HTML::TokeParser which is part of LWP. Not a problem in
Linux Perl, as I think LWP is part of 5.8.x core modules, but OSX
doesn't have it installed by default...

let me know if you need any extra input from me. BTW--I got AlienBBC
working on my Fedora Core 3 machine with next-to-zero effort (installed
real audio codecs, installed AlienBBC, restarted slimserver, bingo). So,
I was finally able to test the This American Life playlist I created
with my script, and works like a charm. Many kudos to the Alien crew. If
your gang every wants to have a uniform of sorts, I'd start with this cap:
http://www.milbstore.com/regular_product_details.asp?style_flag=Y&item_no=11CP3+LAV+QA+H&x=35&y=6

cheers,
#!/ben

Craig Eales wrote:

>Ben - as you posted the code on this list - I take it that you have
>placed your parser in the public domain (and have no objections to it
>being added into alienBBC)?
>
>