forked from xeroc/stakemachine
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Moved cli & gui modules inside dexbot package
- created separate console entrypoints for cli & gui dexbot versions: dexbot-cli & dexbot-gui - Create default config.yml file initially at the user's default config directory and load it from here everywhere. - Fix for #57 : config.yml is created automatically in case it does not exist
- Loading branch information
Showing
10 changed files
with
51 additions
and
31 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1 +1,24 @@ | ||
__version__ = '0.1.12' | ||
import pathlib | ||
import os | ||
from appdirs import user_config_dir | ||
|
||
APP_NAME = "dexbot" | ||
VERSION = '0.1.12' | ||
AUTHOR = "codaone" | ||
__version__ = VERSION | ||
|
||
|
||
config_dir = user_config_dir(APP_NAME, appauthor=AUTHOR) | ||
config_file = config_dir + "/config.yml" | ||
|
||
default_config = """ | ||
node: wss://bitshares.openledger.info/ws | ||
workers: {} | ||
""" | ||
|
||
if not os.path.isfile(config_file): | ||
pathlib.Path(config_dir).mkdir(parents=True, exist_ok=True) | ||
with open(config_file, 'w') as f: | ||
f.write(default_config) | ||
print("Created default config file at {}".format(config_file)) | ||
|
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
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
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
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
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