Changeset 2779
- Timestamp:
- 03/03/06 00:03:36 (19 years ago)
- Location:
- pykota/trunk
- Files:
-
- 17 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pknotify
r2778 r2779 28 28 import os 29 29 import popen2 30 import xmlrpclib 30 31 31 32 from pykota.tool import Tool, PyKotaToolError, PyKotaCommandLineError, crashed, N_ … … 41 42 options : 42 43 43 -v | --version Prints pkbanner's version number then exits.44 -h | --help Prints this message then exits.44 -v | --version Prints pkbanner's version number then exits. 45 -h | --help Prints this message then exits. 45 46 47 -d | --destination h[:p] Sets the destination hostname and optional 48 port onto which contact the remote PyKotIcon 49 application. This option is mandatory. 50 When not specified, the port defaults to 7654. 51 52 -a | --ask Tells pknotify to ask something to the end 53 user. Then pknotify will output the result. 54 55 -c | --confirm Tells pknotify to ask for either a confirmation 56 or abortion. 57 58 -n | --notify Tells pknotify to send an informational message 59 message to the end user. 60 61 -q | --quit Tells pknotify to send a message asking the 62 PyKotIcon application to exit. This option can 63 be combined with the other ones to make PyKotIcon 64 exit after having sent the answer from the dialog. 65 66 You MUST specify either --ask, --confirm, --notify or --quit. 67 68 arguments : 69 70 -a | --ask : Several arguments are accepted, or the form 71 "label:varname:defaultvalue". The result will 72 be printed to stdout in the following format : 73 VAR1NAME=VAR1VALUE 74 VAR2NAME=VAR2VALUE 75 ... 76 If the dialog was cancelled, nothing will be 77 printed. If one of the varname is 'password' 78 then this field is asked as a password (you won't 79 see what you type in). 80 81 -c | --confirm : A single argument is expected, representing the 82 message to display. If the dialog is confirmed 83 then pknotify will print OK, else CANCEL. 84 85 -n | --notify : A single argument is expected, representing the 86 message to display. In this case pknotify will 87 always print OK. 88 89 examples : 90 91 pknotify -d client:7654 --confirm "This job costs :\n10 credits !" 92 93 would display the cost of a print job and asks for confirmation. 46 94 """) 47 95 48 96 class PyKotaNotify(Tool) : 49 97 """A class for pknotify.""" 98 def sanitizeMessage(self, msg) : 99 """Replaces \\n and returns a messagee in xmlrpclib Binary format.""" 100 return xmlrpclib.Binary(msg.replace("\\n", "\n")) 101 50 102 def main(self, arguments, options) : 51 103 """Notifies or asks questions to end users through PyKotIcon.""" 52 pass # TODO : do something ! 53 104 try : 105 (destination, port) = options["destination"].split(":") 106 except ValueError : 107 destination = options["destination"] 108 port = 7654 109 server = xmlrpclib.ServerProxy("http://%s:%s" % (destination, port)) 110 if options["ask"] : 111 labels = [] 112 varnames = [] 113 varvalues = {} 114 for arg in arguments : 115 try : 116 (label, varname, varvalue) = arg.split(":", 2) 117 except ValueError : 118 raise PyKotaCommandLineError, "argument '%s' is invalid !" % arg 119 labels.append(self.sanitizeMessage(label)) 120 varname = varname.lower() 121 varnames.append(varname) 122 varvalues[varname] = self.sanitizeMessage(varvalue) 123 result = server.askDatas(labels, varnames, varvalues) 124 if result["isValid"] : 125 for varname in varnames : 126 print "%s=%s" % (varname.upper(), result[varname]) 127 elif options["confirm"] : 128 print server.showDialog(self.sanitizeMessage(arguments[0]), True) 129 elif options["notify"] : 130 print server.showDialog(self.sanitizeMessage(arguments[0]), False) 131 132 if options["quit"] : 133 server.quitApplication() 134 54 135 if __name__ == "__main__" : 55 136 retcode = 0 … … 57 138 defaults = { \ 58 139 } 59 short_options = "vh" 60 long_options = ["help", "version"] 140 short_options = "vhd:acnq" 141 long_options = ["help", "version", "destination=", \ 142 "ask", "confirm", "notify", "quit" ] 61 143 62 144 # Initializes the command line tool … … 65 147 66 148 # parse and checks the command line 67 (options, args) = notifier.parseCommandline(sys.argv[1:], short_options, long_options , allownothing=1)149 (options, args) = notifier.parseCommandline(sys.argv[1:], short_options, long_options) 68 150 69 151 # sets long options 70 152 options["help"] = options["h"] or options["help"] 71 153 options["version"] = options["v"] or options["version"] 154 options["destination"] = options["d"] or options["destination"] 155 options["ask"] = options["a"] or options["ask"] 156 options["confirm"] = options["c"] or options["confirm"] 157 options["notify"] = options["n"] or options["notify"] 158 options["quit"] = options["q"] or options["quit"] 72 159 73 160 if options["help"] : … … 75 162 elif options["version"] : 76 163 notifier.display_version_and_quit() 164 elif (options["ask"] and (options["confirm"] or options["notify"])) \ 165 or (options["confirm"] and (options["ask"] or options["notify"])) \ 166 or (options["notify"] and (options["ask"] or options["confirm"])) : 167 raise PyKotaCommandLineError, _("incompatible options, see help.") 168 elif (not options["destination"]) \ 169 or not (options["quit"] or options["ask"] or options["confirm"] or options["notify"]) : 170 raise PyKotaCommandLineError, _("some options are mandatory, see help.") 171 elif (not args) and (not options["quit"]) : 172 raise PyKotaCommandLineError, _("some options require arguments, see help.") 77 173 else : 78 174 retcode = notifier.main(args, options) -
pykota/trunk/man/de/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/el_GR/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/es/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/fr/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/it/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/nb_NO/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/pl/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/pt_BR/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/pt/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/sv_SE/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/th/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/tr/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/zh_TW/pknotify.1
r2778 r2779 20 20 \fB\-h\fR | \fB\-\-help\fR 21 21 Prints this message then exits. 22 .TP 23 \fB\-d\fR | \fB\-\-destination\fR h[:p] 24 Sets the destination hostname and optional 25 port onto which contact the remote PyKotIcon 26 application. This option is mandatory. 27 When not specified, the port defaults to 7654. 28 .TP 29 \fB\-a\fR | \fB\-\-ask\fR 30 Tells pknotify to ask something to the end 31 user. Then pknotify will output the result. 32 .TP 33 \fB\-c\fR | \fB\-\-confirm\fR 34 Tells pknotify to ask for either a confirmation 35 or abortion. 36 .TP 37 \fB\-n\fR | \fB\-\-notify\fR 38 Tells pknotify to send an informational message 39 message to the end user. 40 .TP 41 \fB\-q\fR | \fB\-\-quit\fR 42 Tells pknotify to send a message asking the 43 PyKotIcon application to exit. This option can 44 be combined with the other ones to make PyKotIcon 45 exit after having sent the answer from the dialog. 46 .IP 47 You MUST specify either \fB\-\-ask\fR, \fB\-\-confirm\fR, \fB\-\-notify\fR or \fB\-\-quit\fR. 48 .IP 49 arguments : 50 .HP 51 \fB\-a\fR | \fB\-\-ask\fR : Several arguments are accepted, or the form 52 .IP 53 "label:varname:defaultvalue". The result will 54 be printed to stdout in the following format : 55 VAR1NAME=VAR1VALUE 56 VAR2NAME=VAR2VALUE 57 \&... 58 If the dialog was cancelled, nothing will be 59 printed. If one of the varname is 'password' 60 then this field is asked as a password (you won't 61 see what you type in). 62 .TP 63 \fB\-c\fR | \fB\-\-confirm\fR : A single argument is expected, representing the 64 message to display. If the dialog is confirmed 65 then pknotify will print OK, else CANCEL. 66 .TP 67 \fB\-n\fR | \fB\-\-notify\fR : A single argument is expected, representing the 68 message to display. In this case pknotify will 69 always print OK. 70 .PP 71 examples : 72 .IP 73 pknotify \fB\-d\fR client:7654 \fB\-\-confirm\fR "This job costs : 74 .PP 75 10 credits !" 76 .IP 77 would display the cost of a print job and asks for confirmation. 22 78 .PP 23 79 This program is free software; you can redistribute it and/or modify -
pykota/trunk/NEWS
r2773 r2779 22 22 PyKota NEWS : 23 23 24 - 1.24alpha16 (2006-03-02) : 25 26 - Introduced the pknotify command line tool to dialog 27 with remote PyKotIcon applications. 28 24 29 - 1.24alpha15 (2006-03-02) : 25 30 -
pykota/trunk/pykota/version.py
r2759 r2779 22 22 # 23 23 24 __version__ = "1.24alpha1 5_unofficial"24 __version__ = "1.24alpha16_unofficial" 25 25 26 26 __doc__ = "PyKota : a complete Printing Quota Solution for CUPS."