[pygccxml-commit] SF.net SVN: pygccxml:[1676] sphinx/conf.py
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2009-02-13 09:27:25
|
Revision: 1676 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1676&view=rev Author: roman_yakovenko Date: 2009-02-13 09:27:20 +0000 (Fri, 13 Feb 2009) Log Message: ----------- sphinx Modified Paths: -------------- sphinx/conf.py Modified: sphinx/conf.py =================================================================== --- sphinx/conf.py 2009-02-12 22:00:53 UTC (rev 1675) +++ sphinx/conf.py 2009-02-13 09:27:20 UTC (rev 1676) @@ -74,6 +74,35 @@ shutil.rmtree(target_dir) shutil.copytree( source_dir, target_dir, ignore=shutil.ignore_patterns( r'.svn' ) ) +...@at...gister +def generate_sitemap(): + try: + import sitemap_gen + + working_dir = os.path.join( doc_project_root, html_documentation_dir_name ) + config = \ + """<?xml version="1.0" encoding="UTF-8"?> + <site base_url="http://www.language-binding.net/" store_into="%(path)s/sitemap.xml.gz" verbose="1"> + <directory path="%(path)s" url="http://www.language-binding.net/" default_file="index.html" /> + </site> + """ % dict( path=os.path.join( doc_project_root, working_dir ) ) + + f_config_path = os.path.join( working_dir, 'sitemap_config.xml' ) + f_config = file( f_config_path, 'w+' ) + f_config.write( config ) + f_config.close() + + sitemap = sitemap_gen.CreateSitemapFromFile(f_config_path, True) + if not sitemap: + print 'ERROR(SITEMAP): configuration file errors' + else: + sitemap.Generate() + print 'ERRORS(SITEMAP): %d' % sitemap_gen.output.num_errors + print 'WARNINGS(SITEMAP): %d' % sitemap_gen.output.num_warns + except Exception, error: + print "ERROR(SITEMAP): sitemap file was not generated - ", str(error) + + # General configuration # --------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |