diff --git a/agkyra-cli b/agkyra-cli new file mode 100755 index 0000000000000000000000000000000000000000..6306b42d9d1565720ea749a75a1eb4095062c50e --- /dev/null +++ b/agkyra-cli @@ -0,0 +1,35 @@ +#!/usr/bin/env python + +# Copyright (C) 2015 GRNET S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import os + +from agkyra import config +AGKYRA_DIR = config.AGKYRA_DIR + +import logging +LOGFILE = os.path.join(AGKYRA_DIR, 'agkyra.log') +LOGGER = logging.getLogger('agkyra') +HANDLER = logging.FileHandler(LOGFILE) +FORMATTER = logging.Formatter("%(levelname)s:%(asctime)s:%(message)s") +HANDLER.setFormatter(FORMATTER) +LOGGER.addHandler(HANDLER) +LOGGER.setLevel(logging.INFO) + +# run cli +from agkyra.cli import AgkyraCLI +from sys import argv +AgkyraCLI().onecmd(' '.join(argv[1:] or ['help', ])) diff --git a/launch b/agkyra-gui similarity index 89% rename from launch rename to agkyra-gui index 03fb63f11c93b7bda39d0e40181bd10232026156..63213406d03d482217e8b56ab617df00adf6e217 100755 --- a/launch +++ b/agkyra-gui @@ -32,8 +32,3 @@ LOGGER.setLevel(logging.INFO) # # run GUI from agkyra import gui gui.run() - -# run cli -# from agkyra.cli import AgkyraCLI -# from sys import argv -# AgkyraCLI().onecmd(' '.join(argv[1:] or ['help', ]))