changeset 4:fd9d81f66ff7

final changes for 0.2.0 release
author Vlad Glagolev <enqlave@gmail.com>
date Sun, 09 Aug 2009 15:22:29 +0400
parents a754b01955c7
children b4bbbfc600d5
files ChangeLog bin/pycweather pycweather/dmanager.py
diffstat 3 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jul 27 00:02:10 2009 +0400
+++ b/ChangeLog	Sun Aug 09 15:22:29 2009 +0400
@@ -1,4 +1,4 @@
-2009-07-26 Vlad Glagolev <enqlave@gmail.com>
+2009-08-09 Vlad Glagolev <enqlave@gmail.com>
 	* version 0.2.0
 	* fixed max-day limit to 5 as supported by weather.com
 	* added missing parameters in request (needed since 2009-07-07)
--- a/bin/pycweather	Mon Jul 27 00:02:10 2009 +0400
+++ b/bin/pycweather	Sun Aug 09 15:22:29 2009 +0400
@@ -3,7 +3,8 @@
 #
 # This file is part of PycWeather
 #
-# Copyright (c) 2008 Vlad Glagolev <enqlave@gmail.com>. All rights reserved.
+# Copyright (c) 2008-2009 Vlad Glagolev <enqlave@gmail.com>
+# All rights reserved.
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -19,8 +20,13 @@
 
 """ pycweather: PycWeather primary script """
 
+import os
+
 from pycweather import dmanager
 
 
+template = os.path.join(os.path.dirname(__file__),
+                        "../share/pycweather/template.xsl")
+
 if __name__ == "__main__":
-    dmanager.main()
+    dmanager.main(template)
--- a/pycweather/dmanager.py	Mon Jul 27 00:02:10 2009 +0400
+++ b/pycweather/dmanager.py	Sun Aug 09 15:22:29 2009 +0400
@@ -33,9 +33,6 @@
 _DAYS = 1
 _UNIT = "m"
 
-# TODO: default XSL template
-_TEMPLATE = os.path.join(os.path.dirname(__file__), "template.xsl")
-
 
 def usage():
     print """Usage: %s [options]\n
@@ -57,7 +54,7 @@
     exit(0)
 
 
-def main():
+def main(template):
     try:
         opts, args = getopt.getopt(sys.argv[1:], "hva:c:d:u:s:x:", ["help", \
                                    "version", "auth=", "code=", "days=", \
@@ -107,11 +104,12 @@
     try:
         xsl
     except NameError:
-        xsl = _TEMPLATE
+        xsl = template
 
     forecast.load(xsl)
 
     if forecast.id and forecast.key:
         forecast.preview(code, days, unit)
     else:
-        print "Look at http://registration.weather.com/ursa/xmloap/step1"
+        print "Get partner ID and license key at: " + \
+              "http://registration.weather.com/ursa/xmloap/step1"