root / pykoticon / trunk / README @ 153

Revision 153, 6.4 kB (checked in by jerome, 18 years ago)

Finished the documentation for the exposed methods.

  • Property svn:keywords set to Id
Line 
1# $Id$
2
3PyKotIcon - Client side helper for PyKota and other applications
4
5(c) 2003, 2004, 2005, 2006 Jerome Alet <alet@librelogiciel.com>
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
19
20====================================================================
21
22PyKotIcon is a cross-platform client-side helper for PyKota.
23
24It is meant to be launched whenever the user logs in, and stay in
25the taskbar (depending on the client operating system) until the
26user closes his session.
27 
28Installation :
29
30  * GNU/Linux and similar :
31 
32    $ cd pykoticon
33    $ python setup.py install
34   
35    Then modify your .xsession file, or the appropriate file depending
36    on your desktop environment, to ensure that the pykoticon command
37    is launched in the background each time your X Window session
38    starts.
39   
40    You MUST pass the list of hostnames or IP addresses from which
41    PyKotIcon should accept incoming connexions on pykoticon's
42    command line. Connexions from localhost are always accepted.
43    If you use PyKotIcon with PyKota, you'll want to pass the
44    hostnames or IP addresses of ALL print servers on pykoticon's
45    command line.
46   
47    NB : `pykoticon --help` will give you hints about the expected
48    command line parameters.
49   
50  * MS Windows : 
51 
52    Download pykoticon-x.yy.zip from
53   
54        http://www.pykota.com/software/pykoticon/download/tarballs/
55       
56    Unzip it into a directory of its own. I usually unzip it into   
57    /var/lib/samba/netlogon/pykoticon/
58   
59    Modify the PYKOTICON.VBS file to include the list of authorized
60    print servers and change other parameters as needed, as explained
61    in the GNU/Linux section above.
62   
63    Ensure that PYKOTICON.VBS is executed each time an user logs
64    in. The easiest way to do this is in STARTUP.CMD :
65   
66      --- CUT ---
67      SET PATH=%PATH%;\\MYSERVER\NETLOGON\PYKOTICON\
68      \\MYSERVER\NETLOGON\PYKOTICON\PYKOTICON.VBS
69      --- CUT ---
70     
71    NB : if you launch PYKOTICON.EXE directly instead of from
72    PYKOTICON.VBS, a small but disturbing window may appear on
73    the screen.
74
75
76====================================================================
77
78
79Usage :
80
81  PyKotIcon is often used as a client side companion for the PyKota
82  print accounting solution, but in reality PyKotIcon is completely
83  independant of PyKota, and can be used from any application
84  which can do remote procedure calls over XML-RPC.
85 
86  PyKotIcon exposes 4 of its methods over XML-RPC, here they are :
87 
88    - nop :
89   
90      This methods does exactly nothing :)
91     
92      - Input : No argument.
93     
94      - Output : returns the True boolean value.
95     
96    - quitApplication : 
97   
98      This method causes the PyKotIcon application to exit.
99     
100      - Input : No argument.
101     
102      - Output : returns the True boolean value.
103         
104    - showDialog : 
105   
106      This methods displays an informational message, and returns
107      the choice the user made, if any.
108       
109      - Input :
110       
111        - message : a Binary XML-RPC object representing an UTF-8 encoded
112          character string which will be displayed to the end user.
113          This string can contain literal "\n" sequences which will
114          be automatically expanded into line breaks by PyKotIcon.
115         
116        - confirmation : a boolean value indicating if the user will 
117          be given the choice to valid or cancel (True), or only
118          to valid (False) the dialog box.
119           
120      - Output :     
121     
122        - the literal string "OK" if the user clicked on the OK button,
123          else the literal string "CANCEL". The latter is only possible
124          if the method was called with its second parameter set to
125          True.
126       
127    - askDatas :     
128   
129      This method can generate an input form and return what the user
130      entered in the different fields.
131     
132      - Input :
133     
134        - An array of labels, one label per input field in the
135          form to be created. Each label in the list is passed as
136          a Binary XML-RPC object representing an UTF-8 encoded
137          character string.
138         
139        - An array of variables names, one name per input field in
140          the form to be created. Each name in the list is passed
141          as an ASCII encoded character string.
142         
143        - An array of initial values, one possibly empty value per 
144          input field in the form to be created. Each initial value
145          in the list is passed as a Binary XML-RPC object representing
146          an UTF-8 encoded character string.
147     
148      - Output :
149     
150        - An associative array (e.g. Python mapping) containing the
151          variables names as keys and the variables' contents as
152          values in the following format :
153         
154          - Each key is an ASCII encoded character string representing
155            the name of a variable to ask which was passed from the
156            caller.
157           
158          - Each value is a Binary XML-RPC object representing an UTF-8 
159            encoded character string, itself being the result of user
160            input in the form's field for this particular variable.
161
162          - A special key named 'isValid' gives access to a boolean
163            value in the associative array. If the value is True,
164            then the input fields' contents are valid. If the value
165            is False, then was the user typed in the input fields
166            has to be discarded because, for example, the user
167            closed the form without validing his entries.
168            In this case, all the other values are empty strings
169            anyway.
170           
171           
172====================================================================
173   
174Please e-mail bugs to the PyKota mailing list at : pykota@librelogiciel.com
175or to the main author at : alet@librelogiciel.com (Jerome Alet)
Note: See TracBrowser for help on using the browser.