29
29
from qreator_lib import set_up_logging, get_version
33
return _(message).decode('UTF-8')
32
36
def parse_options():
33
37
"""Support for command line options"""
34
38
parser = optparse.OptionParser(version="%%prog %s" % get_version())
36
40
"-v", "--verbose", action="count", dest="verbose",
37
help=_("Show debug messages (-vv debugs qreator_lib also)"))
41
help=UTF8_("Show debug messages (-vv debugs qreator_lib also)"))
39
43
"-u", "--url", dest="view", action="store_const", const="url",
40
help=_("Create a QR code for a URL"))
44
help=UTF8_("Create a QR code for a URL"))
42
46
"-t", "--text", dest="view", action="store_const", const="text",
43
help=_("Create a QR code from text"))
47
help=UTF8_("Create a QR code from text"))
45
49
"-l", "--location", dest="view", action="store_const",
46
const="location", help=_("Create a QR code for a location"))
50
const="location", help=UTF8_("Create a QR code for a location"))
48
52
"-w", "--wifi", dest="view", action="store_const", const="wifi",
49
help=_("Create a QR code for WiFi settings"))
53
help=UTF8_("Create a QR code for WiFi settings"))
50
54
(options, args) = parser.parse_args()
52
56
set_up_logging(options)