DashMachine/run.py
Ross Mountjoy 62191b21b8 ##### Updated to version 0.6!
> Version 0.6 brings DashMachine one big step forward to being a finished product by adding a gui to edit the various settings in the config.ini.

**Changelog**
- improvements to /home including 'pinned' cards, multi-select tag filtering, 'action providers' allowing you to do web searches from the searchbar
- rebuilt sidenav with list view, mirroring filter/search/collapse state of the homepage
- /settings and /home now on same route
- dynamic reloading of settings (no more page reloads)
- dedicated config.ini editor slide-out
- settings editor slide-out
- card editor slide-out
- better access group control
- dedicated documentation pages
- improved documentation
- new system for automatically generating documentation for platforms
- ability to load custom platforms
- added an 'on_starup' method for platforms allowing for registering api routes. (example coming soon)
2020-05-07 09:27:18 -04:00

33 lines
874 B
Python
Executable File

#!/usr/bin/env python3
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--port", help='port to listen to (default "5000")', type=int)
args = parser.parse_args()
host_port = args.port
if host_port is None:
host_port = 5000
file_path = os.path.abspath(__file__)
root_folder = os.path.dirname(file_path)
if not os.path.isdir(os.path.join(root_folder, "dashmachine", "user_data")):
os.mkdir(os.path.join(root_folder, "dashmachine", "user_data"))
db_file_path = os.path.join(root_folder, "dashmachine", "user_data", "site.db")
try:
os.remove(db_file_path)
except FileNotFoundError:
pass
from dashmachine import app
from dashmachine.main.utils import dashmachine_init
dashmachine_init()
if __name__ == "__main__":
app.run(
debug=True, use_reloader=True, host="0.0.0.0", port=host_port, threaded=True
)