Commits

Ned Batchelder committed c80bccf

Last tweaks

  • Participants
  • Parent commits a8d67e5
  • Tags caveman-1.0b1

Comments (0)

Files changed (2)

 with two helpers: a `get_url` function that fetches data from URLs, and a
 `logger` object that gets logged messages::
 
-    import caveman
+    from caveman import ManifestChecker
 
     def get_url(url): ...
 
     logger = ...
 
-    man_checker = caveman.ManifestChecker(get_url=get_url, logger=logger)
+    man_checker = ManifestChecker(get_url=get_url, logger=logger)
 
 Then call its `check_manifest` method with the URL of the HTML page::
 
     man_checker.check_manifest(url)
 
 No value is returned: the output has been logged to the logger object.
+See the docstrings in the source code for details.
 
 
 Django unit tests
 As an example of programmatic use, here's one way to use Caveman in a Django
 test suite::
 
-    class TestManifest(DjangoTestCase):
+    from caveman import ManifestChecker
+
+    class TestManifest(django.test.TestCase):
         def setUp(self):
-            self.checker = caveman.ManifestChecker(get_url=self.get_url, logger=self)
+            self.checker = ManifestChecker(get_url=self.get_url, logger=self)
             self.caveman_log = []
 
         def get_url(self, url):
 More information
 ----------------
 
+Caveman can be downloaded from PyPI: http://pypi.python.org/pypi/caveman
+
 The HTML5 cache manifest spec is at http://www.w3.org/TR/html5/offline.html
 
 Docs at `http://nedbatchelder.com/code/caveman <http://nedbatchelder.com/code/caveman>`_.
     author_email = 'ned@nedbatchelder.com',
     description = long_description.splitlines()[0], 
     long_description = long_description,
-
-    classifiers = [
-        "Development Status :: 5 - Production/Stable",
-        "Environment :: Console",
-        "Intended Audience :: Developers",
-        "License :: OSI Approved :: MIT License",
-        "Operating System :: OS Independent",
-        "Programming Language :: Python",
-        "Topic :: Software Development :: Code Generators",
-        ],
-
+    classifiers = classifier_list,
     license = 'MIT',
 
     install_requires = [