git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
9785e31
Branches
Tags
develop-client_server
master
typescript
fs-words.git
scripts
translate.py
query scripts
Christian Fraß
commited
9785e31
at 2017-03-19 21:20:53
translate.py
Blame
History
Raw
#!/usr/bin/env python3 import sys as _sys from helpers import * def error_syntax(): print("SYNTAX: translate.py <from-language> <from-lemma> [<to-language>]") _sys.exit(-1) def main(args): from_language = (error_syntax() if (len(args) < 1) else args.pop(0)) from_lemma = (error_syntax() if (len(args) < 1) else args.pop(0)) to_language = (None if (len(args) < 1) else args.pop(0)) macro( "translate", { "from_language": from_language, "from_lemma": from_lemma, "to_language": to_language, }, ( "from_language", "from_lemma", "from_pronunciation", "from_strength", "to_language", "to_lemma", "to_pronunciation", "to_strength", ) ) main(_sys.argv[1:])