diff ppgen.py @ 9:35c468a37b54

Extend command line options to select 2nd language
author Bernhard Reiter <bernhard@intevation.de>
date Wed, 02 Oct 2019 15:04:28 +0200
parents 200c2c3c5f67
children 15d5b3961009
line wrap: on
line diff
--- 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)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)