summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--combox/cbox.py10
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ddaaf6..c85e938 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
2015-12-13 Siddharth Ravikumar <sravik@bgsu.edu>
+
+ * combox/cbox.py (main): When it has to configure combox, it uses
+ the graphical interface by default, if the '-nw' or '--cli' is
+ provided, it uses the text/commandline interface.
+
+2015-12-13 Siddharth Ravikumar <sravik@bgsu.edu>
* combox/gui.py (ComboxConfigDialog.__init__): accepts a new
argument called `condig_dir` that allows one to specify the combox
configuration directory
diff --git a/combox/cbox.py b/combox/cbox.py
index a9b751c..a8891ac 100644
--- a/combox/cbox.py
+++ b/combox/cbox.py
@@ -31,6 +31,7 @@ from watchdog.observers import Observer
from combox.config import config_cb, get_nodedirs
from combox.events import ComboxDirMonitor, NodeDirMonitor
+from combox.gui import ComboxConfigDialog
from combox.log import log_i, log_e
## Function adapted from Watchdog's docs:
@@ -92,6 +93,9 @@ def main():
parser.add_argument("-t", "--test",
help="Use the combox config file in testing area.",
action="store_true")
+ parser.add_argument("-nw", "--cli",
+ help="Use CLI interface only",
+ action="store_true")
args = parser.parse_args()
if args.test:
CONFIG_DIR = path.join('tests', 'test-config')
@@ -104,7 +108,11 @@ def main():
if not path.exists(CONFIG_DIR):
# combox not configured.
- config_cb(CONFIG_DIR)
+ if not args.cli:
+ ComboxConfigDialog("combox configuration", CONFIG_DIR)
+ else:
+ config_cb(CONFIG_DIR)
+
try:
config = yaml.load(file(config_file, 'r'))
except yaml.YAMLError, exc: