diff --git a/sahana/sahana-lang-csv.py b/sahana/sahana-lang-csv.py old mode 100644 new mode 100755 index 1c46feb..70dd096 --- a/sahana/sahana-lang-csv.py +++ b/sahana/sahana-lang-csv.py @@ -15,12 +15,12 @@ basename, extension = os.path.splitext(sys.argv[1].lower()) translations = {} if extension == '.csv': - with open(sys.argv[0], 'rb') as csvfile: + with open(sys.argv[1], 'rb') as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='\'') for line in reader: translations[line[1].encode('utf-8')] = line[2].encode('utf-8') elif extension == '.xls': - sheet = xlrd.open_workbook(sys.argv[0]).sheet_by_index(0) + sheet = xlrd.open_workbook(sys.argv[1]).sheet_by_index(0) for i in range(1, sheet.nrows): row = sheet.row(i) translations[row[1].value.encode('utf-8')] = row[2].value.encode('utf-8')