[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/reports/src/adapters/filters/SimpleTabulat...
From: |
Bajusz Tamás |
Subject: |
gnue/reports/src/adapters/filters/SimpleTabulat... |
Date: |
Tue, 10 Jun 2003 13:45:42 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Branch:
Changes by: Bajusz Tamás <address@hidden> 03/06/10 13:45:42
Modified files:
reports/src/adapters/filters/SimpleTabulation/tabulator/formatters:
html.py
Log message:
just converting all CRCRLF to CRLF
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/formatters/html.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index:
gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/formatters/html.py
diff -c
gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/formatters/html.py:1.3
gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/formatters/html.py:1.4
***
gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/formatters/html.py:1.3
Wed Jan 1 19:45:49 2003
---
gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/formatters/html.py
Tue Jun 10 13:45:42 2003
***************
*** 1,182 ****
! #
! # This file is part of GNU Enterprise.
! #
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
! # version 2, or (at your option) any later version.
! #
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
! # PURPOSE. See the GNU General Public License for more details.
! #
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
! # - Suite 330, Boston, MA 02111-1307, USA.
! #
! # Copyright 2002-2003 Free Software Foundation
! #
! # FILE:
! # direct/formatters/html.py
! #
! # DESCRIPTION:
! # Transforms adapter for direct
! #
! # NOTES:
! #
!
! class DirectFormatter:
!
! def __init__(self, destination, stylesheet, options={}):
! self.dest = destination
! self.options = options
!
! self._reporttitle = ''
! self._sectiontitle = ''
! self.stylesheet = stylesheet
!
! def BeginReport(self):
! try:
! css = open(self.stylesheet,'r')
! style = ''.join(css.readlines())
! except:
! print "Error processing css file: %s" % self.stylesheet
! css = None
! style = STYLE
!
! if css:
! css.close()
!
! self.dest.write('<html>\n')
! self.dest.write(' <head>\n')
! self.dest.write(' <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>\n')
! self.dest.write(' <style>\n%s </style>\n' % style)
! self.dest.write( ' </head>\n')
! self.dest.write(' <body>\n')
!
! def EndReport(self):
! self.dest.write(' </body>\n')
! self.dest.write('</html>')
!
! def BeginReportTitle(self):
! pass
!
! def EndReportTitle(self, reporttitle):
! self._reporttitle = reporttitle
! self.dest.write(' <h1>%s</h1>\n<hr>\n' % self._reporttitle)
!
! def BeginSection(self):
! pass
!
! def EndSection(self):
! pass
!
! def BeginSectionTitle(self):
! pass
!
! def EndSectionTitle(self, sectiontitle):
! self._sectiontitle = sectiontitle
! self.dest.write(' <h2>%s</h2>\n' % self._sectiontitle)
!
! def BeginTable(self):
! self._odd = 1
! self.dest.write(' <table>\n')
!
! def EndTable(self):
! self.dest.write(' </table>\n')
!
! def BeginTableHead(self):
! self._colalign = []
! self.dest.write(' <tr>\n')
!
! def EndTableHead(self):
! self.dest.write(' </tr>\n')
!
! def BeginColHead(self):
! self.dest.write(' <th ')
!
! def EndColHead(self, colhead, width, alignment=None):
! self._colalign.append(alignment)
! self.dest.write('align="%s">%s</th>\n' % (alignment, colhead))
!
! def BeginRow(self, rowtype=None):
! self._rowtype = rowtype
! if self._rowtype == 'subtotal':
! self.dest.write(' <tr class="subtotal">\n')
! else:
! if self._odd:
! self.dest.write(' <tr class="odditem">\n')
! else:
! self.dest.write(' <tr class="item">\n')
!
! def EndRow(self, rowtype=None):
! self._odd = not self._odd
! self.dest.write(' </tr>\n')
!
! def BeginCol(self):
! if self._rowtype == 'subtotal':
! self.dest.write(' <td class="subtotal" ')
! else:
! self.dest.write(' <td class="item" ')
!
! def EndCol(self, col, index):
! self.dest.write('align="%s">%s</td>\n' % (self._colalign[index], col))
!
!
! STYLE = """body {
! font-face: sans-serif;
! }
! table {
! width: 80%;
! margin-left: 10%;
! margin-right: 10%;
! border-spacing: 0;
! border-collapse: collapse;
! }
! tr.odditem {
! padding: 0.5em;
! background : lightgrey;
! color : black;
! }
! tr.subtotal {
! font-weight : bold;
! }
! td {
! padding: 0.5em;
! }
! td.item {
! padding: 0.5em;
! }
! td.subtotal {
! padding: 0.5em;
! border-style: solid;
! border-width: medium;
! border-color: black;
! border-left: 0;
! border-right: 0;
! }
! th {
! padding: 0.5em;
! border-style: solid;
! border-width: thin;
! border-color: black;
! background : black;
! color : white;
! }
! h1 {
! text-align: center;
! }
! h2 {
! margin-left: 5%;
! margin-right: 5%;
! text-align: left;
! }
! hr {
! margin-left: 5%;
! margin-right: 5%;
! }
! """
!
!
--- 1,182 ----
! #
! # This file is part of GNU Enterprise.
! #
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
! # version 2, or (at your option) any later version.
! #
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
! # PURPOSE. See the GNU General Public License for more details.
! #
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
! # - Suite 330, Boston, MA 02111-1307, USA.
! #
! # Copyright 2002-2003 Free Software Foundation
! #
! # FILE:
! # direct/formatters/html.py
! #
! # DESCRIPTION:
! # Transforms adapter for direct
! #
! # NOTES:
! #
!
! class DirectFormatter:
!
! def __init__(self, destination, stylesheet, options={}):
! self.dest = destination
! self.options = options
!
! self._reporttitle = ''
! self._sectiontitle = ''
! self.stylesheet = stylesheet
!
! def BeginReport(self):
! try:
! css = open(self.stylesheet,'r')
! style = ''.join(css.readlines())
! except:
! print "Error processing css file: %s" % self.stylesheet
! css = None
! style = STYLE
!
! if css:
! css.close()
!
! self.dest.write('<html>\n')
! self.dest.write(' <head>\n')
! self.dest.write(' <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>\n')
! self.dest.write(' <style>\n%s </style>\n' % style)
! self.dest.write( ' </head>\n')
! self.dest.write(' <body>\n')
!
! def EndReport(self):
! self.dest.write(' </body>\n')
! self.dest.write('</html>')
!
! def BeginReportTitle(self):
! pass
!
! def EndReportTitle(self, reporttitle):
! self._reporttitle = reporttitle
! self.dest.write(' <h1>%s</h1>\n<hr>\n' % self._reporttitle)
!
! def BeginSection(self):
! pass
!
! def EndSection(self):
! pass
!
! def BeginSectionTitle(self):
! pass
!
! def EndSectionTitle(self, sectiontitle):
! self._sectiontitle = sectiontitle
! self.dest.write(' <h2>%s</h2>\n' % self._sectiontitle)
!
! def BeginTable(self):
! self._odd = 1
! self.dest.write(' <table>\n')
!
! def EndTable(self):
! self.dest.write(' </table>\n')
!
! def BeginTableHead(self):
! self._colalign = []
! self.dest.write(' <tr>\n')
!
! def EndTableHead(self):
! self.dest.write(' </tr>\n')
!
! def BeginColHead(self):
! self.dest.write(' <th ')
!
! def EndColHead(self, colhead, width, alignment=None):
! self._colalign.append(alignment)
! self.dest.write('align="%s">%s</th>\n' % (alignment, colhead))
!
! def BeginRow(self, rowtype=None):
! self._rowtype = rowtype
! if self._rowtype == 'subtotal':
! self.dest.write(' <tr class="subtotal">\n')
! else:
! if self._odd:
! self.dest.write(' <tr class="odditem">\n')
! else:
! self.dest.write(' <tr class="item">\n')
!
! def EndRow(self, rowtype=None):
! self._odd = not self._odd
! self.dest.write(' </tr>\n')
!
! def BeginCol(self):
! if self._rowtype == 'subtotal':
! self.dest.write(' <td class="subtotal" ')
! else:
! self.dest.write(' <td class="item" ')
!
! def EndCol(self, col, index):
! self.dest.write('align="%s">%s</td>\n' % (self._colalign[index], col))
!
!
! STYLE = """body {
! font-face: sans-serif;
! }
! table {
! width: 80%;
! margin-left: 10%;
! margin-right: 10%;
! border-spacing: 0;
! border-collapse: collapse;
! }
! tr.odditem {
! padding: 0.5em;
! background : lightgrey;
! color : black;
! }
! tr.subtotal {
! font-weight : bold;
! }
! td {
! padding: 0.5em;
! }
! td.item {
! padding: 0.5em;
! }
! td.subtotal {
! padding: 0.5em;
! border-style: solid;
! border-width: medium;
! border-color: black;
! border-left: 0;
! border-right: 0;
! }
! th {
! padding: 0.5em;
! border-style: solid;
! border-width: thin;
! border-color: black;
! background : black;
! color : white;
! }
! h1 {
! text-align: center;
! }
! h2 {
! margin-left: 5%;
! margin-right: 5%;
! text-align: left;
! }
! hr {
! margin-left: 5%;
! margin-right: 5%;
! }
! """
!
!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/reports/src/adapters/filters/SimpleTabulat...,
Bajusz Tamás <=