From d0309ca25df872fef8668099e88d6487fc358b09 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Wed, 16 Nov 2016 11:30:02 +0300 Subject: [PATCH] Allow specifying data path --- src/libkomwm.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libkomwm.py b/src/libkomwm.py index 30cc503..a78a5aa 100644 --- a/src/libkomwm.py +++ b/src/libkomwm.py @@ -105,7 +105,10 @@ def query_style(args): def komap_mapswithme(options): - ddir = os.path.dirname(options.outfile) + if options.data and os.path.isdir(options.data): + ddir = options.data + else: + ddir = os.path.dirname(options.outfile) classificator = {} class_order = [] @@ -535,6 +538,8 @@ def main(): help="output filename", metavar="FILE") parser.add_option("-x", "--txt", dest="txt", action="store_true", help="create a text file for output", default=False) + parser.add_option("-d", "--data-path", dest="data", + help="path to mapcss-mapping.csv and other files", metavar="PATH") (options, args) = parser.parse_args()