Skip to content

jmcmellen/Playlist-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

===============================================================
License (see the MIT License)

Copyright (c) 2010 John McMellen

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
==============================================================


********Playlist-Scripts**********

The Python scripts in this repo are dependent on Beautiful Soup.
You can get it here: http://www.crummy.com/software/BeautifulSoup/
I have tested this script with version 3.0.8.1, Python version 2.4. 
Beautiful Soup is an HTML parser that makes it possible to dig for 
data in an HTML page.

** getC24listings.py **
This script generates a URL to get the current day's HTML listings 
for C24. It then parses the listings and builds a list in an XML 
format. Each hour is saved to a seperate file so it can be loaded 
individually. Since the C24 listings are not in a "Artist/Song 
Title/Album" format, we fudge a little, substituting Composer for 
Artist and the first listed performer as Album. The listings seem 
to be in Central Time, so the hours would need to be adjusted 
plus/minus for other timezones. I run this in a daily overnight 
cronjob.

** getHOSlistings.py **
This script is designed to take text as input on STDIN (in my 
case, an email from the HOS producer) and look for the show 
(program) number for the week. The number is used to generate a 
URL for the show playlist in a basic HTML format. The resulting 
HTML is parsed and builds a list of Artist/Title/Album in an 
XML format. The file generated is named based on the date and 
time that the playlist is applicable. I use an email alias to 
route the HOS email to the script so that the email triggers the 
playlist lookup.

About

A collection of Python scripts to get show playlists

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published