[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/reports/src GRReport.py GRRun.py GRServer.py
From: |
Jason Cater |
Subject: |
gnue/reports/src GRReport.py GRRun.py GRServer.py |
Date: |
Mon, 22 Oct 2001 19:01:34 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 01/10/22 19:01:34
Modified files:
reports/src : GRReport.py GRRun.py
Added files:
reports/src : GRServer.py
Log message:
added new options to reports client; started reports server; [synching
machines]
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/src/GRServer.py?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/src/GRReport.py.diff?cvsroot=OldCVS&tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/src/GRRun.py.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gnue/reports/src/GRReport.py
diff -u gnue/reports/src/GRReport.py:1.14 gnue/reports/src/GRReport.py:1.15
--- gnue/reports/src/GRReport.py:1.14 Thu Oct 18 19:23:10 2001
+++ gnue/reports/src/GRReport.py Mon Oct 22 19:01:34 2001
@@ -122,7 +122,6 @@
dest.write ("</GNUe-report-output>\n")
-
def getChildOfType(self, type):
rv = None
for child in self._children:
Index: gnue/reports/src/GRRun.py
diff -u gnue/reports/src/GRRun.py:1.3 gnue/reports/src/GRRun.py:1.4
--- gnue/reports/src/GRRun.py:1.3 Fri Oct 19 15:02:27 2001
+++ gnue/reports/src/GRRun.py Mon Oct 22 19:01:34 2001
@@ -34,7 +34,7 @@
from gnue.common.GClientApp import GClientApp
from GREngine import GREngine
import GRExceptions
-import string
+import string, sys
@@ -56,21 +56,33 @@
VERSION = "0.0.1"
COMMAND = "grrun"
NAME = "GNUe Reports Client"
- USAGE = "%s [options] file" % COMMAND
COMMAND_OPTIONS = [
- [ 'destination_type', 'O', 'destination-type', 1, 'printer', 'type',
+ [ 'destination_type', 'D', 'destination-type', 1, 'file', 'type',
'This specifies how the report should be output. The currently '
- 'supported values for <type> are printer [default], file, email, and
fax. '
- '[NOT YET IMPLEMENTED]' ],
- [ 'destination', 'o', 'destination', 1, 'lp', 'dest',
+ 'supported values for <type> are file [default], printer, email, '
+ 'and fax. Note that printer, email, and fax are sent via the '
+ 'server\'s machine, not the client\'s machine. To '
+ '\n[NOT YET IMPLEMENTED]' ],
+ [ 'destination', 'p', 'destination', 1, 'lp', 'dest',
'Where should the report be output to? The value of this '
'depends on the destination type (e.g., if sending to printer, '
- 'then -o specifies the printer name; if sending via email, then '
- '-o specifies the email address.) If <dest> is "-", then output is '
+ 'then -p specifies the printer name; if sending via email, then '
+ '-p specifies the email address.) If <dest> is "-", then output is '
'sent to stdout -- NOTE: when sending to stdout, also use the -q '
'[--quiet] option or you may get junk in your output stream. '
- '[NOT YET IMPLEMENTED]'],
- [ 'sortoption', 'S', 'sort-option', 1, '', 'sort',
+ '\n[NOT YET IMPLEMENTED]'],
+ [ 'filter', 'f', 'filter', 1, 'raw', 'filt',
+ 'Select the filter to be used to process report output. <filt> '
+ 'is the name of the filtering process as defined on the Report '
+ 'Server machine. If not specified, the "raw" filter is used '
+ '(i.e., no filtering takes place.)'],
+ [ 'list_filters', None, 'filter-list', 0, 0, None,
+ 'List the available [predefined] filters available to GNUe
Reports'],
+ [ 'filter_options', 'O', 'filter-options', 1, '', 'opts',
+ 'Options to pass to the filter process. Available options are '
+ 'specific to the filter. --filter-list will list available filters '
+ 'and their options. Example: \'--filter-options "paper=letter
margin=1,1,1,1" \''],
+ [ 'sortoption', 's', 'sort-option', 1, '', 'sort',
'Select the "sort-option" used to sort the report. '],
[ 'quiet', 'q', 'quiet', 0, 0, None,
'Run GNUe Reports in quiet mode -- i.e., display no output. '
@@ -79,6 +91,9 @@
[ 'comment', 'C', 'comment', 0, 0, None,
'Include structural comments in the XML output stream. '
'Useful for debugging .grd files.'],
+ [ 'standalone', 'S', 'standalone', 0, 0, None,
+ 'Create a standalone, single-use server instance. Use this option
in a '
+ 'non-client/server environment or in a debugging/development
environment.'],
[ 'exclude_xml', 'X', 'exclude-xml', 0, 0, None,
'Do not output GNUe Report''s runtime XML markup information. If
specified, '
'then the GRD''s layout section will be processed and output '
@@ -91,12 +106,12 @@
[ 'password', None, 'pass', 1, '', 'passwd',
'Password used to log into the database. Note that if '
'specified, this will be used for all databases. If not '
- 'supplied, the program will prompt for password. NOTE THAT '
+ 'supplied, the program will prompt for password.\nNOTE THAT '
'SUPPLYING A PASSWORD VIA THE COMMAND LINE MAY BE CONSIDERED '
'A SECURITY RISK.' ] ]
SUMMARY = \
"GNUe Reports is the primary reporting agent of the GNU Enterprise
system."
- USAGE = GClientApp.USAGE + " [param1=val] [param2=val] [...]"
+ USAGE = GClientApp.USAGE % COMMAND + " [param1=val] [param2=val] [...]"
#
# Initialize the class
@@ -118,6 +133,16 @@
def run(self):
+ #
+ # Are we doing a simple help-like operation?
+ #
+
+ # ...list available filters?
+ if self.OPTIONS["list_filters"]:
+ self.listFilters()
+ sys.exit()
+
+
# assign report file from 1st free argument
try:
reportfile = self.ARGUMENTS[0]
@@ -141,6 +166,7 @@
GDebug.printMesg(2,'Param "%s"="%s" ' % \
(string.lower(psplit[0]), psplit[1]))
+
#
# Get the user supplied sortoption
#
@@ -170,6 +196,21 @@
self.handleStartupError (msg)
except GRExceptions.ReportUnreadable, msg:
self.handleStartupError (msg)
+
+
+ #
+ # List filters available on the server
+ #
+ def listFilters(self):
+
+ # TODO: um, implement??
+
+ self.printVersion()
+
+ print "Available filters:"
+ print " raw [default] Do not process the XML with a filter. Emit raw
XML."
+ print
+
#
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/reports/src GRReport.py GRRun.py GRServer.py,
Jason Cater <=