--- htmlgen-2.2.2.orig/Formtools.py +++ htmlgen-2.2.2/Formtools.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python "Provide some supporting classes to simplify Input Forms with HTMLgen" #'$Id: Formtools.py,v 1.1 1999/04/19 23:45:36 friedric Exp friedric $' # COPYRIGHT (C) 1999 ROBIN FRIEDRICH email: Robin.Friedrich@pdq.net --- htmlgen-2.2.2.orig/HTMLcalendar.py +++ htmlgen-2.2.2/HTMLcalendar.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # COPYRIGHT (C) 1997 ROBIN FRIEDRICH # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, @@ -212,12 +211,12 @@ return value else: raise TypeError, ('cannot convert to int', value) -import regex -datepat = regex.compile('^ *\([0-9*][0-9]?\)[/-]' #first 2 char date field +import re +datepat = re.compile('^ *\([0-9*][0-9]?\)[/-]' #first 2 char date field '\([0-9][0-9]?\)[/-]?' #second 2 char date field '\([12][0-9][0-9][0-9]\)?[ \t]*:') #optional year field -daypat = regex.compile('^ *\('+string.join(day_name,'\|')+'\)') -timepat = regex.compile('\([0-9][0-9]?\):\([0-9][0-9]\)') +daypat = re.compile('^ *\('+string.join(day_name,'\|')+'\)') +timepat = re.compile('\([0-9][0-9]?\):\([0-9][0-9]\)') def read_appt_file(filename): """Parsing function. --- htmlgen-2.2.2.orig/HTMLgen.py +++ htmlgen-2.2.2/HTMLgen.py @@ -284,7 +284,7 @@ if self.meta: s.append(str(self.meta)) if self.base: s.append(str(self.base)) if self.stylesheet: - s.append('\n \n' \ + s.append('\n \n' \ % (self.stylesheet, self.stylesheet)) if self.style: s.append('\n\n' % self.style) @@ -1083,7 +1083,7 @@ Overloaded by child classes to represent other list styles. """ - return '%s
  • %s\n' % (self.pad*self.lvl, item) + return '%s
  • %s
  • \n' % (self.pad*self.lvl, item) def start_element(self): """Generic creator for the HTML element opening tag. @@ -2463,7 +2463,7 @@ import urlparse self.unparse = urlparse.urlunparse self.proto, self.node, self.path, self.params, self.query, self.fragment = \ - urlparse(url) + urlparse.urlparse(url) self.dir, self.file = self.split(self.path) def split(self, p): --- htmlgen-2.2.2.orig/HTMLtest.py +++ htmlgen-2.2.2/HTMLtest.py @@ -1,8 +1,8 @@ -#!/bin/env python +#!/usr/bin/env python """Test script which generates the online documentation for HTMLgen. """ -import string, regex, regsub, os, time, glob +import string, re, os, time, glob from HTMLcolors import * from HTMLgen import * import HTMLgen #only so I can pick off the __version__ @@ -232,11 +232,11 @@ doc.email = 'jefferson@montecello.virginia.gov' doc.logo = ('../image/eagle21.gif', 64, 54) # parse Declaration of Independence - re_hline = regex.compile('^--+$') - re_title = regex.compile('^Title:\(.*$\)') + re_hline = re.compile('^--+$') + re_title = re.compile('^Title:\(.*$\)') font2 = Font(size='+2') s = open(os.path.join(datadir, 'DoI.txt')).read() - paragraphs = regsub.split(s, '\n\([\t ]*\n\)+') + paragraphs = re.split(s, '\n\([\t ]*\n\)+') for para in paragraphs: if not para: continue if re_title.search(para) > -1: @@ -263,7 +263,7 @@ #Ok parse that file f = open(mpath(os.path.join(datadir, 'parrot.txt'))) line = f.readline() - re_dialog = regex.compile('\(^[OC].*:\)\(.*\)') + re_dialog = re.compile('\(^[OC].*:\)\(.*\)') while line: if re_dialog.search(line) > -1: role, prose = re_dialog.group(1,2) --- htmlgen-2.2.2.orig/HTMLutil.py +++ htmlgen-2.2.2/HTMLutil.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """This module provides utility functions/classes associated with HTMLgen. This is functionality use by HTMLgen script writers rather than by HTMLgen @@ -19,7 +18,7 @@ # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. __version__ = '$Id: HTMLutil.py,v 1.3 1998/05/28 20:14:52 friedric Exp $' -import string, regex, os +import string, re, os import HTMLgen, HTMLcolors from types import * @@ -79,7 +78,7 @@ """Determine if the text have been marked by a previous gsub. (ugly hack but it works) """ - if regex.search('\( -1: + if re.search('\( -1: return 1 else: return 0 @@ -125,13 +124,13 @@ not_backslash = "[^\\\\]" triple_single = "'''" triple_double = '"""' -_doc_start_re = regex.compile( +_doc_start_re = re.compile( "\(^\|" + not_backslash + "\)" # bol or not backslash + "\(" + triple_single + "\|" + triple_double + "\)" ) single_re = not_backslash + triple_single double_re = not_backslash + triple_double -_triple_re = { triple_single : regex.compile(single_re), - triple_double : regex.compile(double_re) } +_triple_re = { triple_single : re.compile(single_re), + triple_double : re.compile(double_re) } del not_backslash, triple_single, triple_double, \ single_re, double_re @@ -150,13 +149,13 @@ return (None, None) return startquote, quotefinder.regs[0][1] -string_re = regex.compile('\(\(\'[^\'\n]*\'\)\|\("[^"\n]"\)\)') +string_re = re.compile('\(\(\'[^\'\n]*\'\)\|\("[^"\n]"\)\)') def find_string_literal( s, begin=0 ): if string_re.search(s, begin) > -1: return string_re.regs[1] return (None, None) -comment_re = regex.compile('#.*$') +comment_re = re.compile('#.*$') def find_comment( s, begin=0 ): while comment_re.search(s, begin) > -1: if been_marked(comment_re.group(0)): @@ -166,13 +165,13 @@ return (None, None) Name = '[a-zA-Z_][a-zA-Z0-9_]*' -func_re = regex.compile('\(^[ \t]*def[ \t]+' +Name+ '\)[ \t]*(') +func_re = re.compile('\(^[ \t]*def[ \t]+' +Name+ '\)[ \t]*(') def find_function( s, begin=0 ): if func_re.search(s, begin) > -1: return func_re.regs[1] return (None, None) -class_re = regex.compile('\(^[ \t]*class[ \t]+' +Name+ '\)[ \t]*[(:]') +class_re = re.compile('\(^[ \t]*class[ \t]+' +Name+ '\)[ \t]*[(:]') def find_class( s, begin=0 ): if class_re.search(s, begin) > -1: return class_re.regs[1] --- htmlgen-2.2.2.orig/ImagePaletteH.py +++ htmlgen-2.2.2/ImagePaletteH.py @@ -70,7 +70,7 @@ return ImagePalette(mode, palette * len(mode)) def random(mode = "RGB"): - from whrandom import randint +# from whrandom import randint palette = map(lambda a: randint(0, 255), [0]*256*len(mode)) return ImagePalette(mode, palette) --- htmlgen-2.2.2.orig/Makefile +++ htmlgen-2.2.2/Makefile @@ -62,6 +62,16 @@ python installp.py -f $(MODULES) $(MODULESC) $(PIL) $(PILC) @echo Installation of $(PACKAGE) done. +debinstall: + if [ -z "$(PYLIBDIR)" ]; then \ + echo "Unset PYLIBDIR."; \ + exit 1; \ + fi; \ + for f in $(MODULES) $(PIL); do \ + install -m 644 $$f $(PYLIBDIR)/; \ + done + @echo Installation of $(PACKAGE) done. + checkin: ci -u $(MODULES) $(PIL) $(EXTRAS) $(TEST) Makefile --- htmlgen-2.2.2.orig/NavLinks.py +++ htmlgen-2.2.2/NavLinks.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python #'$Id: NavLinks.py,v 1.1 1999/02/04 04:54:29 friedric Exp friedric $' # COPYRIGHT (C) 1999 ROBIN FRIEDRICH email:Robin.Friedrich@pdq.net # Permission to use, copy, modify, and distribute this software and --- htmlgen-2.2.2.orig/barchart.py +++ htmlgen-2.2.2/barchart.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """Provides BarChart class which creates HTML 1D bar charts, and StackedBarChart class to deal with multiple data plotting --- htmlgen-2.2.2.orig/colorcube.py +++ htmlgen-2.2.2/colorcube.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """Utility to generate a table of browser safe colors. """ --- htmlgen-2.2.2.orig/debian/HTMLgen.pth +++ htmlgen-2.2.2/debian/HTMLgen.pth @@ -0,0 +1 @@ +HTMLgen --- htmlgen-2.2.2.orig/debian/changelog +++ htmlgen-2.2.2/debian/changelog @@ -0,0 +1,196 @@ +htmlgen (2.2.2-12.3) unstable; urgency=medium + + * Non-maintainer upload. + * Patched to make Input and Select classes support the 'ID' tag. + * Patched to replace use of whrandom (not in Python2.7) with the random module. + * Apply patches using quilt. + + -- Matthias Klose Thu, 07 Jan 2016 13:49:12 +0100 + +htmlgen (2.2.2-12.2) unstable; urgency=medium + + * Non-maintainer upload. + * Port from python-support to dh-python (Closes: #786200) + + -- Andrey Rahmatullin Mon, 24 Aug 2015 23:37:10 +0500 + +htmlgen (2.2.2-12.1) unstable; urgency=low + + * Non-maintainer upload. + * Drop useless dh_python call (Closes: #715295). + + -- Luca Falavigna Sun, 14 Jul 2013 10:09:58 +0200 + +htmlgen (2.2.2-12) unstable; urgency=low + + * Added debian/compat file and removed DH_COMPAT environment variable from + debian/rules. + * New e-mail address for maintainer. + * Moved info in README.Debian to debian/copyright (Closes: #436678) + * Removed reference to homepage in debian/control since upstream seems to + have disappeared. + * Changed Recommends: python2.3-imaging to python-imaging in debian/control. + * Cleaned up some cruft in debian/rules. + + -- Kevin Coyner Wed, 08 Aug 2007 20:27:09 -0400 + +htmlgen (2.2.2-11) unstable; urgency=low + + * New maintainer: Kevin Coyner (Closes: #379679) + * debian/control: Added homepage to Description field and + XS-Python-Version: all to Source section. + + -- Kevin Coyner Wed, 26 Jul 2006 08:09:09 -0400 + +htmlgen (2.2.2-10.2) unstable; urgency=low + + * Non-maintainer upload. + * Update package for new python policy (Closes: #373443). + + -- Pierre Habouzit Fri, 30 Jun 2006 16:02:06 +0200 + +htmlgen (2.2.2-10.1) unstable; urgency=low + + * Non-maintainer upload. + * Remove python2.{1,2}-htmlgen (Closes: #351122) + * Add python2.4-htmlgen + * Removed transitional package htmlgen (Closes: #322005) + * Build-depend on python-all-dev + * Raised debhelper compat level to 4 + * use dh_python + + -- Torsten Marek Sat, 22 Apr 2006 14:42:02 +0200 + +htmlgen (2.2.2-10) unstable; urgency=low + + * Acknowledged NMU. + * HTMLgen.py: Changed urlparse to urlparse.urlparse (closes: #197836) + * HTMLtest.py, HTMLutil.py, HTMLcalendar.py: Removed use of deprecated + regex and regsub modules, as per suggestion in #171224. I won't make + the other changes suggested in bug #171224, since one might as well + just copy the example data to a temporary directory before using it. + (closes: #171224) + + -- Peter Hawkins Sat, 10 Jul 2004 12:33:26 +1000 + +htmlgen (2.2.2-9.1) unstable; urgency=low + + * NMU to build for python2.3 as the default python version. + * Change section to `python'. + + -- Matthias Klose Tue, 19 Aug 2003 20:32:49 +0200 + +htmlgen (2.2.2-9) unstable; urgency=low + + * New maintainer: Peter Hawkins (closes: #185550) + * Major rearrangement of the package structure. Build for python2.1, + python2.2 and python2.3. Renaming of htmlgen to python-htmlgen. + (closes: #134748) + * Fixes to allow output to validate against HTML 4.0 Transitional validator + (at least for the bits I use). + * Fixed postinst script, duplicated for each package (closes: #125856) + * Fixed docbase file (closes: #148016) + * Acknowledge bugs fixed in my previous NMU (closes: #136235, #161561) + + -- Peter Hawkins Fri, 21 Mar 2003 19:12:48 +1100 + +htmlgen (2.2.2-8.2) unstable; urgency=low + + * Non-maintainer upload to fix build with python2.2 and remove python2.1 + dependencies. (closes: #136235, #161561) + + -- Peter Hawkins Tue, 24 Sep 2002 21:21:37 +1000 + +htmlgen (2.2.2-8.1) unstable; urgency=low + + * NMU to fix build with python2.1. Remove python1.5 dependencies. + + -- Matthias Klose Sat, 8 Dec 2001 01:23:48 +0100 + +htmlgen (2.2.2-8) unstable; urgency=low + + * debian/control file changed: + - htmlgen is available under python (>= 2.1) (closes: #113058) + - python-base is exchanged to python1.5 (closes: #119211) + + -- Yooseong Yang Tue, 6 Nov 2001 10:56:05 +0900 + +htmlgen (2.2.2-7) unstable; urgency=low + + * StickyForm.py code included in .deb (closes: #114195) + * Priority is changed from extra to optional (closes: #105799) + + -- Yooseong Yang Fri, 2 Nov 2001 17:44:48 +0900 + +htmlgen (2.2.2-6) unstable; urgency=low + + * Fixed architecture field in debian/control (closes: #117771) + + -- Yooseong Yang Wed, 31 Oct 2001 23:19:42 +0900 + +htmlgen (2.2.2-5) unstable; urgency=low + + * The package is adopted by Yooseong Yang (closes: #72438) + * Update download URL. + + -- Yooseong Yang Tue, 30 Oct 2001 11:08:35 +0900 + +htmlgen (2.2.2-4) unstable; urgency=low + + * debian/control: + - The package is orphaned (see bug #72438); set maintainer to QA Group. + - Policy version 3.1.1. + - Add versioned build-dependency on debhelper. + * debian/rules: + - Remove dh_testversion in favour of the build-dependency. We actually + need 2.0.40 to make sure the FHS transition works. + - Use dh_clean in clean target. + * debian/copyright: Update download URL. + + -- Colin Watson Tue, 17 Jul 2001 22:37:47 +0100 + +htmlgen (2.2.2-3) unstable; urgency=low + + * usr/doc -> usr/share/doc transition. + * Add build dependencies. + + -- Matthias Klose Fri, 7 Jan 2000 20:59:59 +0100 + +htmlgen (2.2.2-2) unstable; urgency=low + + * Change dependency from python-pil to python-imaging. + + -- Matthias Klose Sat, 4 Sep 1999 14:22:32 +0200 + +htmlgen (2.2.2-1) unstable; urgency=low + + * New upstream version. + * Fixed dependencies (closes #41334). + + -- Matthias Klose Wed, 4 Aug 1999 18:56:28 +0200 + +htmlgen (2.1-4) frozen unstable; urgency=low + + * Depends on python-pil. + * Fix path for demo script. + * Keep lintian quiet. + + -- Matthias Klose Thu, 26 Nov 1998 23:55:14 +0200 + +htmlgen (2.1-3) unstable; urgency=low + + * Changed `suggests' dependency to `pil'. + + -- Matthias Klose Tue, 11 Aug 1998 14:34:18 +0200 + +htmlgen (2.1-2) unstable; urgency=low + + * Install python files in $pylibdir/site-packages/HTMLgen. + + -- Matthias Klose Tue, 11 Aug 1998 12:34:53 +0200 + +htmlgen (2.1-1) unstable; urgency=low + + * Initial release. + + -- Matthias Klose Wed, 8 Jul 1998 19:25:03 +0200 --- htmlgen-2.2.2.orig/debian/compat +++ htmlgen-2.2.2/debian/compat @@ -0,0 +1 @@ +5 --- htmlgen-2.2.2.orig/debian/control +++ htmlgen-2.2.2/debian/control @@ -0,0 +1,28 @@ +Source: htmlgen +Section: python +Priority: optional +Maintainer: Kevin Coyner +Build-Depends: debhelper (>= 5.0.37.2) +Build-Depends-Indep: dh-python, python-all-dev (>= 2.3.5-11), quilt +XS-Python-Version: all +Standards-Version: 3.7.2 + +Package: python-htmlgen +Architecture: all +Depends: ${python:Depends} +Provides: ${python:Provides} +Replaces: htmlgen (<< 2.2.2-8.2), python2.3-htmlgen (<< 2.2.2-11), python2.4-htmlgen (<< 2.2.2-11) +Conflicts: htmlgen (<< 2.2.2-8.2), python2.3-htmlgen (<< 2.2.2-11), python2.4-htmlgen (<< 2.2.2-11) +Recommends: python-imaging +Description: Python library for the generation of HTML + HTMLgen is a class library for the generation of HTML documents with + Python scripts. It's used when you want to create HTML pages + containing information which changes from time to time. For example + you might want to have a page which provides an overall system summary + of data collected nightly. Or maybe you have a catalog of data and + images that you would like formed into a spiffy set of web pages for + the world to browse. Python is a great scripting language for these + tasks and with HTMLgen it's very straightforward to construct objects + which are rendered into consistently structured web pages. Of course, + CGI scripts written in Python can take advantage of these classes as + well. --- htmlgen-2.2.2.orig/debian/copyright +++ htmlgen-2.2.2/debian/copyright @@ -0,0 +1,27 @@ +This package was debianized by Matthias Klose , +on Thu May 28 16:34:12 MEST 1998. + +The maintainer for this package is now Kevin Coyner . + +Previous maintainers have been: +Peter Hawkins , Fri, 21 Mar 2003 19:12:48 +1100 +Yooseong Yang , Mon, 29 Oct 2001 00:25:53 +0900 +Matthias Klose , Thu May 28 16:34:12 MEST 1998 + +It was downloaded from http://starship.python.net/lib.html + +COPYRIGHT (C) 1996, 1997, 1998 ROBIN FRIEDRICH email:Robin.Friedrich@pdq.net + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear in +supporting documentation. + +THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- htmlgen-2.2.2.orig/debian/patches/fix-missing-ids +++ htmlgen-2.2.2/debian/patches/fix-missing-ids @@ -0,0 +1,50 @@ +--- htmlgen-2.2.2.orig/HTMLgen.py ++++ htmlgen-2.2.2/HTMLgen.py +@@ -1262,6 +1262,7 @@ + type -- 'TEXT' (default) Supported types include password, checkbox, + radio, file, submit, reset, hidden. + name -- provides the datum name ++ id -- global identifier + value -- the initial value of the input item + checked -- flag indicating if the item is checked initially + size -- size of the widget (e.g. size=10 for a text widget is it's width) +@@ -1286,6 +1287,7 @@ + def __init__(self, **kw): + self.type = 'TEXT' + self.name = 'Default_Name' ++ self.id = None + self.value = None + self.checked = '' + self.size = 0 +@@ -1313,6 +1315,7 @@ + s.append('\n=2 means use a list widget with that many lines. + multiple -- flag to indicate whether multiple selections are supported. +@@ -1351,6 +1355,7 @@ + def __init__(self, data=None, **kw): + UserList.UserList.__init__(self, data) + self.name = '' ++ self.id = None + self.size = 1 + self.multiple = None + self.selected = [] +@@ -1366,6 +1371,7 @@ + def __str__(self): + s = ['