Author: duncan
Date: Tue Oct 23 07:13:18 2007
New Revision: 10040

Log:
Tidied up doc strings, copied from rel-1


Modified:
   branches/rel-1-7/freevo/src/animation/base.py
   branches/rel-1-7/freevo/src/audio/plugins/album_tree.py
   branches/rel-1-7/freevo/src/plugin.py
   branches/rel-1-7/freevo/src/plugins/buttonbar.py
   branches/rel-1-7/freevo/src/tv/xmltv.py

Modified: branches/rel-1-7/freevo/src/animation/base.py
==============================================================================
--- branches/rel-1-7/freevo/src/animation/base.py       (original)
+++ branches/rel-1-7/freevo/src/animation/base.py       Tue Oct 23 07:13:18 2007
@@ -160,8 +160,9 @@
         """
         Checks if the screen background has been damaged
 
-        @notes If the rect passed damages our rect, but no actual blit is done
-        on osd.screen, we'll end up with a copy of our animation in our bg. 
This is BAD.
+        @note If the rect passed damages our rect, but no actual blit is done
+        on osd.screen, we'll end up with a copy of our animation in our bg.
+        This is BAD.
         """
 
         if not (self.bg_redraw or self.bg_update) or rectstyles == None:

Modified: branches/rel-1-7/freevo/src/audio/plugins/album_tree.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/album_tree.py     (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/album_tree.py     Tue Oct 23 
07:13:18 2007
@@ -105,7 +105,7 @@
     Plugin to browse songs in a tree-like way.
 
     Requires:
-    * pysqlite.
+        * pysqlite.
 
     === Pre Installation ===
 
@@ -115,12 +115,12 @@
     you can skip the rest of the pre-install if those plugins
     are already succesfully installed.
 
-    * install pysqlite,sqlite
-    * edit your local_config.py : Configure AUDIO_ITEMS
-    ('''AudioConfig''' ,don't leave it at the default!)
-    * run freevo cache
-    * wait.....
-    * The meta database should be available now.
+        * install pysqlite,sqlite
+        * edit your local_config.py
+        * Configure AUDIO_ITEMS ('''AudioConfig''', don't leave it at the 
default!)
+        * run freevo cache
+        * wait.....
+        * The meta database should be available now.
 
     === Configuration ===
 
@@ -131,40 +131,40 @@
     |
     | #You could add all trees below:, but probably you only want 1 or 2 of 
them:
     | AUDIO_ALBUM_TREE_SPEC.append({'name':'Artist/Album/Track'
-    |   ,'spec':["artist","album","track||'-'||title"]
-    |   ,'alt_grouping':[None,None,'track']
+    |,'spec':["artist","album","track||'-'||title"]
+    |,'alt_grouping':[None,None,'track']
     | })
     |
     | #A case sensitive tree like above...
     | #Is easy to convert to a convert to a case insensitive tree like below:
     | AUDIO_ALBUM_TREE_SPEC.append({'name':'nocase:artist/album/Track'
-    |   ,'spec':["lower(artist)","lower(album)","track||'-'||title"]
-    |   ,'alt_grouping':[None,None,'track']
+    |,'spec':["lower(artist)","lower(album)","track||'-'||title"]
+    |,'alt_grouping':[None,None,'track']
     | })
     |
     | #my favorite layout:
     | AUDIO_ALBUM_TREE_SPEC.append({'name':'(A-Z)/Artist/Album-Year/Track'
-    |   ,'spec':["upper(substr(artist,0,1))"
-    |   ,"artist","album||'-'||year"
-    |   ,"track||'-'||title"]
-    |   ,'alt_grouping':[None,None,'year||album','track']
+    |,'spec':["upper(substr(artist,0,1))"
+    |,"artist","album||'-'||year"
+    |,"track||'-'||title"]
+    |,'alt_grouping':[None,None,'year||album','track']
     | })
     |
     | #you can comment out a tree definition like this:
     | #AUDIO_ALBUM_TREE_SPEC.append({'name':'Artist-Album/Track'
-    | #  ,'spec':["artist||'-'||album","track||'-'||title"]
-    | #  ,'alt_grouping':[None,'track']
+    | #,'spec':["artist||'-'||album","track||'-'||title"]
+    | #,'alt_grouping':[None,'track']
     | #})
     |
     | #More Examples:
     | AUDIO_ALBUM_TREE_SPEC.append({'name':'Year/Artist-Album/Track'
-    |   ,'spec':["year","artist||'-'||album","track||'-'||title"]
-    |   ,'alt_grouping':[None,None,None,'track']
+    |,'spec':["year","artist||'-'||album","track||'-'||title"]
+    |,'alt_grouping':[None,None,None,'track']
     | })
     |
     | AUDIO_ALBUM_TREE_SPEC.append({'name':'Dirtitle/Artist/Album/Track'
-    |   ,'spec':["dirtitle","artist","album","track||'-'||title"]
-    |   ,'alt_grouping':[None,None,None,'track']
+    |,'spec':["dirtitle","artist","album","track||'-'||title"]
+    |,'alt_grouping':[None,None,None,'track']
     | })
 
     === Post Installation ===
@@ -215,28 +215,28 @@
         curs = db.cursor
         self.album_tree_list = [
         treeSpec('Artist/Album/Track',curs
-                ,["artist","album","track||'-'||title"],[None,None,'track'])
+,["artist","album","track||'-'||title"],[None,None,'track'])
 
-        ,treeSpec('(A-Z)/Artist/Year-Album/Track',curs
-        ,["upper(substr(artist,0,1))",
+,treeSpec('(A-Z)/Artist/Year-Album/Track',curs
+,["upper(substr(artist,0,1))",
         "artist","album||'-'||year"
-        ,"track||'-'||title"],[None,None,'year||album','track'])
+,"track||'-'||title"],[None,None,'year||album','track'])
 
 
-        ,treeSpec('Artist-Album/Track',curs
-                ,["artist||'-'||album","track||'-'||title"],[None,'track'])
+,treeSpec('Artist-Album/Track',curs
+,["artist||'-'||album","track||'-'||title"],[None,'track'])
 
-        ,treeSpec('a-z/artist/title-album-track',curs
-                ,["lower(substr(artist,0,1))"
-                ,"lower(artist)","title||'-'||album||'-'||track"])
+,treeSpec('a-z/artist/title-album-track',curs
+,["lower(substr(artist,0,1))"
+,"lower(artist)","title||'-'||album||'-'||track"])
 
-        ,treeSpec('Year/Artist-Album/Track',curs,
+,treeSpec('Year/Artist-Album/Track',curs,
                 ["year","artist||'-'||album","track||'-'||title"]
-                ,[None,None,None,'track'])
+,[None,None,None,'track'])
         #demo:
-        ,treeSpec('Dirtitle/Artist/Album/Track',curs
-            ,["dirtitle","artist","album","track||'-'||title"]
-            ,[None,None,None,'track'])
+,treeSpec('Dirtitle/Artist/Album/Track',curs
+,["dirtitle","artist","album","track||'-'||title"]
+,[None,None,None,'track'])
 
         ]
 
@@ -245,10 +245,10 @@
         #NOT YET POSSIBLE, "album_artist" tag is not in sql database.
         #Surprisingly:sqlite can handle it pretty fast.
         #treeSpec('a-z/album_artist/album/track-(artist)-title',curs
-        #        ,["lower(substr(ifnull(album_artist,artist),0,1))",
+        #,["lower(substr(ifnull(album_artist,artist),0,1))",
         #           "ifnull(album_artist,artist)"
-        #           
,"album","track||'-'||nullif(artist,ifnull(album_artist,artist))||'-'||title"]
-        #           ,[None,None,None,None,'track'])
+        
#,"album","track||'-'||nullif(artist,ifnull(album_artist,artist))||'-'||title"]
+        #,[None,None,None,None,'track'])
 
 
     def items(self, parent):
@@ -266,7 +266,7 @@
         items = []
         for tree in self.album_tree_list:
             items.append(menu.MenuItem(tree.name
-                ,action=self.onchoose_node,arg=[tree,[]]) )
+,action=self.onchoose_node,arg=[tree,[]]) )
 
         #myobjectmenu = menu.Menu(_('Album Tree'), items, 
reload_func=menuw.back_one_menu )
         myobjectmenu = menu.Menu(_('Album Tree'), items)
@@ -287,8 +287,8 @@
         if len(tree.spec) -1 <> len(data): #non-tracks
             for tree_item,count in tree.execute(data):
                 mylistofitems.append(
-                    menu.MenuItem("%s(%i)" % (tree_item ,count)
-                    ,action=self.onchoose_node,arg=[tree,data + [tree_item]]))
+                    menu.MenuItem("%s(%i)" % (tree_item,count)
+,action=self.onchoose_node,arg=[tree,data + [tree_item]]))
         else: #tracks
             self.onchoose_last_node(tree,data,menuw)
             return
@@ -313,8 +313,8 @@
         #need a progress-bar.
         pl = playlist.Playlist(
                 name='-'.join(data)
-                ,playlist=[]
-                ,display_type='audiocd')
+,playlist=[]
+,display_type='audiocd')
 
         tracks = tree.execute(data)  #returns list of (desc,path,filename)
 

Modified: branches/rel-1-7/freevo/src/plugin.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugin.py       (original)
+++ branches/rel-1-7/freevo/src/plugin.py       Tue Oct 23 07:13:18 2007
@@ -416,8 +416,8 @@
 
 def register_callback(name, *args):
     """
-    register a callback to the callback handler 'name'. The format of
-    *args depends on the callback
+    register a callback to the callback handler 'name'.
+    The format of args depends on the callback
     """
     global __callbacks__
     if not __callbacks__.has_key(name):

Modified: branches/rel-1-7/freevo/src/plugins/buttonbar.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/buttonbar.py    (original)
+++ branches/rel-1-7/freevo/src/plugins/buttonbar.py    Tue Oct 23 07:13:18 2007
@@ -75,13 +75,13 @@
     | plugin.activate('buttonbar')
 
     Where the actions mapped to each of the colors can be one of the following:
-    * info - Brings up a screen displaying more information than can be 
displayed
-      in the few lines available on the TV guide page.
-    * record - Same as the record button.
-    * adv:<number> - Special action to allow navigation of the TV Guide,
-      <number> can be either positive or negative and is the number of hours
-      to go forward/back.
-    * now - jumps back to the currently running program
+        * info - Brings up a screen displaying more information than can be 
displayed
+          in the few lines available on the TV guide page.
+        * record - Same as the record button.
+        * adv:<number> - Special action to allow navigation of the TV Guide,
+          <number> can be either positive or negative and is the number of 
hours
+          to go forward/back.
+        * now - jumps back to the currently running program
 
     You can also map the following actions to unused keys of your keyboard
     (For example):

Modified: branches/rel-1-7/freevo/src/tv/xmltv.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/xmltv.py     (original)
+++ branches/rel-1-7/freevo/src/tv/xmltv.py     Tue Oct 23 07:13:18 2007
@@ -295,35 +295,30 @@
     """
     A class for generating XMLTV data
 
-    **All strings passed to this class must be Unicode, except for dictionary
-    keys**
+    @note All strings passed to this class must be Unicode, except for 
dictionary keys
     """
     def __init__(self, encoding="utf-8", date=None,
                  source_info_url=None, source_info_name=None,
                  generator_info_url=None, generator_info_name=None):
         """
-        Arguments:
-
-          'encoding' -- The text encoding that will be used.
-                        *Defaults to 'utf-8'*
+        @param encoding -- The text encoding that will be used. Defaults to 
'utf-8'
 
-          'date' -- The date this data was generated. *Optional*
+        @param date The date this data was generated. Optional
 
-          'source_info_url' -- A URL for information about the source of the
-                               data. *Optional*
+        @param source_info_url A URL for information about the source of the 
data.
+            Optional
 
-          'source_info_name' -- A human readable description of
-                                'source_info_url'. *Optional*
+        @param source_info_name A human readable description of 
source_info_url.
+            Optional
 
-          'generator_info_url' -- A URL for information about the program
-                                  that is generating the XMLTV document.
-                                  *Optional*
-
-          'generator_info_name' -- A human readable description of
-                                   'generator_info_url'. *Optional*
+        @param generator_info_url A URL for information about the program that
+            is generating the XMLTV document. Optional
 
+        @param generator_info_name A human readable description of
+            generator_info_url. Optional
         """
-        if DEBUG >= 0: print "in Writer:__init__"
+
+        _debug_('in Writer:__init__()', 2)
         self.encoding = encoding
         self.data = {'date': date,
                      'source_info_url': source_info_url,

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to