# HG changeset patch # User Bernhard Reiter # Date 1570021468 -7200 # Node ID 35c468a37b54c515d36d5ceff6123cd137287713 # Parent 200c2c3c5f671b1ad252bcf8c74e8c3a4dc3d88c Extend command line options to select 2nd language diff -r 200c2c3c5f67 -r 35c468a37b54 ppgen.py --- a/ppgen.py Thu Jan 18 08:44:33 2018 +0100 +++ b/ppgen.py Wed Oct 02 15:04:28 2019 +0200 @@ -51,7 +51,9 @@ #d = [''.join('A' * 1000) for _ in range(1000)] # Using the dictionary from Ding **customize** - d = readDingDict(options, filename="/usr/share/trans/de-en", useLeft=True) + d = readDingDict(options, + filename="/usr/share/trans/de-en", + useLeft=not options.second_language) # for debugging purposes, dump dictionary if options.ddump_filename: @@ -136,6 +138,8 @@ help='only output the passphrase on a single line') parser.add_argument('--ddump-filename', help='filename to dump the dictionary to') + parser.add_argument('-2', '--second-language', action='store_true', + help='use the second language in the ding dictionary') options = parser.parse_args() dictionary = buildDictionary(options)