Thread: [Compactpath-commit] SF.net SVN: compactpath: [12] trunk/src/compactpath/scripts/gen_docs.py
Status: Beta
Brought to you by:
jurner
|
From: <ju...@us...> - 2008-06-18 07:49:04
|
Revision: 12
http://compactpath.svn.sourceforge.net/compactpath/?rev=12&view=rev
Author: jurner
Date: 2008-06-18 00:48:57 -0700 (Wed, 18 Jun 2008)
Log Message:
-----------
removed with statement for compat
Modified Paths:
--------------
trunk/src/compactpath/scripts/gen_docs.py
Modified: trunk/src/compactpath/scripts/gen_docs.py
===================================================================
--- trunk/src/compactpath/scripts/gen_docs.py 2008-06-18 07:47:56 UTC (rev 11)
+++ trunk/src/compactpath/scripts/gen_docs.py 2008-06-18 07:48:57 UTC (rev 12)
@@ -6,11 +6,8 @@
@note: Use gen_docs.py -? or --help to print out this help text
@requires: epydoc
-@requires: python >= 2.4
"""
-from __future__ import with_statement
-
import sys, os
from epydoc import cli
import subprocess
@@ -54,13 +51,16 @@
# create a redirect to 'epydoc/index.html'
print 'creating redirect'
- with open(os.path.join(DOC_DIR, 'index.html'), 'w') as fp:
+ fp = open(os.path.join(DOC_DIR, 'index.html'), 'w')
+ try:
fp.write('''<html>
<head>
<meta http-equiv="Refresh" content="0; URL=%s">
</head>
</html>
''' % (EPYDOC_FOLDER + '/' + 'index.html') )
+ finally:
+ fp.close()
print 'done'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ju...@us...> - 2008-06-19 07:40:57
|
Revision: 20
http://compactpath.svn.sourceforge.net/compactpath/?rev=20&view=rev
Author: jurner
Date: 2008-06-19 00:40:55 -0700 (Thu, 19 Jun 2008)
Log Message:
-----------
docs
Modified Paths:
--------------
trunk/src/compactpath/scripts/gen_docs.py
Modified: trunk/src/compactpath/scripts/gen_docs.py
===================================================================
--- trunk/src/compactpath/scripts/gen_docs.py 2008-06-19 07:40:24 UTC (rev 19)
+++ trunk/src/compactpath/scripts/gen_docs.py 2008-06-19 07:40:55 UTC (rev 20)
@@ -1,8 +1,8 @@
-"""Generates epydoc documentation for the package in --> packageDir/docs
+"""Generates epydoc documentation for the package in --> packageDir/doc
gen_docs.py
-@note: the script assumes it is located in the scripts subdirectory of the package
+@note: the script assumes it is located in the <doc> or any other emidiate subdirectory of the package
@note: Use gen_docs.py -? or --help to print out this help text
@requires: epydoc
@@ -67,7 +67,7 @@
#**************************************************************************************
#
#**************************************************************************************
-if __name__ == '__main__':
+if __name__ == '__main__2':
wantsHelp = len(sys.argv) > 1 and sys.argv[1] or None
if wantsHelp not in ('-?', '--help'):
sys.exit(main())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ju...@us...> - 2008-06-19 07:44:12
|
Revision: 21
http://compactpath.svn.sourceforge.net/compactpath/?rev=21&view=rev
Author: jurner
Date: 2008-06-19 00:43:59 -0700 (Thu, 19 Jun 2008)
Log Message:
-----------
this and that
Modified Paths:
--------------
trunk/src/compactpath/scripts/gen_docs.py
Modified: trunk/src/compactpath/scripts/gen_docs.py
===================================================================
--- trunk/src/compactpath/scripts/gen_docs.py 2008-06-19 07:40:55 UTC (rev 20)
+++ trunk/src/compactpath/scripts/gen_docs.py 2008-06-19 07:43:59 UTC (rev 21)
@@ -47,7 +47,7 @@
PACKAGE_DIR,
]
cli.cli()
- print 'done'
+ print 'ok'
# create a redirect to 'epydoc/index.html'
print 'creating redirect'
@@ -62,12 +62,13 @@
finally:
fp.close()
+ print 'ok'
print 'done'
#**************************************************************************************
#
#**************************************************************************************
-if __name__ == '__main__2':
+if __name__ == '__main__':
wantsHelp = len(sys.argv) > 1 and sys.argv[1] or None
if wantsHelp not in ('-?', '--help'):
sys.exit(main())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ju...@us...> - 2008-06-24 13:40:33
|
Revision: 28
http://compactpath.svn.sourceforge.net/compactpath/?rev=28&view=rev
Author: jurner
Date: 2008-06-24 06:40:18 -0700 (Tue, 24 Jun 2008)
Log Message:
-----------
beautified user feedback
Modified Paths:
--------------
trunk/src/compactpath/scripts/gen_docs.py
Modified: trunk/src/compactpath/scripts/gen_docs.py
===================================================================
--- trunk/src/compactpath/scripts/gen_docs.py 2008-06-19 08:01:27 UTC (rev 27)
+++ trunk/src/compactpath/scripts/gen_docs.py 2008-06-24 13:40:18 UTC (rev 28)
@@ -31,13 +31,20 @@
"""enshures epydoc docdir exists"""
save_create_dir(EPYDOC_DIR)
+def pprint(msg, *params):
+ """helper to pprint user feedback"""
+ print '>' + msg
+ for i in params:
+ print ' ' + i
+
#**************************************************************************
#
#**************************************************************************
def main():
""""""
+ pprint('dumping docs to:', EPYDOC_DIR)
enshure_doc_dir_dxists()
- print 'calling epydoc'
+ pprint('calling epydoc')
sys.argv = [
__file__,
'-v',
@@ -47,11 +54,11 @@
PACKAGE_DIR,
]
cli.cli()
- print 'ok'
-
+
# create a redirect to 'epydoc/index.html'
- print 'creating redirect'
- fp = open(os.path.join(DOC_DIR, 'index.html'), 'w')
+ html_index = os.path.join(DOC_DIR, 'index.html')
+ pprint('creating redirect:', html_index)
+ fp = open(html_index, 'w')
try:
fp.write('''<html>
<head>
@@ -62,8 +69,7 @@
finally:
fp.close()
- print 'ok'
- print 'done'
+ pprint('done')
#**************************************************************************************
#
@@ -73,6 +79,3 @@
if wantsHelp not in ('-?', '--help'):
sys.exit(main())
print __doc__
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|