Commits

Doug Hellmann committed 5416c17 Merge

merge brandon's recent changes with mine

  • Participants
  • Parent commits 7449303, aaf4c54

Comments (0)

Files changed (4)

 
-``cursive.pymag``: Author tools for Python Magazine
-===================================================
+Author tools for Python Magazine
+================================
 
 Python Magazine uses a special markup language, called Ceres, for
 formatting articles that are submitted by authors and then worked on by
 converts an article to Ceres, and while doing so reports any problems
 with the article that might interfere with the magazine's layout.
 
+To use the command, just type something like this::
+
+    $ cursive pymag my_article.rst
+
 This package builds on the features of `cursive.tools`_.
 
 .. _reStructured Text: http://docutils.sourceforge.net/rst.html
 """Command-line routines for Restructured Text authors.
 
 """
-__version__ = '0.2'
+__version__ = '0.3'
 __testrunner__ = 'nose'
 __requires__ = [ 'cursive.tools', 'docutils' ]
 __author__ = 'Brandon Craig Rhodes <brandon@rhodesmill.org>'
     # more specific error message.
 
     def default_visit(self, node):
-        print 'line %s: No support for node type "%s"' % (
-            node.line, node.tagname)
+        line = node.line
+        if line is None:
+            children = node.parent.children
+            i = children.index(node)
+            while i and (line is None):
+                i -= 1
+                line = children[i].line
+                #import pdb;pdb.set_trace()
+        print 'line %s: No support for node type "%s"' % (line, node.tagname)
         sys.exit(1)
 
     def default_departure(self, node):
+[package]
+name = cursive.pymag
+author = Brandon Craig Rhodes <brandon@rhodesmill.org>
+url = http://bitbucket.org/brandon/cursivepymag/
+requires = cursive.tools
+classifiers =
+    Development Status :: 5 - Production/Stable
+    License :: OSI Approved :: MIT License
+    Topic :: Text Processing
+    Topic :: Text Processing :: Markup