Author: duncan
Date: Thu Feb 21 15:39:36 2008
New Revision: 10401

Log:
Consolidating differencies between rel-1 and rel-1-7


Modified:
   branches/rel-1-7/freevo/src/util/amazon.py
   branches/rel-1-7/freevo/src/util/fileops.py
   branches/rel-1-7/freevo/src/util/fxdimdb.py
   branches/rel-1-7/freevo/src/util/fxdparser.py
   branches/rel-1-7/freevo/src/util/marmalade.py
   branches/rel-1-7/freevo/src/util/mediainfo.py
   branches/rel-1-7/freevo/src/util/misc.py
   branches/rel-1-7/freevo/src/util/pymetar.py
   branches/rel-1-7/freevo/src/util/tv_util.py
   branches/rel-1/freevo/src/util/amazon.py
   branches/rel-1/freevo/src/util/fxdimdb.py
   branches/rel-1/freevo/src/util/mediainfo.py
   branches/rel-1/freevo/src/util/misc.py
   branches/rel-1/freevo/src/util/pymetar.py

Modified: branches/rel-1-7/freevo/src/util/amazon.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/amazon.py  (original)
+++ branches/rel-1-7/freevo/src/util/amazon.py  Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# strptime.py - This is the Freevo module
+# This is the Freevo module for processing Amazon data
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -28,59 +28,56 @@
 #
 # -----------------------------------------------------------------------
 
-"""Python wrapper
+"""Python wrapper for Amazon web APIs
 
-
-for Amazon web APIs
-
-This module allows you to access Amazon's web APIs,
-to do things like search Amazon and get the results programmatically.
-Described here:
-  http://www.amazon.com/webservices
-
-You need a Amazon-provided license key to use these services.
-Follow the link above to get one.  These functions will look in
-several places (in this order) for the license key:
-- the "license_key" argument of each function
-- the module-level LICENSE_KEY variable (call setLicense once to set it)
-- an environment variable called AMAZON_LICENSE_KEY
-- a file called ".amazonkey" in the current directory
-- a file called "amazonkey.txt" in the current directory
-- a file called ".amazonkey" in your home directory
-- a file called "amazonkey.txt" in your home directory
-- a file called ".amazonkey" in the same directory as amazon.py
-- a file called "amazonkey.txt" in the same directory as amazon.py
-
-Sample usage:
->>> import amazon
->>> amazon.setLicense('...') # must get your own key!
->>> pythonBooks = amazon.searchByKeyword('Python')
->>> pythonBooks[0].ProductName
-u'Learning Python (Help for Programmers)'
->>> pythonBooks[0].URL
-...
->>> pythonBooks[0].OurPrice
-...
+This module allows you to access Amazon's web APIs, to do things like search
+Amazon and get the results programmatically.  Described here:
+http://www.amazon.com/webservices
+
+You need a Amazon-provided license key to use these services.  Follow the link
+above to get one.  These functions will look in several places (in this order)
+for the license key:
+    - the "license_key" argument of each function
+    - the module-level LICENSE_KEY variable (call setLicense once to set it)
+    - an environment variable called AMAZON_LICENSE_KEY
+    - a file called ".amazonkey" in the current directory
+    - a file called "amazonkey.txt" in the current directory
+    - a file called ".amazonkey" in your home directory
+    - a file called "amazonkey.txt" in your home directory
+    - a file called ".amazonkey" in the same directory as amazon.py
+    - a file called "amazonkey.txt" in the same directory as amazon.py
+
+Sample usage::
+
+    >>> import amazon
+    >>> amazon.setLicense('...') # must get your own key!
+    >>> pythonBooks = amazon.searchByKeyword('Python')
+    >>> pythonBooks[0].ProductName
+    u'Learning Python (Help for Programmers)'
+    >>> pythonBooks[0].URL
+    ...
+    >>> pythonBooks[0].OurPrice
+    ...
 
 Other available functions:
-- browseBestSellers
-- searchByASIN
-- searchByUPC
-- searchByAuthor
-- searchByArtist
-- searchByActor
-- searchByDirector
-- searchByManufacturer
-- searchByListMania
-- searchSimilar
-- searchByWishlist
+    - browseBestSellers
+    - searchByASIN
+    - searchByUPC
+    - searchByAuthor
+    - searchByArtist
+    - searchByActor
+    - searchByDirector
+    - searchByManufacturer
+    - searchByListMania
+    - searchSimilar
+    - searchByWishlist
 
 Other usage notes:
-- Most functions can take product_line as well, see source for possible values
-- All functions can take type="lite" to get less detail in results
-- All functions can take page=N to get second, third, fourth page of results
-- All functions can take license_key="XYZ", instead of setting it globally
-- All functions can take http_proxy="http://x/y/z"; which overrides your system 
setting
+    - Most functions can take product_line as well, see source for possible 
values
+    - All functions can take type="lite" to get less detail in results
+    - All functions can take page=N to get second, third, fourth page of 
results
+    - All functions can take license_key="XYZ", instead of setting it globally
+    - All functions can take http_proxy="http://x/y/z"; which overrides your 
system setting
 """
 
 __author__ = "Mark Pilgrim ([EMAIL PROTECTED])"
@@ -252,41 +249,43 @@
     this function every time, or set it globally; see the module docs for 
details.
 
     Parameters:
-    keyword - keyword to search
-    search_type - in (KeywordSearch, BrowseNodeSearch, AsinSearch, UpcSearch, 
AuthorSearch, ArtistSearch, ActorSearch, DirectorSearch, ManufacturerSearch, 
ListManiaSearch, SimilaritySearch)
-    product_line - type of product to search for.  restrictions based on 
search_type
+    @param keyword: keyword to search
+    @param search_type: in (KeywordSearch, BrowseNodeSearch, AsinSearch,
+        UpcSearch, AuthorSearch, ArtistSearch, ActorSearch, DirectorSearch,
+        ManufacturerSearch, ListManiaSearch, SimilaritySearch)
+    @param product_line: type of product to search for.  restrictions based on 
search_type
         UpcSearch - in (music, classical)
         AuthorSearch - must be "books"
         ArtistSearch - in (music, classical)
         ActorSearch - in (dvd, vhs, video)
         DirectorSearch - in (dvd, vhs, video)
         ManufacturerSearch - in (electronics, kitchen, videogames, software, 
photo, pc-hardware)
-    http_proxy (optional) - address of HTTP proxy to use for sending and 
receiving SOAP messages
+    @param http_proxy: (optional) - address of HTTP proxy to use for sending 
and receiving SOAP messages
 
-    Returns: list of Bags, each Bag may contain the following attributes:
-      Asin - Amazon ID ("ASIN" number) of this item
-      Authors - list of authors
-      Availability - "available", etc.
-      BrowseList - list of related categories
-      Catalog - catalog type ("Book", etc)
-      CollectiblePrice - ?, format "$34.95"
-      ImageUrlLarge - URL of large image of this item
-      ImageUrlMedium - URL of medium image of this item
-      ImageUrlSmall - URL of small image of this item
-      Isbn - ISBN number
-      ListPrice - list price, format "$34.95"
-      Lists - list of ListMania lists that include this item
-      Manufacturer - manufacturer
-      Media - media ("Paperback", "Audio CD", etc)
-      NumMedia - number of different media types in which this item is 
available
-      OurPrice - Amazon price, format "$24.47"
-      ProductName - name of this item
-      ReleaseDate - release date, format "09 April, 1999"
-      Reviews - reviews (AvgCustomerRating, plus list of CustomerReview with 
Rating, Summary, Content)
-      SalesRank - sales rank (integer)
-      SimilarProducts - list of Product, which is ASIN number
-      ThirdPartyNewPrice - ?, format "$34.95"
-      URL - URL of this item
+    @returns: list of Bags, each Bag may contain the following attributes:
+        Asin - Amazon ID ("ASIN" number) of this item
+        Authors - list of authors
+        Availability - "available", etc.
+        BrowseList - list of related categories
+        Catalog - catalog type ("Book", etc)
+        CollectiblePrice - ?, format "$34.95"
+        ImageUrlLarge - URL of large image of this item
+        ImageUrlMedium - URL of medium image of this item
+        ImageUrlSmall - URL of small image of this item
+        Isbn - ISBN number
+        ListPrice - list price, format "$34.95"
+        Lists - list of ListMania lists that include this item
+        Manufacturer - manufacturer
+        Media - media ("Paperback", "Audio CD", etc)
+        NumMedia - number of different media types in which this item is 
available
+        OurPrice - Amazon price, format "$24.47"
+        ProductName - name of this item
+        ReleaseDate - release date, format "09 April, 1999"
+        Reviews - reviews (AvgCustomerRating, plus list of CustomerReview with 
Rating, Summary, Content)
+        SalesRank - sales rank (integer)
+        SimilarProducts - list of Product, which is ASIN number
+        ThirdPartyNewPrice - ?, format "$34.95"
+        URL - URL of this item
     """
     license_key = getLicense(license_key)
     url = buildURL(search_type, keyword, product_line, type, page, license_key)

Modified: branches/rel-1-7/freevo/src/util/fileops.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/fileops.py (original)
+++ branches/rel-1-7/freevo/src/util/fileops.py Thu Feb 21 15:39:36 2008
@@ -306,11 +306,11 @@
     os.path.walk is difficult, clunky and doesn't work right in my
     mind.
 
-    Here's how you use this function:
+    Here's how you use this function::
 
-    songs = recursefolders('/media/Music/Guttermouth',1,'*.mp3',1):
-    for song in songs:
-          print song
+        songs = recursefolders('/media/Music/Guttermouth',1,'*.mp3',1)
+        for song in songs:
+              print song
 
     Should be easy to add to the mp3.py app.
     """

Modified: branches/rel-1-7/freevo/src/util/fxdimdb.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/fxdimdb.py (original)
+++ branches/rel-1-7/freevo/src/util/fxdimdb.py Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# fxdimdb.py - class and helpers for fxd/imdb generation
+# class and helpers for fxd/imdb generation
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -125,9 +125,12 @@
 
 
     def searchImdb(self, name):
-        """name (string), returns id list
-        Search for name and returns an id list with tuples:
-            (id , name, year, type)"""
+        """
+        @param name: name to search for
+        @type name: string
+        @returns: id list with tuples:
+            (id , name, year, type)
+        """
 
         _debug_('searching imdb for "%s"' % (name))
         url = 'http://us.imdb.com/Tsearch?title=%s&restrict=Movies+and+TV' % 
urllib.quote(str(name))

Modified: branches/rel-1-7/freevo/src/util/fxdparser.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/fxdparser.py       (original)
+++ branches/rel-1-7/freevo/src/util/fxdparser.py       Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# fxdparser.py - Parser for fxd files
+# Parser for fxd files
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -46,7 +46,7 @@
     """
     One node for the FXDtree
     """
-    def __init__(self, name, attr = [], first_cdata=None, 
following_cdata=None):
+    def __init__(self, name, attr=[], first_cdata=None, following_cdata=None):
         self.name = name
         self.attr_list = []
         for name, val in attr:

Modified: branches/rel-1-7/freevo/src/util/marmalade.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/marmalade.py       (original)
+++ branches/rel-1-7/freevo/src/util/marmalade.py       Thu Feb 21 15:39:36 2008
@@ -395,7 +395,7 @@
                     elif hasattr(obj, "__dict__"):
                         state = obj.__dict__
                     else:
-                        raise "Unsupported type: %s %s" % 
(objType.__name__,repr(obj))
+                        raise "Unsupported type: %s %s" % (objType.__name__, 
repr(obj))
                     n = self.jellyToNode(state)
                     node.appendChild(n)
             else:

Modified: branches/rel-1-7/freevo/src/util/mediainfo.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/mediainfo.py       (original)
+++ branches/rel-1-7/freevo/src/util/mediainfo.py       Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# util/mediainfo.py - media info storage/parsing
+# media information for storage/parsing
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -621,7 +621,7 @@
         mmdata = mmpython.parse(media.devicename)
         if not mmdata:
             print '*****************************************'
-            print 'Error detecting the disc'
+            print 'Error detecting the disc in %r' % (media.devicename)
             print 'Please contact the developers'
             print '*****************************************'
             return {}

Modified: branches/rel-1-7/freevo/src/util/misc.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/misc.py    (original)
+++ branches/rel-1-7/freevo/src/util/misc.py    Thu Feb 21 15:39:36 2008
@@ -393,11 +393,9 @@
     return string
 
 
-#
-# Coming Up for TV schedule
-#
-
-def comingup(items=None, ScheduledRecordings=None):
+def comingup(items=None, scheduledRecordings=None):
+    """ Coming Up for TV schedule """
+    print 'comingup(items=%r, scheduledRecordings=%r)' % (items, 
scheduledRecordings)
     import tv.record_client as ri
     import time
     import codecs
@@ -405,9 +403,8 @@
     result = u''
 
     cachefile = '%s/upsoon' % (config.FREEVO_CACHEDIR)
-    if not ScheduledRecordings:
-        if (os.path.exists(cachefile) and \
-            (abs(time.time() - os.path.getmtime(cachefile)) < 600)):
+    if not scheduledRecordings:
+        if os.path.exists(cachefile) and abs(time.time() - 
os.path.getmtime(cachefile)) < 600:
             cache = codecs.open(cachefile,'r', config.encoding)
             for a in cache.readlines():
                 result = result + a
@@ -416,7 +413,7 @@
 
         (status, recordings) = ri.getScheduledRecordings()
     else:
-        (status, recordings) = ScheduledRecordings
+        (status, recordings) = scheduledRecordings
 
     if not status:
         result = _('The recordserver is down')

Modified: branches/rel-1-7/freevo/src/util/pymetar.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/pymetar.py (original)
+++ branches/rel-1-7/freevo/src/util/pymetar.py Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# pymetar.py - This is the Freevo module
+# This is the Freevo module for weather data
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -100,291 +100,291 @@
 # format of their response, this is not to save bandwidth :-)
 #
 _WeatherConditions = {
-                      "DZ" : ("Drizzle", "rain", {
-                               "" :   "Moderate drizzle",
-                               "-" :  "Light drizzle",
-                               "+" :  "Heavy drizzle",
-                               "VC" : "Drizzle in the vicinity",
-                               "MI" : "Shallow drizzle",
-                               "BC" : "Patches of drizzle",
-                               "PR" : "Partial drizzle",
-                               "TS" : ("Thunderstorm", "storm"),
-                               "BL" : "Windy drizzle",
-                               "SH" : "Showers",
-                               "DR" : "Drifting drizzle",
-                               "FZ" : "Freezing drizzle",
-                             }),
-                      "RA" : ("Rain", "rain", {
-                               "" :   "Moderate rain",
-                               "-" :  "Light rain",
-                               "+" :  "Heavy rain",
-                               "VC" : "Rain in the vicinity",
-                               "MI" : "Shallow rain",
-                               "BC" : "Patches of rain",
-                               "PR" : "Partial rainfall",
-                               "TS" : ("Thunderstorm", "storm"),
-                               "BL" : "Blowing rainfall",
-                               "SH" : "Rain showers",
-                               "DR" : "Drifting rain",
-                               "FZ" : "Freezing rain",
-                             }),
-                      "SN" : ("Snow", "snow", {
-                               "" :   "Moderate snow",
-                               "-" :  "Light snow",
-                               "+" :  "Heavy snow",
-                               "VC" : "Snow in the vicinity",
-                               "MI" : "Shallow snow",
-                               "BC" : "Patches of snow",
-                               "PR" : "Partial snowfall",
-                               "TS" : ("Snowstorm", "storm"),
-                               "BL" : "Blowing snowfall",
-                               "SH" : "Snowfall showers",
-                               "DR" : "Drifting snow",
-                               "FZ" : "Freezing snow",
-                             }),
-                      "SG" : ("Snow grains", "snow", {
-                               "" :   "Moderate snow grains",
-                               "-" :  "Light snow grains",
-                               "+" :  "Heavy snow grains",
-                               "VC" : "Snow grains in the vicinity",
-                               "MI" : "Shallow snow grains",
-                               "BC" : "Patches of snow grains",
-                               "PR" : "Partial snow grains",
-                               "TS" : ("Snowstorm", "storm"),
-                               "BL" : "Blowing snow grains",
-                               "SH" : "Snow grain showers",
-                               "DR" : "Drifting snow grains",
-                               "FZ" : "Freezing snow grains",
-                             }),
-                      "IC" : ("Ice crystals", "snow", {
-                               "" :   "Moderate ice crystals",
-                               "-" :  "Few ice crystals",
-                               "+" :  "Heavy ice crystals",
-                               "VC" : "Ice crystals in the vicinity",
-                               "BC" : "Patches of ice crystals",
-                               "PR" : "Partial ice crystals",
-                               "TS" : ("Ice crystal storm", "storm"),
-                               "BL" : "Blowing ice crystals",
-                               "SH" : "Showers of ice crystals",
-                               "DR" : "Drifting ice crystals",
-                               "FZ" : "Freezing ice crystals",
-                             }),
-                      "PE" : ("Ice pellets", "snow", {
-                               "" :   "Moderate ice pellets",
-                               "-" :  "Few ice pellets",
-                               "+" :  "Heavy ice pellets",
-                               "VC" : "Ice pellets in the vicinity",
-                               "MI" : "Shallow ice pellets",
-                               "BC" : "Patches of ice pellets",
-                               "PR" : "Partial ice pellets",
-                               "TS" : ("Ice pellets storm", "storm"),
-                               "BL" : "Blowing ice pellets",
-                               "SH" : "Showers of ice pellets",
-                               "DR" : "Drifting ice pellets",
-                               "FZ" : "Freezing ice pellets",
-                             }),
-                      "GR" : ("Hail", "rain", {
-                               "" :   "Moderate hail",
-                               "-" :  "Light hail",
-                               "+" :  "Heavy hail",
-                               "VC" : "Hail in the vicinity",
-                               "MI" : "Shallow hail",
-                               "BC" : "Patches of hail",
-                               "PR" : "Partial hail",
-                               "TS" : ("Hailstorm", "storm"),
-                               "BL" : "Blowing hail",
-                               "SH" : "Hail showers",
-                               "DR" : "Drifting hail",
-                               "FZ" : "Freezing hail",
-                             }),
-                      "GS" : ("Small hail", "rain", {
-                               "" :   "Moderate small hail",
-                               "-" :  "Light small hail",
-                               "+" :  "Heavy small hail",
-                               "VC" : "Small hail in the vicinity",
-                               "MI" : "Shallow small hail",
-                               "BC" : "Patches of small hail",
-                               "PR" : "Partial small hail",
-                               "TS" : ("Small hailstorm", "storm"),
-                               "BL" : "Blowing small hail",
-                               "SH" : "Showers of small hail",
-                               "DR" : "Drifting small hail",
-                               "FZ" : "Freezing small hail",
-                             }),
-                      "UP" : ("Precipitation", "rain", {
-                               "" :   "Moderate precipitation",
-                               "-" :  "Light precipitation",
-                               "+" :  "Heavy precipitation",
-                               "VC" : "Precipitation in the vicinity",
-                               "MI" : "Shallow precipitation",
-                               "BC" : "Patches of precipitation",
-                               "PR" : "Partial precipitation",
-                               "TS" : ("Unknown thunderstorm", "storm"),
-                               "BL" : "Blowing precipitation",
-                               "SH" : "Showers, type unknown",
-                               "DR" : "Drifting precipitation",
-                               "FZ" : "Freezing precipitation",
-                             }),
-                      "BR" : ("Mist", "fog", {
-                               "" :   "Moderate mist",
-                               "-" :  "Light mist",
-                               "+" :  "Thick mist",
-                               "VC" : "Mist in the vicinity",
-                               "MI" : "Shallow mist",
-                               "BC" : "Patches of mist",
-                               "PR" : "Partial mist",
-                               "BL" : "Mist with wind",
-                               "DR" : "Drifting mist",
-                               "FZ" : "Freezing mist",
-                             }),
-                      "FG" : ("Fog", "fog", {
-                               "" :   "Moderate fog",
-                               "-" :  "Light fog",
-                               "+" :  "Thick fog",
-                               "VC" : "Fog in the vicinity",
-                               "MI" : "Shallow fog",
-                               "BC" : "Patches of fog",
-                               "PR" : "Partial fog",
-                               "BL" : "Fog with wind",
-                               "DR" : "Drifting fog",
-                               "FZ" : "Freezing fog",
-                             }),
-                      "FU" : ("Smoke", "fog", {
-                               "" :   "Moderate smoke",
-                               "-" :  "Thin smoke",
-                               "+" :  "Thick smoke",
-                               "VC" : "Smoke in the vicinity",
-                               "MI" : "Shallow smoke",
-                               "BC" : "Patches of smoke",
-                               "PR" : "Partial smoke",
-                               "TS" : ("Smoke w/ thunders", "storm"),
-                               "BL" : "Smoke with wind",
-                               "DR" : "Drifting smoke",
-                             }),
-                      "VA" : ("Volcanic ash", "fog", {
-                               "" :   "Moderate volcanic ash",
-                               "+" :  "Thick volcanic ash",
-                               "VC" : "Volcanic ash in the vicinity",
-                               "MI" : "Shallow volcanic ash",
-                               "BC" : "Patches of volcanic ash",
-                               "PR" : "Partial volcanic ash",
-                               "TS" : ("Volcanic ash w/ thunders", "storm"),
-                               "BL" : "Blowing volcanic ash",
-                               "SH" : "Showers of volcanic ash",
-                               "DR" : "Drifting volcanic ash",
-                               "FZ" : "Freezing volcanic ash",
-                             }),
-                      "SA" : ("Sand", "fog", {
-                               "" :   "Moderate sand",
-                               "-" :  "Light sand",
-                               "+" :  "Heavy sand",
-                               "VC" : "Sand in the vicinity",
-                               "BC" : "Patches of sand",
-                               "PR" : "Partial sand",
-                               "BL" : "Blowing sand",
-                               "DR" : "Drifting sand",
-                             }),
-                      "HZ" : ("Haze", "fog", {
-                               "" :   "Moderate haze",
-                               "-" :  "Light haze",
-                               "+" :  "Thick haze",
-                               "VC" : "Haze in the vicinity",
-                               "MI" : "Shallow haze",
-                               "BC" : "Patches of haze",
-                               "PR" : "Partial haze",
-                               "BL" : "Haze with wind",
-                               "DR" : "Drifting haze",
-                               "FZ" : "Freezing haze",
-                             }),
-                      "PY" : ("Sprays", "fog", {
-                               "" :   "Moderate sprays",
-                               "-" :  "Light sprays",
-                               "+" :  "Heavy sprays",
-                               "VC" : "Sprays in the vicinity",
-                               "MI" : "Shallow sprays",
-                               "BC" : "Patches of sprays",
-                               "PR" : "Partial sprays",
-                               "BL" : "Blowing sprays",
-                               "DR" : "Drifting sprays",
-                               "FZ" : "Freezing sprays",
-                             }),
-                      "DU" : ("Dust", "fog", {
-                               "" :   "Moderate dust",
-                               "-" :  "Light dust",
-                               "+" :  "Heavy dust",
-                               "VC" : "Dust in the vicinity",
-                               "BC" : "Patches of dust",
-                               "PR" : "Partial dust",
-                               "BL" : "Blowing dust",
-                               "DR" : "Drifting dust",
-                             }),
-                      "SQ" : ("Squall", "storm", {
-                               "" :   "Moderate squall",
-                               "-" :  "Light squall",
-                               "+" :  "Heavy squall",
-                               "VC" : "Squall in the vicinity",
-                               "PR" : "Partial squall",
-                               "TS" : "Thunderous squall",
-                               "BL" : "Blowing squall",
-                               "DR" : "Drifting squall",
-                               "FZ" : "Freezing squall",
-                             }),
-                      "SS" : ("Sandstorm", "fog", {
-                               "" :   "Moderate sandstorm",
-                               "-" :  "Light sandstorm",
-                               "+" :  "Heavy sandstorm",
-                               "VC" : "Sandstorm in the vicinity",
-                               "MI" : "Shallow sandstorm",
-                               "PR" : "Partial sandstorm",
-                               "TS" : ("Thunderous sandstorm", "storm"),
-                               "BL" : "Blowing sandstorm",
-                               "DR" : "Drifting sandstorm",
-                               "FZ" : "Freezing sandstorm",
-                             }),
-                      "DS" : ("Duststorm", "fog", {
-                               "" :   "Moderate duststorm",
-                               "-" :  "Light duststorm",
-                               "+" :  "Heavy duststorm",
-                               "VC" : "Duststorm in the vicinity",
-                               "MI" : "Shallow duststorm",
-                               "PR" : "Partial duststorm",
-                               "TS" : ("Thunderous duststorm", "storm"),
-                               "BL" : "Blowing duststorm",
-                               "DR" : "Drifting duststorm",
-                               "FZ" : "Freezing duststorm",
-                             }),
-                      "PO" : ("Dustwhirls", "fog", {
-                               "" :   "Moderate dustwhirls",
-                               "-" :  "Light dustwhirls",
-                               "+" :  "Heavy dustwhirls",
-                               "VC" : "Dustwhirls in the vicinity",
-                               "MI" : "Shallow dustwhirls",
-                               "BC" : "Patches of dustwhirls",
-                               "PR" : "Partial dustwhirls",
-                               "BL" : "Blowing dustwhirls",
-                               "DR" : "Drifting dustwhirls",
-                             }),
-                      "+FC" : ("Tornado", "storm", {
-                               "" :   "Moderate tornado",
-                               "+" :  "Raging tornado",
-                               "VC" : "Tornado in the vicinity",
-                               "PR" : "Partial tornado",
-                               "TS" : "Thunderous tornado",
-                               "BL" : "Tornado",
-                               "DR" : "Drifting tornado",
-                               "FZ" : "Freezing tornado",
-                              }),
-                      "FC" : ("Funnel cloud", "fog", {
-                               "" :   "Moderate funnel cloud",
-                               "-" :  "Light funnel cloud",
-                               "+" :  "Thick funnel cloud",
-                               "VC" : "Funnel cloud in the vicinity",
-                               "MI" : "Shallow funnel cloud",
-                               "BC" : "Patches of funnel cloud",
-                               "PR" : "Partial funnel cloud",
-                               "BL" : "Funnel cloud w/ wind",
-                               "DR" : "Drifting funnel cloud",
-                             }),
+    "DZ" : ("Drizzle", "rain", {
+           "" :   "Moderate drizzle",
+           "-" :  "Light drizzle",
+           "+" :  "Heavy drizzle",
+           "VC" : "Drizzle in the vicinity",
+           "MI" : "Shallow drizzle",
+           "BC" : "Patches of drizzle",
+           "PR" : "Partial drizzle",
+           "TS" : ("Thunderstorm", "storm"),
+           "BL" : "Windy drizzle",
+           "SH" : "Showers",
+           "DR" : "Drifting drizzle",
+           "FZ" : "Freezing drizzle",
+         }),
+    "RA" : ("Rain", "rain", {
+           "" :   "Moderate rain",
+           "-" :  "Light rain",
+           "+" :  "Heavy rain",
+           "VC" : "Rain in the vicinity",
+           "MI" : "Shallow rain",
+           "BC" : "Patches of rain",
+           "PR" : "Partial rainfall",
+           "TS" : ("Thunderstorm", "storm"),
+           "BL" : "Blowing rainfall",
+           "SH" : "Rain showers",
+           "DR" : "Drifting rain",
+           "FZ" : "Freezing rain",
+         }),
+    "SN" : ("Snow", "snow", {
+           "" :   "Moderate snow",
+           "-" :  "Light snow",
+           "+" :  "Heavy snow",
+           "VC" : "Snow in the vicinity",
+           "MI" : "Shallow snow",
+           "BC" : "Patches of snow",
+           "PR" : "Partial snowfall",
+           "TS" : ("Snowstorm", "storm"),
+           "BL" : "Blowing snowfall",
+           "SH" : "Snowfall showers",
+           "DR" : "Drifting snow",
+           "FZ" : "Freezing snow",
+         }),
+    "SG" : ("Snow grains", "snow", {
+           "" :   "Moderate snow grains",
+           "-" :  "Light snow grains",
+           "+" :  "Heavy snow grains",
+           "VC" : "Snow grains in the vicinity",
+           "MI" : "Shallow snow grains",
+           "BC" : "Patches of snow grains",
+           "PR" : "Partial snow grains",
+           "TS" : ("Snowstorm", "storm"),
+           "BL" : "Blowing snow grains",
+           "SH" : "Snow grain showers",
+           "DR" : "Drifting snow grains",
+           "FZ" : "Freezing snow grains",
+         }),
+    "IC" : ("Ice crystals", "snow", {
+           "" :   "Moderate ice crystals",
+           "-" :  "Few ice crystals",
+           "+" :  "Heavy ice crystals",
+           "VC" : "Ice crystals in the vicinity",
+           "BC" : "Patches of ice crystals",
+           "PR" : "Partial ice crystals",
+           "TS" : ("Ice crystal storm", "storm"),
+           "BL" : "Blowing ice crystals",
+           "SH" : "Showers of ice crystals",
+           "DR" : "Drifting ice crystals",
+           "FZ" : "Freezing ice crystals",
+         }),
+    "PE" : ("Ice pellets", "snow", {
+           "" :   "Moderate ice pellets",
+           "-" :  "Few ice pellets",
+           "+" :  "Heavy ice pellets",
+           "VC" : "Ice pellets in the vicinity",
+           "MI" : "Shallow ice pellets",
+           "BC" : "Patches of ice pellets",
+           "PR" : "Partial ice pellets",
+           "TS" : ("Ice pellets storm", "storm"),
+           "BL" : "Blowing ice pellets",
+           "SH" : "Showers of ice pellets",
+           "DR" : "Drifting ice pellets",
+           "FZ" : "Freezing ice pellets",
+         }),
+    "GR" : ("Hail", "rain", {
+           "" :   "Moderate hail",
+           "-" :  "Light hail",
+           "+" :  "Heavy hail",
+           "VC" : "Hail in the vicinity",
+           "MI" : "Shallow hail",
+           "BC" : "Patches of hail",
+           "PR" : "Partial hail",
+           "TS" : ("Hailstorm", "storm"),
+           "BL" : "Blowing hail",
+           "SH" : "Hail showers",
+           "DR" : "Drifting hail",
+           "FZ" : "Freezing hail",
+         }),
+    "GS" : ("Small hail", "rain", {
+           "" :   "Moderate small hail",
+           "-" :  "Light small hail",
+           "+" :  "Heavy small hail",
+           "VC" : "Small hail in the vicinity",
+           "MI" : "Shallow small hail",
+           "BC" : "Patches of small hail",
+           "PR" : "Partial small hail",
+           "TS" : ("Small hailstorm", "storm"),
+           "BL" : "Blowing small hail",
+           "SH" : "Showers of small hail",
+           "DR" : "Drifting small hail",
+           "FZ" : "Freezing small hail",
+         }),
+    "UP" : ("Precipitation", "rain", {
+           "" :   "Moderate precipitation",
+           "-" :  "Light precipitation",
+           "+" :  "Heavy precipitation",
+           "VC" : "Precipitation in the vicinity",
+           "MI" : "Shallow precipitation",
+           "BC" : "Patches of precipitation",
+           "PR" : "Partial precipitation",
+           "TS" : ("Unknown thunderstorm", "storm"),
+           "BL" : "Blowing precipitation",
+           "SH" : "Showers, type unknown",
+           "DR" : "Drifting precipitation",
+           "FZ" : "Freezing precipitation",
+         }),
+    "BR" : ("Mist", "fog", {
+           "" :   "Moderate mist",
+           "-" :  "Light mist",
+           "+" :  "Thick mist",
+           "VC" : "Mist in the vicinity",
+           "MI" : "Shallow mist",
+           "BC" : "Patches of mist",
+           "PR" : "Partial mist",
+           "BL" : "Mist with wind",
+           "DR" : "Drifting mist",
+           "FZ" : "Freezing mist",
+         }),
+    "FG" : ("Fog", "fog", {
+           "" :   "Moderate fog",
+           "-" :  "Light fog",
+           "+" :  "Thick fog",
+           "VC" : "Fog in the vicinity",
+           "MI" : "Shallow fog",
+           "BC" : "Patches of fog",
+           "PR" : "Partial fog",
+           "BL" : "Fog with wind",
+           "DR" : "Drifting fog",
+           "FZ" : "Freezing fog",
+         }),
+    "FU" : ("Smoke", "fog", {
+           "" :   "Moderate smoke",
+           "-" :  "Thin smoke",
+           "+" :  "Thick smoke",
+           "VC" : "Smoke in the vicinity",
+           "MI" : "Shallow smoke",
+           "BC" : "Patches of smoke",
+           "PR" : "Partial smoke",
+           "TS" : ("Smoke w/ thunders", "storm"),
+           "BL" : "Smoke with wind",
+           "DR" : "Drifting smoke",
+         }),
+    "VA" : ("Volcanic ash", "fog", {
+           "" :   "Moderate volcanic ash",
+           "+" :  "Thick volcanic ash",
+           "VC" : "Volcanic ash in the vicinity",
+           "MI" : "Shallow volcanic ash",
+           "BC" : "Patches of volcanic ash",
+           "PR" : "Partial volcanic ash",
+           "TS" : ("Volcanic ash w/ thunders", "storm"),
+           "BL" : "Blowing volcanic ash",
+           "SH" : "Showers of volcanic ash",
+           "DR" : "Drifting volcanic ash",
+           "FZ" : "Freezing volcanic ash",
+         }),
+    "SA" : ("Sand", "fog", {
+           "" :   "Moderate sand",
+           "-" :  "Light sand",
+           "+" :  "Heavy sand",
+           "VC" : "Sand in the vicinity",
+           "BC" : "Patches of sand",
+           "PR" : "Partial sand",
+           "BL" : "Blowing sand",
+           "DR" : "Drifting sand",
+         }),
+    "HZ" : ("Haze", "fog", {
+           "" :   "Moderate haze",
+           "-" :  "Light haze",
+           "+" :  "Thick haze",
+           "VC" : "Haze in the vicinity",
+           "MI" : "Shallow haze",
+           "BC" : "Patches of haze",
+           "PR" : "Partial haze",
+           "BL" : "Haze with wind",
+           "DR" : "Drifting haze",
+           "FZ" : "Freezing haze",
+         }),
+    "PY" : ("Sprays", "fog", {
+           "" :   "Moderate sprays",
+           "-" :  "Light sprays",
+           "+" :  "Heavy sprays",
+           "VC" : "Sprays in the vicinity",
+           "MI" : "Shallow sprays",
+           "BC" : "Patches of sprays",
+           "PR" : "Partial sprays",
+           "BL" : "Blowing sprays",
+           "DR" : "Drifting sprays",
+           "FZ" : "Freezing sprays",
+         }),
+    "DU" : ("Dust", "fog", {
+           "" :   "Moderate dust",
+           "-" :  "Light dust",
+           "+" :  "Heavy dust",
+           "VC" : "Dust in the vicinity",
+           "BC" : "Patches of dust",
+           "PR" : "Partial dust",
+           "BL" : "Blowing dust",
+           "DR" : "Drifting dust",
+         }),
+    "SQ" : ("Squall", "storm", {
+           "" :   "Moderate squall",
+           "-" :  "Light squall",
+           "+" :  "Heavy squall",
+           "VC" : "Squall in the vicinity",
+           "PR" : "Partial squall",
+           "TS" : "Thunderous squall",
+           "BL" : "Blowing squall",
+           "DR" : "Drifting squall",
+           "FZ" : "Freezing squall",
+         }),
+    "SS" : ("Sandstorm", "fog", {
+           "" :   "Moderate sandstorm",
+           "-" :  "Light sandstorm",
+           "+" :  "Heavy sandstorm",
+           "VC" : "Sandstorm in the vicinity",
+           "MI" : "Shallow sandstorm",
+           "PR" : "Partial sandstorm",
+           "TS" : ("Thunderous sandstorm", "storm"),
+           "BL" : "Blowing sandstorm",
+           "DR" : "Drifting sandstorm",
+           "FZ" : "Freezing sandstorm",
+         }),
+    "DS" : ("Duststorm", "fog", {
+           "" :   "Moderate duststorm",
+           "-" :  "Light duststorm",
+           "+" :  "Heavy duststorm",
+           "VC" : "Duststorm in the vicinity",
+           "MI" : "Shallow duststorm",
+           "PR" : "Partial duststorm",
+           "TS" : ("Thunderous duststorm", "storm"),
+           "BL" : "Blowing duststorm",
+           "DR" : "Drifting duststorm",
+           "FZ" : "Freezing duststorm",
+         }),
+    "PO" : ("Dustwhirls", "fog", {
+           "" :   "Moderate dustwhirls",
+           "-" :  "Light dustwhirls",
+           "+" :  "Heavy dustwhirls",
+           "VC" : "Dustwhirls in the vicinity",
+           "MI" : "Shallow dustwhirls",
+           "BC" : "Patches of dustwhirls",
+           "PR" : "Partial dustwhirls",
+           "BL" : "Blowing dustwhirls",
+           "DR" : "Drifting dustwhirls",
+         }),
+    "+FC" : ("Tornado", "storm", {
+           "" :   "Moderate tornado",
+           "+" :  "Raging tornado",
+           "VC" : "Tornado in the vicinity",
+           "PR" : "Partial tornado",
+           "TS" : "Thunderous tornado",
+           "BL" : "Tornado",
+           "DR" : "Drifting tornado",
+           "FZ" : "Freezing tornado",
+          }),
+    "FC" : ("Funnel cloud", "fog", {
+           "" :   "Moderate funnel cloud",
+           "-" :  "Light funnel cloud",
+           "+" :  "Thick funnel cloud",
+           "VC" : "Funnel cloud in the vicinity",
+           "MI" : "Shallow funnel cloud",
+           "BC" : "Patches of funnel cloud",
+           "PR" : "Partial funnel cloud",
+           "BL" : "Funnel cloud w/ wind",
+           "DR" : "Drifting funnel cloud",
+         }),
                     }
 
 class WeatherReport:
@@ -425,7 +425,7 @@
         self.latf=None
         self.longf=None
 
-    def __init__(self, MetarStationCode = None):
+    def __init__(self, MetarStationCode=None):
         """Clear all fields and fill in wanted station id."""
         self._ClearAllFields()
         self.givenstationid=MetarStationCode

Modified: branches/rel-1-7/freevo/src/util/tv_util.py
==============================================================================
--- branches/rel-1-7/freevo/src/util/tv_util.py (original)
+++ branches/rel-1-7/freevo/src/util/tv_util.py Thu Feb 21 15:39:36 2008
@@ -55,25 +55,26 @@
 
     The translation get rid of strange characters as e.g. german umlauts
     """
-    translation_table = \
-                            '                ' \
-                            + '                ' \
-                            + ' !"#$%&' + "'" + '()*+,-./' \
-                            + '0123456789:;<=>?' \
-                            + '@ABCDEFGHIJKLMNO' \
-                            + 'PQRSTUVWXYZ[\]^_' \
-                            + '`abcdefghijklmno' \
-                            + 'pqrstuvwxyz{|}~ ' \
-                            + '                ' \
-                            + '                ' \
-                            + '                ' \
-                            + '                ' \
-                            + 'AAAAAAACEEEEIIII' \
-                            + 'DNOOOOOxOUUUUYPS' \
-                            + 'aaaaaaaceeeeiiii' \
-                            + 'dnooooo/ouuuuypy'
+    translation_table \
+        = '                ' \
+        + '                ' \
+        + ' !"#$%&' + "'" + '()*+,-./' \
+        + '0123456789:;<=>?' \
+        + '@ABCDEFGHIJKLMNO' \
+        + 'PQRSTUVWXYZ[\]^_' \
+        + '`abcdefghijklmno' \
+        + 'pqrstuvwxyz{|}~ ' \
+        + '                ' \
+        + '                ' \
+        + '                ' \
+        + '                ' \
+        + 'AAAAAAACEEEEIIII' \
+        + 'DNOOOOOxOUUUUYPS' \
+        + 'aaaaaaaceeeeiiii' \
+        + 'dnooooo/ouuuuypy'
 
     favname = string.translate(progname,translation_table)
+    _debug_('progname2favname(progname=%r) favname=%r' % (progname, favname), 
2)
     return favname
 
 
@@ -99,9 +100,8 @@
 
     filemask = config.TV_RECORD_FILE_MASK % filename_array
     filemask = time.strftime(filemask, time.localtime(prog.start))
-    filename = os.path.join(config.TV_RECORD_DIR,
-                            progname2filename(filemask).rstrip(' -_:') +
-                            config.TV_RECORD_FILE_SUFFIX)
+    filename = os.path.join(config.TV_RECORD_DIR, 
progname2filename(filemask).rstrip(' -_:') + \
+        config.TV_RECORD_FILE_SUFFIX)
     return filename
 
 

Modified: branches/rel-1/freevo/src/util/amazon.py
==============================================================================
--- branches/rel-1/freevo/src/util/amazon.py    (original)
+++ branches/rel-1/freevo/src/util/amazon.py    Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# strptime.py - This is the Freevo module
+# This is the Freevo module for processing Amazon data
 # -----------------------------------------------------------------------
 # $Id$
 #

Modified: branches/rel-1/freevo/src/util/fxdimdb.py
==============================================================================
--- branches/rel-1/freevo/src/util/fxdimdb.py   (original)
+++ branches/rel-1/freevo/src/util/fxdimdb.py   Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# fxdimdb.py - class and helpers for fxd/imdb generation
+# class and helpers for fxd/imdb generation
 # -----------------------------------------------------------------------
 # $Id$
 #

Modified: branches/rel-1/freevo/src/util/mediainfo.py
==============================================================================
--- branches/rel-1/freevo/src/util/mediainfo.py (original)
+++ branches/rel-1/freevo/src/util/mediainfo.py Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# util/mediainfo.py - media info storage/parsing
+# media information for storage/parsing
 # -----------------------------------------------------------------------
 # $Id$
 #

Modified: branches/rel-1/freevo/src/util/misc.py
==============================================================================
--- branches/rel-1/freevo/src/util/misc.py      (original)
+++ branches/rel-1/freevo/src/util/misc.py      Thu Feb 21 15:39:36 2008
@@ -403,7 +403,6 @@
     result = u''
 
     cachefile = '%s/upsoon' % (config.FREEVO_CACHEDIR)
-
     if not scheduledRecordings:
         if os.path.exists(cachefile) and abs(time.time() - 
os.path.getmtime(cachefile)) < 600:
             cache = codecs.open(cachefile,'r', config.encoding)

Modified: branches/rel-1/freevo/src/util/pymetar.py
==============================================================================
--- branches/rel-1/freevo/src/util/pymetar.py   (original)
+++ branches/rel-1/freevo/src/util/pymetar.py   Thu Feb 21 15:39:36 2008
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# pymetar.py - This is the Freevo module
+# This is the Freevo module for weather data
 # -----------------------------------------------------------------------
 # $Id$
 #

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to