Commit b41a8077 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Intermediate merge.

parents 131b0d7f 49525c33
......@@ -22,8 +22,8 @@ MANIFEST
hg-check*
vispa.egg*
*.*~
doc/source/js
doc/source/py
docs/source/js
docs/source/py
*.sublime-workspace
.vagrant
vagrant_ansible_inventory_default
......
......@@ -10,12 +10,13 @@ import webbrowser
import cherrypy
import gtk
from vispa import RELEASE_VERSION
base = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
if os.path.isdir(base):
sys.path.insert(0, base)
VERSION = '1.1'
logger = logging.getLogger(__name__)
......@@ -76,39 +77,30 @@ class Browser(object):
def parse_commandline():
parser = ArgumentParser()
parser.add_argument(
'-c',
'--config-dir',
dest='configdir',
default=os.path.expanduser(
'~/.vispa-%s/conf' %
VERSION),
help='Directory containing configuration files '
'(default: ~/.vispa-%s/conf)' %
VERSION)
parser.add_argument(
'-d',
'--data-dir',
dest='vardir',
default=os.path.expanduser(
'~/.vispa-%s/var' %
VERSION),
help='Directory containing server '
'data and cache files (default: ~/.vispa-%s/var)' %
VERSION)
parser.add_argument('-l', '--loglevel', dest='loglevel', default=None,
help='enable debug messages')
parser.add_argument('-p', '--port',
default=None,
help='which port the server shall listen on')
config_dir = "~/.vispa-%s/conf" % release_version
parser.add_argument("--config-dir", "-c", dest="configdir",
default=os.path.expanduser(config_dir),
help="Directory containing config files (default: %s)" % config_dir)
data_dir = "~/.vispa-%s/var" % release_version
parser.add_argument("--data-dir", "-d", dest="vardir"
default=os.path.expanduser(data_dir),
help="Directory containing data and cache files (default: %s)" % data_dir)
parser.add_argument("--loglevel", "-l", dest="loglevel", default=None,
help="Enable debug messages")
parser.add_argument("--port", "-p", default=None,
help="Which port the server shall listen on")
return parser.parse_args()
def setup_logging(args):
logging_conf = os.path.join(args.configdir, 'logging.ini')
logformat = '%(asctime)s - %(levelname)-6s - %(name)-s - %(message)s'
datefmt = '%Y-%m-%d %H:%M'
logging_conf = os.path.join(args.configdir, "logging.ini")
logformat = "%(asctime)s - %(levelname)-6s - %(name)-s - %(message)s"
datefmt = "%Y-%m-%d %H:%M"
loglevel = args.loglevel
if os.path.isfile(logging_conf):
......@@ -146,5 +138,5 @@ def run():
browser.show()
server.stop()
if __name__ == '__main__':
if __name__ == "__main__":
run()
......@@ -98,25 +98,30 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
print "\n\n"
print os.getcwd()
print "\n\n"
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
"relbarbgcolor": "rgb(34, 34, 34)",
"sidebarbgcolor": "rgb(242, 242, 242)",
"sidebartextcolor": "rgb(51, 51, 51)",
"sidebarlinkcolor": "rgb(0, 107, 214)",
"footerbgcolor": "white",
"footertextcolor": "black",
"linkcolor": "rgb(0, 107, 214)",
"visitedlinkcolor": "rgb(0, 62, 124)",
"headtextcolor": "rgb(51, 51, 51)",
# "relbarbgcolor": "rgb(34, 34, 34)",
# "sidebarbgcolor": "rgb(242, 242, 242)",
# "sidebartextcolor": "rgb(51, 51, 51)",
# "sidebarlinkcolor": "rgb(0, 107, 214)",
# "footerbgcolor": "white",
# "footertextcolor": "black",
# "linkcolor": "rgb(0, 107, 214)",
# "visitedlinkcolor": "rgb(0, 62, 124)",
# "headtextcolor": "rgb(51, 51, 51)",
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = [
"../themes"
]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
......
"""Sphinx ReadTheDocs theme.
From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
"""
import os
VERSION = (0, 1, 5)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__
def get_html_theme_path():
"""Return list of HTML theme paths."""
cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
return cur_dir
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="{{ pathto(master_doc) }}">Docs</a> &raquo;</li>
{% for doc in parents %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
{% endfor %}
<li>{{ title }}</li>
<li class="wy-breadcrumbs-aside">
{% if display_github %}
<a href="https://github.com/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ source_suffix }}" class="fa fa-github"> Edit on GitHub</a>
{% elif display_bitbucket %}
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ source_suffix }}" class="fa fa-bitbucket"> Edit on Bitbucket</a>
{% elif show_source and has_source and sourcename %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> View page source</a>
{% endif %}
</li>
</ul>
<hr/>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment