Author: duncan
Date: Tue Dec 18 12:23:35 2007
New Revision: 10218

Log:
Corrections for epytext field formatting


Modified:
   branches/rel-1-7/freevo/src/plugins/oneclick.py
   branches/rel-1-7/freevo/src/plugins/weatherdata.py
   branches/rel-1/freevo/src/plugins/oneclick.py
   branches/rel-1/freevo/src/plugins/weatherdata.py

Modified: branches/rel-1-7/freevo/src/plugins/oneclick.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/oneclick.py     (original)
+++ branches/rel-1-7/freevo/src/plugins/oneclick.py     Tue Dec 18 12:23:35 2007
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# oneclick.py - a plugin to obtain detailed weather forecast information
+# A plugin to obtain detailed weather forecast information
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -138,7 +138,7 @@
     _debug_('wget(%s)' % (url), 2)
     txdata = None
     txheaders = {
-        'User-Agent' : 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7'
+        'User-Agent' : 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11'
     }
     print 'getting url %r...' % (url)
     req = urllib2.Request(url, txdata, txheaders)

Modified: branches/rel-1-7/freevo/src/plugins/weatherdata.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/weatherdata.py  (original)
+++ branches/rel-1-7/freevo/src/plugins/weatherdata.py  Tue Dec 18 12:23:35 2007
@@ -1,5 +1,31 @@
-#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------
+# weather.py - IdleBarplugin for weather
+# -----------------------------------------------------------------------
+# $Id$
 #
+# -----------------------------------------------------------------------
+# Freevo - A Home Theater PC framework
+# Copyright (C) 2003 Krister Lagerstrom, et al.
+# Please see the file freevo/Docs/CREDITS for a complete list of authors.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
+# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# -----------------------------------------------------------------------
+
+
 # using Firefox 1click weather
 # wget 'http://ff.1click.weather.com/weather/local/SZXX0033?dayf=5&unit=m'
 # wget 'http://ff.1click.weather.com/weather/local/SZXX0033?cc=*&unit=m'
@@ -15,7 +41,8 @@
 
 
 class WeatherData:
-    """Main weather data class
+    """
+    Main weather data class
     """
     def __init__(self, xml):
         self.xml = xml
@@ -40,16 +67,18 @@
 
 #391 lines
     class Loc:
-        """ Location information
-        <loc id="SZXX0033">
-          <dnam>Zurich, Switzerland</dnam>
-          <tm>7:46 AM</tm>
-          <lat>47.38</lat>
-          <lon>8.54</lon>
-          <sunr>6:57 AM</sunr>
-          <suns>7:47 PM</suns>
-          <zone>2</zone>
-        </loc>
+        """
+        Location information::
+
+            <loc id="SZXX0033">
+              <dnam>Zurich, Switzerland</dnam>
+              <tm>7:46 AM</tm>
+              <lat>47.38</lat>
+              <lon>8.54</lon>
+              <sunr>6:57 AM</sunr>
+              <suns>7:47 PM</suns>
+              <zone>2</zone>
+            </loc>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -77,16 +106,18 @@
             return 'Loc'
 
     class Head:
-        """ Header information
-        <head>
-          <locale>en_US</locale>
-          <form>MEDIUM</form>
-          <ut>C</ut>
-          <ud>km</ud>
-          <us>km/h</us>
-          <up>mb</up>
-          <ur>mm</ur>
-        </head>
+        """
+        Header information::
+
+            <head>
+              <locale>en_US</locale>
+              <form>MEDIUM</form>
+              <ut>C</ut>
+              <ud>km</ud>
+              <us>km/h</us>
+              <up>mb</up>
+              <ur>mm</ur>
+            </head>
         """
 
         def __init__(self, tree):
@@ -114,15 +145,17 @@
 
 
     class Eloc:
-        """ Extended location
-        <eloc id="SZXX0033">
-          <dma>N/A</dma>
-          <rgn4>N/A</rgn4>
-          <rgn9>N/A</rgn9>
-          <st>*</st>
-          <ctry>SZ</ctry>
-          <zip>N/A</zip>
-        </eloc>
+        """
+        Extended location::
+
+            <eloc id="SZXX0033">
+              <dma>N/A</dma>
+              <rgn4>N/A</rgn4>
+              <rgn9>N/A</rgn9>
+              <st>*</st>
+              <ctry>SZ</ctry>
+              <zip>N/A</zip>
+            </eloc>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -148,26 +181,28 @@
             return 'Eloc'
 
     class Cc:
-        """ Current conditions
-        <cc>
-          <lsup>9/11/07 7:20 AM Local Time</lsup>
-          <obst>Zurich, Switzerland</obst>
-          <tmp>9</tmp>
-          <flik>9</flik>
-          <t>Partly Cloudy</t>
-          <icon>30</icon>
-          <bar>
-          </bar>
-          <wind>
-          </wind>
-          <hmid>93</hmid>
-          <vis>10.0</vis>
-          <uv>
-          </uv>
-          <dewp>8</dewp>
-          <moon>
-          </moon>
-        </cc>
+        """
+        Current conditions::
+
+            <cc>
+              <lsup>9/11/07 7:20 AM Local Time</lsup>
+              <obst>Zurich, Switzerland</obst>
+              <tmp>9</tmp>
+              <flik>9</flik>
+              <t>Partly Cloudy</t>
+              <icon>30</icon>
+              <bar>
+              </bar>
+              <wind>
+              </wind>
+              <hmid>93</hmid>
+              <vis>10.0</vis>
+              <uv>
+              </uv>
+              <dewp>8</dewp>
+              <moon>
+              </moon>
+            </cc>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -207,10 +242,12 @@
 
     class Bar:
         """
-        <bar>
-          <r>1020.0</r>
-          <d>rising</d>
-        </bar>
+        Barometer::
+
+            <bar>
+              <r>1020.0</r>
+              <d>rising</d>
+            </bar>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -228,10 +265,12 @@
 
     class Uv:
         """
-        <uv>
-          <i>0</i>
-          <t>Low</t>
-        </uv>
+        Ultra-violet::
+
+            <uv>
+              <i>0</i>
+              <t>Low</t>
+            </uv>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -249,10 +288,12 @@
 
     class Moon:
         """
-        <moon>
-          <icon>29</icon>
-          <t>New</t>
-        </moon>
+        Moon phase::
+
+            <moon>
+              <icon>29</icon>
+              <t>New</t>
+            </moon>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -269,12 +310,14 @@
 
 
     class DayF:
-        """ Day forecast
-        <dayf>
-          <lsup>9/11/07 2:27 AM Local Time</lsup>
-          <day d="0" t="Tuesday" dt="Sep 11">
-          </day>
-        </dayf>
+        """
+        Day forecast::
+
+            <dayf>
+              <lsup>9/11/07 2:27 AM Local Time</lsup>
+              <day d="0" t="Tuesday" dt="Sep 11">
+              </day>
+            </dayf>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -290,15 +333,17 @@
             return 'DayF'
 
     class Day:
-        """ Day information
-        <day d="4" t="Saturday" dt="Sep 15">
-          <hi>19</hi>
-          <low>12</low>
-          <sunr>7:03 AM</sunr>
-          <suns>7:39 PM</suns>
-          <part p="d">
-          </part>
-        </day>
+        """
+        Day information::
+
+            <day d="4" t="Saturday" dt="Sep 15">
+              <hi>19</hi>
+              <low>12</low>
+              <sunr>7:03 AM</sunr>
+              <suns>7:39 PM</suns>
+              <part p="d">
+              </part>
+            </day>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -326,16 +371,18 @@
             return 'Day'
 
     class Part:
-        """ Part of a day information
-        <part p="n">
-          <icon>29</icon>
-          <t>Partly Cloudy</t>
-          <wind>
-          </wind>
-          <bt>P Cloudy</bt>
-          <ppcp>10</ppcp>
-          <hmid>82</hmid>
-        </part>
+        """
+        Part of a day information::
+
+            <part p="n">
+              <icon>29</icon>
+              <t>Partly Cloudy</t>
+              <wind>
+              </wind>
+              <bt>P Cloudy</bt>
+              <ppcp>10</ppcp>
+              <hmid>82</hmid>
+            </part>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -360,13 +407,15 @@
             return 'Part'
 
     class Wind:
-        """ Wind information
-        <wind>
-          <s>6</s>
-          <gust>N/A</gust>
-          <d>109</d>
-          <t>ESE</t>
-        </wind>
+        """
+        Wind information::
+
+            <wind>
+              <s>6</s>
+              <gust>N/A</gust>
+              <d>109</d>
+              <t>ESE</t>
+            </wind>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -387,7 +436,8 @@
 
 
 def parse(obj):
-    """ Parse an object using the tree information and build a class hierarchy.
+    """
+    Parse an object using the tree information and build a class hierarchy.
     For list items add to a list of the name with a 's' appended
 
     This code is a little bit complex :)

Modified: branches/rel-1/freevo/src/plugins/oneclick.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/oneclick.py       (original)
+++ branches/rel-1/freevo/src/plugins/oneclick.py       Tue Dec 18 12:23:35 2007
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# oneclick.py - a plugin to obtain detailed weather forecast information
+# A plugin to obtain detailed weather forecast information
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -138,7 +138,7 @@
     _debug_('wget(%s)' % (url), 2)
     txdata = None
     txheaders = {
-        'User-Agent' : 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7'
+        'User-Agent' : 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11'
     }
     print 'getting url %r...' % (url)
     req = urllib2.Request(url, txdata, txheaders)

Modified: branches/rel-1/freevo/src/plugins/weatherdata.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/weatherdata.py    (original)
+++ branches/rel-1/freevo/src/plugins/weatherdata.py    Tue Dec 18 12:23:35 2007
@@ -1,5 +1,31 @@
-#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------
+# weather.py - IdleBarplugin for weather
+# -----------------------------------------------------------------------
+# $Id$
 #
+# -----------------------------------------------------------------------
+# Freevo - A Home Theater PC framework
+# Copyright (C) 2003 Krister Lagerstrom, et al.
+# Please see the file freevo/Docs/CREDITS for a complete list of authors.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
+# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# -----------------------------------------------------------------------
+
+
 # using Firefox 1click weather
 # wget 'http://ff.1click.weather.com/weather/local/SZXX0033?dayf=5&unit=m'
 # wget 'http://ff.1click.weather.com/weather/local/SZXX0033?cc=*&unit=m'
@@ -15,7 +41,8 @@
 
 
 class WeatherData:
-    """Main weather data class
+    """
+    Main weather data class
     """
     def __init__(self, xml):
         self.xml = xml
@@ -40,16 +67,18 @@
 
 #391 lines
     class Loc:
-        """ Location information
-        <loc id="SZXX0033">
-          <dnam>Zurich, Switzerland</dnam>
-          <tm>7:46 AM</tm>
-          <lat>47.38</lat>
-          <lon>8.54</lon>
-          <sunr>6:57 AM</sunr>
-          <suns>7:47 PM</suns>
-          <zone>2</zone>
-        </loc>
+        """
+        Location information::
+
+            <loc id="SZXX0033">
+              <dnam>Zurich, Switzerland</dnam>
+              <tm>7:46 AM</tm>
+              <lat>47.38</lat>
+              <lon>8.54</lon>
+              <sunr>6:57 AM</sunr>
+              <suns>7:47 PM</suns>
+              <zone>2</zone>
+            </loc>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -77,16 +106,18 @@
             return 'Loc'
 
     class Head:
-        """ Header information
-        <head>
-          <locale>en_US</locale>
-          <form>MEDIUM</form>
-          <ut>C</ut>
-          <ud>km</ud>
-          <us>km/h</us>
-          <up>mb</up>
-          <ur>mm</ur>
-        </head>
+        """
+        Header information::
+
+            <head>
+              <locale>en_US</locale>
+              <form>MEDIUM</form>
+              <ut>C</ut>
+              <ud>km</ud>
+              <us>km/h</us>
+              <up>mb</up>
+              <ur>mm</ur>
+            </head>
         """
 
         def __init__(self, tree):
@@ -114,15 +145,17 @@
 
 
     class Eloc:
-        """ Extended location
-        <eloc id="SZXX0033">
-          <dma>N/A</dma>
-          <rgn4>N/A</rgn4>
-          <rgn9>N/A</rgn9>
-          <st>*</st>
-          <ctry>SZ</ctry>
-          <zip>N/A</zip>
-        </eloc>
+        """
+        Extended location::
+
+            <eloc id="SZXX0033">
+              <dma>N/A</dma>
+              <rgn4>N/A</rgn4>
+              <rgn9>N/A</rgn9>
+              <st>*</st>
+              <ctry>SZ</ctry>
+              <zip>N/A</zip>
+            </eloc>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -148,26 +181,28 @@
             return 'Eloc'
 
     class Cc:
-        """ Current conditions
-        <cc>
-          <lsup>9/11/07 7:20 AM Local Time</lsup>
-          <obst>Zurich, Switzerland</obst>
-          <tmp>9</tmp>
-          <flik>9</flik>
-          <t>Partly Cloudy</t>
-          <icon>30</icon>
-          <bar>
-          </bar>
-          <wind>
-          </wind>
-          <hmid>93</hmid>
-          <vis>10.0</vis>
-          <uv>
-          </uv>
-          <dewp>8</dewp>
-          <moon>
-          </moon>
-        </cc>
+        """
+        Current conditions::
+
+            <cc>
+              <lsup>9/11/07 7:20 AM Local Time</lsup>
+              <obst>Zurich, Switzerland</obst>
+              <tmp>9</tmp>
+              <flik>9</flik>
+              <t>Partly Cloudy</t>
+              <icon>30</icon>
+              <bar>
+              </bar>
+              <wind>
+              </wind>
+              <hmid>93</hmid>
+              <vis>10.0</vis>
+              <uv>
+              </uv>
+              <dewp>8</dewp>
+              <moon>
+              </moon>
+            </cc>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -207,10 +242,12 @@
 
     class Bar:
         """
-        <bar>
-          <r>1020.0</r>
-          <d>rising</d>
-        </bar>
+        Barometer::
+
+            <bar>
+              <r>1020.0</r>
+              <d>rising</d>
+            </bar>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -228,10 +265,12 @@
 
     class Uv:
         """
-        <uv>
-          <i>0</i>
-          <t>Low</t>
-        </uv>
+        Ultra-violet::
+
+            <uv>
+              <i>0</i>
+              <t>Low</t>
+            </uv>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -249,10 +288,12 @@
 
     class Moon:
         """
-        <moon>
-          <icon>29</icon>
-          <t>New</t>
-        </moon>
+        Moon phase::
+
+            <moon>
+              <icon>29</icon>
+              <t>New</t>
+            </moon>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -269,12 +310,14 @@
 
 
     class DayF:
-        """ Day forecast
-        <dayf>
-          <lsup>9/11/07 2:27 AM Local Time</lsup>
-          <day d="0" t="Tuesday" dt="Sep 11">
-          </day>
-        </dayf>
+        """
+        Day forecast::
+
+            <dayf>
+              <lsup>9/11/07 2:27 AM Local Time</lsup>
+              <day d="0" t="Tuesday" dt="Sep 11">
+              </day>
+            </dayf>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -290,15 +333,17 @@
             return 'DayF'
 
     class Day:
-        """ Day information
-        <day d="4" t="Saturday" dt="Sep 15">
-          <hi>19</hi>
-          <low>12</low>
-          <sunr>7:03 AM</sunr>
-          <suns>7:39 PM</suns>
-          <part p="d">
-          </part>
-        </day>
+        """
+        Day information::
+
+            <day d="4" t="Saturday" dt="Sep 15">
+              <hi>19</hi>
+              <low>12</low>
+              <sunr>7:03 AM</sunr>
+              <suns>7:39 PM</suns>
+              <part p="d">
+              </part>
+            </day>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -326,16 +371,18 @@
             return 'Day'
 
     class Part:
-        """ Part of a day information
-        <part p="n">
-          <icon>29</icon>
-          <t>Partly Cloudy</t>
-          <wind>
-          </wind>
-          <bt>P Cloudy</bt>
-          <ppcp>10</ppcp>
-          <hmid>82</hmid>
-        </part>
+        """
+        Part of a day information::
+
+            <part p="n">
+              <icon>29</icon>
+              <t>Partly Cloudy</t>
+              <wind>
+              </wind>
+              <bt>P Cloudy</bt>
+              <ppcp>10</ppcp>
+              <hmid>82</hmid>
+            </part>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -360,13 +407,15 @@
             return 'Part'
 
     class Wind:
-        """ Wind information
-        <wind>
-          <s>6</s>
-          <gust>N/A</gust>
-          <d>109</d>
-          <t>ESE</t>
-        </wind>
+        """
+        Wind information::
+
+            <wind>
+              <s>6</s>
+              <gust>N/A</gust>
+              <d>109</d>
+              <t>ESE</t>
+            </wind>
         """
         def __init__(self, tree):
             self.tree = tree
@@ -387,7 +436,8 @@
 
 
 def parse(obj):
-    """ Parse an object using the tree information and build a class hierarchy.
+    """
+    Parse an object using the tree information and build a class hierarchy.
     For list items add to a list of the name with a 's' appended
 
     This code is a little bit complex :)

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to