import os

import taxii_services

project = u'django-taxii-services'
copyright = u'2014, The MITRE Corporation'
version = taxii_services.__version__
release = version

extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']

templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'

rst_prolog = """
**Version**: {0}
""".format(release)

exclude_patterns = ['_build']

pygments_style = 'sphinx'

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:  # only import and set the theme if we're building docs locally
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
else:
    html_theme = 'default'

latex_elements = {}
latex_documents = [
  ('index', 'django-taxii-services.tex', u'django-taxii-services Documentation',
   u'Mark Davidson', 'manual'),
]

@@ -175,16 +175,21 @@
 ions = %5B
+%0A    
 'sphinx.
@@ -205,31 +205,226 @@
 oc',
- 'sphinx.ext.viewcode'%5D
+%0A    'sphinx.ext.doctest',%0A    'sphinx.ext.ifconfig',%0A    'sphinx.ext.intersphinx',%0A    'sphinx.ext.viewcode',%0A    'sphinxcontrib.napoleon',%0A%5D%0A%0Aintersphinx_mapping = %7B%0A    'python': ('http://docs.python.org/', None),%0A%7D
 %0A%0Ate
@@ -577,16 +577,21 @@
  = %5B
+%0A    
 '_build'
 %5D%0A%0Ap
@@ -590,38 +590,13 @@
 ild'
+,%0A
 %5D%0A%0A
-pygments_style = 'sphinx'%0A%0A
 on_r
@@ -664,72 +664,8 @@
 rtd:
-  # only import and set the theme if we're building docs locally
 %0A   
@@ -862,16 +862,18 @@
 nts = %5B%0A
+  
   ('inde
@@ -952,21 +952,31 @@
 %0A   
-u'Mark Davids
+  u'The MITRE Corporati
 on',

Clean up and standardize docs and conf.py