-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import os | ||
|
||
os.chdir(os.path.dirname(os.path.abspath(__file__))) | ||
os.environ["DUETECTOR_LOG_LEVEL"] = "DEBUG" | ||
|
||
import re | ||
import sys | ||
from pathlib import Path | ||
|
||
from pkg_resources import load_entry_point | ||
|
||
db_file = Path("./duetector-dbcollector.sqlite3") | ||
config_file = Path("./config.toml") | ||
|
||
if __name__ == "__main__": | ||
db_file.unlink(missing_ok=True) | ||
sys.argv[0] = re.sub(r"(-script\.pyw?|\.exe)?$", "", sys.argv[0]) | ||
sys.argv.append("start") | ||
sys.argv.extend(["--config", config_file.resolve().as_posix()]) | ||
sys.exit(load_entry_point("duetector", "console_scripts", "duectl")()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import click | ||
|
||
|
||
@click.command() | ||
def start(): | ||
click.echo("start") | ||
|
||
|
||
@click.group() | ||
def cli(): | ||
pass | ||
|
||
|
||
cli.add_command(start) | ||
|
||
|
||
if __name__ == "__main__": | ||
cli(["start"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters