Skip to content
Snippets Groups Projects
Commit f64784c0 authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

remove unnecessary print

parent ad6f9937
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ if __name__ == "__main__":
parser.add_argument("-w", "--wikt_language", help="language of the wiktionary", type=str, default = "en")
parser.add_argument("-e", "--entry", help="the entry", type=str, default=None)
parser.add_argument("-z", "--zero_config", help="Don't use if you know how to configure a server (this changes the working directory)", action="store_true")
parser.add_argument("-A", "--force_ascii", help="json avec que des caractères ascii", action="store_true")
args = parser.parse_args()
formerdir = None
if args.zero_config:
......@@ -39,10 +40,8 @@ class Wiktextract:
result = parse_page(self.wxr, title, page.body)
#print(json.dumps(result), "\n\n\n")
converted_result = self.convert(result)
print("Conv result: ", json.dumps(converted_result, ensure_ascii=False, indent=2))
return converted_result
#return result
......@@ -114,7 +113,7 @@ if __name__ == "__main__":
if args.entry != None:
wkstrkt = Wiktextract(args.wikt_language, args.word_language)
result = wkstrkt.parse_page(args.entry)
print(json.dumps(result, ensure_ascii=False))
print(json.dumps(result, ensure_ascii=args.force_ascii))
else:
print("{'err':'You need to specify a word'}")
if formerdir != None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment