Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add preliminary weboot command

  • Loading branch information...
commit 8733502edbdcf00e3bfe678f36d6ad16154e6e6c 1 parent f46593a
@pwaller pwaller authored
Showing with 80 additions and 0 deletions.
  1. +13 −0 scripts/weboot
  2. +2 −0  setup.py
  3. +65 −0 weboot/utils/default_conf.ini
View
13 scripts/weboot
@@ -0,0 +1,13 @@
+#! /usr/bin/env python
+
+from pkg_resources import resource_filename
+
+import pyramid.scripts.pserve
+
+def main():
+ config = resource_filename("weboot.utils", "default_conf.ini")
+ args = ["--reload", config]
+ return pyramid.scripts.pserve.main(args)
+
+if __name__ == '__main__':
+ raise SystemExit(main())
View
2  setup.py
@@ -8,6 +8,7 @@
__version__ = "0.1"
from commands import getstatusoutput
+from glob import glob
from os.path import abspath, dirname, exists, join as pjoin
from setuptools import setup, find_packages
@@ -73,4 +74,5 @@
[paste.app_factory]
main = weboot:main
""",
+ scripts=glob('scripts/*'),
)
View
65 weboot/utils/default_conf.ini
@@ -0,0 +1,65 @@
+[app:main]
+use = egg:WebOOT
+
+pyramid.reload_templates = true
+pyramid.debug_authorization = false
+pyramid.debug_notfound = true
+pyramid.debug_routematch = false
+pyramid.default_locale_name = en
+pyramid.includes =
+ pyramid_debugtoolbar
+
+# NOTE: this is dangerous and will allow people to do bad things to you if
+# the connection
+#
+debugtoolbar.hosts = 0.0.0.0/0
+
+# Start browsing in the current working directory
+results_path = .
+
+#mongo.url = mongodb://localhost/
+#mongo.dbpath = %(here)s/data
+#mongo.dbname = WebOOT
+#mongo.run = True
+
+beaker.session.data_dir = %(here)s/data/sdata
+beaker.session.lock_dir = %(here)s/data/slock
+beaker.session.key = velruse
+beaker.session.secret = asdkvghgocvusgretheqbalguytf
+beaker.session.type = cookie
+
+[server:main]
+use = egg:waitress#main
+host = 0.0.0.0
+port = 6543
+
+# Begin logging configuration
+
+[loggers]
+keys = root
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic, colored
+
+[logger_root]
+level = DEBUG
+handlers = console
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = DEBUG
+formatter = colored
+
+[formatter_colored]
+#format = %(asctime)s [%(levelname)-18s][%(threadName)10s][$BOLD%(name)-20s$RESET] %(message)s
+format = {asctime} {color}{levelname:7}$RESET:$BOLD{name:50s}$RESET] {message}
+datefmt = %H:%M:%S
+class = rootpy.logger.color.CustomColoredFormatter
+
+[formatter_generic]
+format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
+
Please sign in to comment.
Something went wrong with that request. Please try again.