Example #1
0
def init(dest):
    from neorg.web import app, init_db
    from neorg.config import init_config_file, load_config

    init_config_file(dest)
    load_config(app, dest)
    init_db()
Example #2
0
def init(dest):
    from neorg.web import app, init_db
    from neorg.config import init_config_file, load_config

    init_config_file(dest)
    load_config(app, dest)
    init_db()
Example #3
0
def serve(port, root=None, debug=None, browser=None):
    from neorg.web import app, update_system_info, update_search_index
    from neorg.config import load_config
    from neorg.wiki import setup_wiki
    load_config(app, dirpath=root)
    if debug is not None:
        app.config['DEBUG'] = debug
    update_search_index()
    update_system_info()
    if browser:
        from threading import Timer
        from webbrowser import open_new_tab
        Timer(1, open_new_tab, args=['http://localhost:%d' % port]).start()
    setup_wiki()
    app.run(port=port)
Example #4
0
def serve(port, root=None, debug=None, browser=None):
    from neorg.web import app, update_system_info, update_search_index
    from neorg.config import load_config
    from neorg.wiki import setup_wiki
    load_config(app, dirpath=root)
    if debug is not None:
        app.config['DEBUG'] = debug
    update_search_index()
    update_system_info()
    if browser:
        from threading import Timer
        from webbrowser import open_new_tab
        Timer(1, open_new_tab,
              args=['http://localhost:%d' % port]).start()
    setup_wiki()
    app.run(port=port)