From 08dc8c0f399428012f3be08f59f72efb58ac45ec Mon Sep 17 00:00:00 2001 From: Saeed Rasooli Date: Sun, 29 Dec 2024 16:32:14 +0330 Subject: [PATCH] fix broken `scripts/view-glossary-plaintext` --- scripts/view-glossary-plaintext | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) mode change 100644 => 100755 scripts/view-glossary-plaintext diff --git a/scripts/view-glossary-plaintext b/scripts/view-glossary-plaintext old mode 100644 new mode 100755 index 8edbd6d44..07a031df0 --- a/scripts/view-glossary-plaintext +++ b/scripts/view-glossary-plaintext @@ -1,27 +1,28 @@ #!/usr/bin/env python -import sys import os -from os.path import abspath, dirname, join +import sys +from os.path import abspath, dirname rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) -from pyglossary.ui.tools.view_glossary import viewGlossary from pyglossary.glossary_v2 import Glossary +from pyglossary.ui.tools.view_glossary import viewGlossary + def main() -> None: filename = sys.argv[1] - format = None + formatName = None if len(sys.argv) > 2: - format = sys.argv[2] + formatName = sys.argv[2] glos = Glossary(ui=None) glos.updateEntryFilters() glos.removeHtmlTagsAll() filename = os.path.expanduser(filename) - viewGlossary(filename, format=format, glos=glos) + viewGlossary(filename, formatName=formatName, glos=glos) if __name__ == "__main__":