feat: add documentation, changeable shortcuts
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from .log import Log
|
||||
from .icon import Icon
|
||||
from .debug import debugMessage
|
||||
from .stringtodate import stringToDate
|
||||
from .stringtodate import stringToDate
|
||||
from .documentation import launch_documentation
|
||||
21
src/utils/documentation.py
Normal file
21
src/utils/documentation.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from pyramid.config import Configurator
|
||||
from wsgiref.simple_server import make_server
|
||||
import os
|
||||
def website():
|
||||
config = Configurator()
|
||||
|
||||
# Set up static file serving from the 'site/' directory
|
||||
config.add_static_view(name='/', path=os.path.join(os.getcwd(), 'site'), cache_max_age=3600)
|
||||
|
||||
app = config.make_wsgi_app()
|
||||
return app
|
||||
|
||||
def launch_documentation():
|
||||
app = website()
|
||||
server = make_server('localhost', 6543, app)
|
||||
print("Serving MkDocs documentation on http://0.0.0.0:6543")
|
||||
server.serve_forever()
|
||||
|
||||
if __name__ == '__main__':
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user