You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
(22) |
Apr
(10) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(23) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
(1) |
May
|
Jun
|
Jul
(10) |
Aug
|
Sep
(5) |
Oct
(5) |
Nov
|
Dec
(1) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
(15) |
Jul
(10) |
Aug
|
Sep
(2) |
Oct
(10) |
Nov
(1) |
Dec
(4) |
2005 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Fred L. D. <fd...@us...> - 2003-07-29 20:29:44
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv487 Modified Files: htwf.py Log Message: add an XHTML-specific sanity check: tag and attribute names should be lower case Index: htwf.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/htwf.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** htwf.py 25 Jul 2003 05:22:39 -0000 1.1 --- htwf.py 29 Jul 2003 20:29:41 -0000 1.2 *************** *** 60,67 **** --- 60,78 ---- newtext = g.makepage() p = expat.ParserCreate() + p.StartElementHandler = self.startElement try: p.Parse(newtext, 1) except expat.ExpatError, e: print e + except RuntimeError, e: + print e + + def startElement(self, name, attrs): + if not name.islower(): + raise RuntimeError("found non-lowercase tag name: " + `name`) + for attrname in attrs.keys(): + if not attrname.islower(): + raise RuntimeError("found non-lowercase attribute name: " + + `attrname`) |
From: Fred L. D. <fd...@us...> - 2003-07-29 15:34:29
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv28676 Modified Files: HTParser.py Log Message: Fill in additional information from index.ht; this allows the author and author-email to be loaded from a single place for the entire directory. Specific files can still override this if desired. Index: HTParser.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/HTParser.py,v retrieving revision 2.0 retrieving revision 2.1 diff -C2 -d -r2.0 -r2.1 *** HTParser.py 22 Mar 2002 17:45:40 -0000 2.0 --- HTParser.py 29 Jul 2003 15:34:26 -0000 2.1 *************** *** 8,14 **** from types import StringType - class HTParser(rfc822.Message): def __init__(self, filename, default_author=None, default_email=None): self.__filename = filename --- 8,16 ---- from types import StringType class HTParser(rfc822.Message): + + DEFAULTS_FILE = "index.ht" + def __init__(self, filename, default_author=None, default_email=None): self.__filename = filename *************** *** 16,25 **** self.__extraheaders = {} rfc822.Message.__init__(self, fp) # Massage some standard headers we require. # # title if not self.has_key('title'): ! parts = self.__filename.split(os.sep) ! self.__extraheaders['title'] = parts[-1] # author if not self.has_key('author'): --- 18,29 ---- self.__extraheaders = {} rfc822.Message.__init__(self, fp) + basename = os.path.basename(self.__filename) # Massage some standard headers we require. # # title if not self.has_key('title'): ! self.__extraheaders['title'] = basename ! if basename != self.DEFAULTS_FILE: ! self.__load_defaults() # author if not self.has_key('author'): *************** *** 57,61 **** # might be using an older rfc822 def get(self, name, default=None): ! if self.has_key(name): return self.getheader(name) elif self.__extraheaders.has_key(name): --- 61,65 ---- # might be using an older rfc822 def get(self, name, default=None): ! if rfc822.Message.has_key(self, name): return self.getheader(name) elif self.__extraheaders.has_key(name): *************** *** 64,67 **** --- 68,75 ---- return default + def has_key(self, name): + return (rfc822.Message.has_key(self, name) + or self.__extraheaders.has_key(name)) + def process_sidebar(self): # first process all link files. Either we hard code the use of *************** *** 87,91 **** self.sidebar.append(('mailto:' + email, author)) ! # regular expressions used in massage() cre = re.compile( r'(<h3>(?P<h3>.*?)</h3>)|' --- 95,109 ---- self.sidebar.append(('mailto:' + email, author)) ! def __load_defaults(self): ! dir = os.path.dirname(self.__filename) ! if not os.path.isfile(os.path.join(dir, self.DEFAULTS_FILE)): ! return ! fp = open(os.path.join(dir, self.DEFAULTS_FILE)) ! msg = rfc822.Message(fp) ! for k, v in msg.items(): ! if not self.__extraheaders.has_key(k): ! self.__extraheaders[k] = v ! ! # regular expressions used in __parse() cre = re.compile( r'(<h3>(?P<h3>.*?)</h3>)|' |
From: Fred L. D. <fd...@us...> - 2003-07-29 05:31:12
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv18615 Modified Files: Sidebar.py Log Message: Fix well-formedness error in sidebar generation. Index: Sidebar.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/Sidebar.py,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -d -r2.4 -r2.5 *** Sidebar.py 27 Mar 2002 03:59:48 -0000 2.4 --- Sidebar.py 29 Jul 2003 05:31:09 -0000 2.5 *************** *** 64,68 **** if done_one: # get some separation between header and last item ! print '<tr><td bgcolor="%s"> ' % ( self.get_lightshade()) else: --- 64,68 ---- if done_one: # get some separation between header and last item ! print '<tr><td bgcolor="%s"> </td></tr>' % ( self.get_lightshade()) else: |
From: Fred L. D. <fd...@us...> - 2003-07-25 05:22:42
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv14168 Added Files: htwf.py Log Message: Script to check the XML well-formedness of the result of a conversion. This doesn't check that the documnet "makes sense" as XHTML, only that it's well-formed (tags are properly nested, empty tags use empty element notation, attributes are properly quoted, etc.). --- NEW FILE: htwf.py --- #! /usr/bin/env python """Check the well-formedness of a .ht file used to generate XHTML. Usage: %(program)s [options] file1 [file2 [...]] Where options are: --rootdir <directory> -r <directory> Specify the root of the Web page hierarchy. Otherwise the current directory is used. --style <classmod> -s <classmod> specifies the generator `style'. classmod is both a module name and a class name. The module is imported (so it must be findable on your sys.path) and the class is dug out of that module (so they must have the same name). This class is instantiated by passing the following arguments: file -- the .ht file to be parsed rootdir -- as specified above relthis -- the directory path to get from rootdir to the current directory. Note that rootdir must be a direct parent of the current directory. file should be passed to HTParser to create an instance of the file parser. Your class should also create a LinkFixer using (the .html version of) file, rootdir, and relthis. --version -v Print the version number of this tool and exit. --quiet -q Be quiet. --help -h print this message and exit. """ from xml.parsers import expat import ht2html __version__ = ht2html.__version__ class HTWF(ht2html.Command): def process_file(self, file): if not self.quiet: print 'Checking %s...' % file g = self.get_generator(file) if g is None: return newtext = g.makepage() p = expat.ParserCreate() try: p.Parse(newtext, 1) except expat.ExpatError, e: print e if __name__ == "__main__": HTWF().main() |
From: Fred L. D. <fd...@us...> - 2003-07-25 05:20:24
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv13554 Modified Files: ht2html.py Log Message: substantial refactoring to allow portions of this to be re-used Index: ht2html.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/ht2html.py,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -d -r2.1 -r2.2 *** ht2html.py 22 Mar 2002 18:03:40 -0000 2.1 --- ht2html.py 25 Jul 2003 05:20:18 -0000 2.2 *************** *** 69,91 **** ! ! def usage(code, msg=''): ! print __doc__ % globals() ! if msg: ! print msg ! sys.exit(code) ! ! ! ! def main(): ! try: ! opts, args = getopt.getopt( ! sys.argv[1:], ! 'hr:s:bx:fqv', ! ['help', 'rootdir=', 'style=', 'backup', 'backupext=', ! 'force', 'quiet', 'version']) ! ! except getopt.error, msg: ! usage(1, msg) rootdir = '.' --- 69,73 ---- ! class Command: rootdir = '.' *************** *** 96,104 **** quiet = 0 ! for opt, arg in opts: if opt in ('-h', '--help'): ! usage(0) elif opt in ('-v', '--version'): ! print 'ht2html version', __version__ sys.exit(0) elif opt in ('-r', '--rootdir'): --- 78,107 ---- quiet = 0 ! def __init__(self): ! self.short_opts = 'hr:s:qv' ! self.long_opts = ['help', 'rootdir=', 'style=', 'quiet', 'version'] ! ! def usage(self, code, msg=''): ! import __main__ ! if code: ! f = sys.stderr ! else: ! f = sys.stdout ! print >>f, __main__.__doc__ % globals() ! if msg: ! print >>f, msg ! sys.exit(code) ! ! def add_option(self, short, long): ! if short: ! self.short_opts = self.short_opts + short ! if long: ! self.long_opts.append(long) ! ! def handle_option(self, opt, arg): if opt in ('-h', '--help'): ! self.usage(0) elif opt in ('-v', '--version'): ! print program, 'version', __version__ sys.exit(0) elif opt in ('-r', '--rootdir'): *************** *** 107,149 **** ## rootdir = os.path.join(os.getcwd(), rootdir) ## rootdir = os.path.normpath(rootdir) ! rootdir = arg elif opt in ('-s', '--style'): ! classmod = arg ! elif opt in ('-b', '--backup'): ! backup = 1 ! elif opt in ('-x', '--backupext'): ! backupext = arg ! elif opt in ('-f', '--force'): ! force = 1 elif opt in ('-q', '--quiet'): ! quiet = 1 ! # find current dir relative to rootdir ! absroot = os.path.abspath(rootdir) ! curdir = os.path.abspath('.') ! prefix = os.path.commonprefix([absroot, curdir]) ! if prefix <> absroot: ! usage(1, 'Root directory must be relative to current directory') ! relthis = curdir[len(prefix)+1:] ! if not relthis: ! relthis = '.' ! # get the generator class ! m = __import__(classmod) ! GenClass = getattr(m, classmod) ! # process all the files on the command line ! for file in args: ! if not quiet: ! print 'Processing %s...' % file ! # get the target filename ! root, ext = os.path.splitext(file) ! htmlfile = root + '.html' try: ! g = GenClass(file, rootdir, relthis) except IOError, msg: print 'The source file is unreadable, skipping:', file print msg ! continue # deal with backups, first load the original file try: --- 110,191 ---- ## rootdir = os.path.join(os.getcwd(), rootdir) ## rootdir = os.path.normpath(rootdir) ! self.rootdir = arg elif opt in ('-s', '--style'): ! self.classmod = arg elif opt in ('-q', '--quiet'): ! self.quiet = 1 ! def parse_options(self, args): ! try: ! opts, args = getopt.getopt(args, self.short_opts, self.long_opts) ! except getopt.error, err: ! self.usage(2, str(err)) ! else: ! self.args = args ! for opt, arg in opts: ! self.handle_option(opt, arg) ! def main(self, args=None): ! if args is None: ! args = sys.argv[1:] ! self.parse_options(args) ! # find current dir relative to rootdir ! self.absroot = os.path.abspath(self.rootdir) ! self.curdir = os.path.abspath(os.curdir) ! self.prefix = os.path.commonprefix([self.absroot, self.curdir]) ! if self.prefix != self.absroot: ! usage(1, 'Root directory must be relative to current directory') ! self.relthis = self.curdir[len(self.prefix)+1:] ! if not self.relthis: ! self.relthis = os.curdir ! ! # get the generator class ! m = __import__(self.classmod) ! self.GenClass = getattr(m, self.classmod) ! ! self.run() ! ! def get_generator(self, file): try: ! return self.GenClass(file, self.rootdir, self.relthis) except IOError, msg: print 'The source file is unreadable, skipping:', file print msg ! return None ! ! def run(self): ! # process all the files on the command line ! for file in self.args: ! self.process_file(file) ! ! ! class HT2HTML(Command): ! ! def __init__(self): ! Command.__init__(self) ! self.add_option('b', 'backup') ! self.add_option('x', 'backupext=') ! self.add_option('f', 'force') ! ! def handle_option(self, opt, arg): ! if opt in ('-b', '--backup'): ! self.backup = 1 ! elif opt in ('-x', '--backupext'): ! self.backupext = arg ! elif opt in ('-f', '--force'): ! self.force = 1 ! else: ! Command.handle_option(self, opt, arg) ! ! def process_file(self, file): ! if not self.quiet: ! print 'Processing %s...' % file ! # get the target filename ! root, ext = os.path.splitext(file) ! htmlfile = root + '.html' ! g = self.get_generator(file) ! if g is None: ! return # deal with backups, first load the original file try: *************** *** 157,169 **** if origfound and newtext == data: # the file hasn't changed. only write it if forced to ! if not force: ! continue try: omask = os.umask(002) ! if origfound and backup: fp = open(htmlfile + '.generated', 'w') fp.write(newtext) fp.close() ! os.rename(htmlfile, htmlfile + backupext) os.rename(htmlfile + '.generated', htmlfile) else: --- 199,211 ---- if origfound and newtext == data: # the file hasn't changed. only write it if forced to ! if not self.force: ! return try: omask = os.umask(002) ! if origfound and self.backup: fp = open(htmlfile + '.generated', 'w') fp.write(newtext) fp.close() ! os.rename(htmlfile, htmlfile + self.backupext) os.rename(htmlfile + '.generated', htmlfile) else: *************** *** 177,180 **** raise if __name__ == '__main__': ! main() --- 219,223 ---- raise + if __name__ == '__main__': ! HT2HTML().main() |
From: Fred L. D. <fd...@us...> - 2003-07-25 04:59:57
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv9708 Modified Files: PDOGenerator.py Skeleton.py Log Message: Make it possible to generate well-formed XHTML using PDOGenerator. Index: PDOGenerator.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/PDOGenerator.py,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -d -r2.11 -r2.12 *** PDOGenerator.py 9 Feb 2003 16:35:26 -0000 2.11 --- PDOGenerator.py 25 Jul 2003 04:59:52 -0000 2.12 *************** *** 46,50 **** <center> <img alt="" border="0" ! src="%(rootdir)s/pics/PythonPoweredSmall.gif"></center> ''' % self.__d)) p.sidebar.append(BLANKCELL) --- 46,50 ---- <center> <img alt="" border="0" ! src="%(rootdir)s/pics/PythonPoweredSmall.gif" /></center> ''' % self.__d)) p.sidebar.append(BLANKCELL) *************** *** 72,76 **** def get_meta(self): ! favicon = '\n<link rel="SHORTCUT ICON" href="/pics/pyfav.gif">' s1 = Skeleton.get_meta(self) s2 = self.__parser.get('meta', '') --- 72,76 ---- def get_meta(self): ! favicon = '\n<link rel="SHORTCUT ICON" href="/pics/pyfav.gif" />' s1 = Skeleton.get_meta(self) s2 = self.__parser.get('meta', '') *************** *** 115,119 **** <a href="%(rootdir)s/"> <img alt="" border="0" ! src="%(rootdir)s/pics/%(banner)s"></a></center>''' % \ self.__d --- 115,119 ---- <a href="%(rootdir)s/"> <img alt="" border="0" ! src="%(rootdir)s/pics/%(banner)s" /></a></center>''' % \ self.__d Index: Skeleton.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/Skeleton.py,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -d -r2.9 -r2.10 *** Skeleton.py 3 Apr 2002 23:01:12 -0000 2.9 --- Skeleton.py 25 Jul 2003 04:59:52 -0000 2.10 *************** *** 80,84 **** """Return extra meta-data. Must be a string.""" import __main__ ! return '<meta name="generator" content="HT2HTML/%s">' \ % __main__.__version__ --- 80,84 ---- """Return extra meta-data. Must be a string.""" import __main__ ! return '<meta name="generator" content="HT2HTML/%s" />' \ % __main__.__version__ *************** *** 256,260 **** def __do_body(self, body): print '<!-- start of body cell -->' ! print '<td valign="top" width="%s%%" class="body"><br>' % ( self.get_banner_width()) print body --- 256,260 ---- def __do_body(self, body): print '<!-- start of body cell -->' ! print '<td valign="top" width="%s%%" class="body"><br />' % ( self.get_banner_width()) print body *************** *** 273,277 **** """Return the HTML <head> stuff.""" print '''\ ! <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> %(xmlstyle)s<html> <!-- THIS PAGE IS AUTOMATICALLY GENERATED. DO NOT EDIT. --> --- 273,278 ---- """Return the HTML <head> stuff.""" print '''\ ! <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ! "http://www.w3.org/TR/html4/loose.dtd" > %(xmlstyle)s<html> <!-- THIS PAGE IS AUTOMATICALLY GENERATED. DO NOT EDIT. --> *************** *** 286,290 **** <head> <title>%(title)s</title> ! <meta http-equiv="Content-Type" content="text/html; charset=%(charset)s"> %(meta)s %(style)s --- 287,291 ---- <head> <title>%(title)s</title> ! <meta http-equiv="Content-Type" content="text/html; charset=%(charset)s" /> %(meta)s %(style)s *************** *** 308,312 **** stylesheet = stylesheet.strip() type = self.get_stylesheet_type(stylesheet) ! s = '<link rel="STYLESHEET" href="%s" type="%s">' \ % (stylesheet, type) if localstyle and localstyle.strip(): --- 309,313 ---- stylesheet = stylesheet.strip() type = self.get_stylesheet_type(stylesheet) ! s = '<link rel="STYLESHEET" href="%s" type="%s" />' \ % (stylesheet, type) if localstyle and localstyle.strip(): |
From: Barry A. W. <bw...@us...> - 2003-04-04 22:50:37
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv15914 Modified Files: BAWGenerator.py Log Message: Migrate to ba...@wa... Index: BAWGenerator.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/BAWGenerator.py,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -d -r2.1 -r2.2 *** BAWGenerator.py 26 Mar 2002 04:25:36 -0000 2.1 --- BAWGenerator.py 4 Apr 2003 22:50:33 -0000 2.2 *************** *** 28,32 **** root, ext = os.path.splitext(file) html = root + '.html' ! p = self.__parser = HTParser(file, 'Barry A. Warsaw', 'ba...@wo...') f = self.__linkfixer = LinkFixer(html, rootdir, relthis) p.process_sidebar() --- 28,33 ---- root, ext = os.path.splitext(file) html = root + '.html' ! p = self.__parser = HTParser(file, 'Barry A. Warsaw', ! 'ba...@wa...') f = self.__linkfixer = LinkFixer(html, rootdir, relthis) p.process_sidebar() |
From: Gre7g L. <gr...@wo...> - 2003-03-08 15:29:19
|
TMDA'ers and HT2HTML'ers - I think I'm finally finished modifying both ht2html and our documentation generator classmod. Please take a moment to surf over to http://lazarus.wolfhome.com/~gre7g/tmda/ and give me any opinions you have on this proposed look. I have not surfed this in other browsers yet, so I won't be surprised if there are browser-specific formatting issues. If it appears to render poorly in your browser, please let me know what you are using and mail me a screenshot. All feedback is welcome. For those of you tech weenies that want to see how this was done, you'll need the following files... Three modified ht2html files: http://lazarus.wolfhome.com/~gre7g/ht2html_mods.tgz A copy of the htdocs directory I used: http://lazarus.wolfhome.com/~gre7g/new_htdocs.tgz I didn't touch the Makefile, but I made a lot of mods to TMDAGenerator.py, added an image/stylesheet directory in layout/, and created a dynamic image generator in dyn_buttons/. The <puke!> Perl script in dyn_buttons/ will only be run if you change the mirrors list or the top-level topics, so generally speaking, you should be able to make the new documentation set if you could make the old one. For those of you liable to add mirrors, change top-level buttons, or who just like to see how things work, you'll need to have ImageMagick (http://imagemagick.org) and PerlMagick (http://imagemagick.org/www/perl.html) installed. The code in dyn_buttons/compose.pl is rather crude, but [1] it works, [2] it generates nicer looking images than by using freetype2, and [3] unlike PythonMagick, PerlMagick is stable and works. Finally, do you prefer the coffee look over the blue that I proposed aeons ago? Gre7g. ================================================================= Gre7g Luterman gr...@wo... http://www.templeofluna.com/ Stay informed: http://www.templeofluna.com/keeper/mailinglist.htm Please make sure all emotional baggage is stowed securely in the overhead compartment or underneath the seat in front of you. |
From: Gre7g L. <gr...@wo...> - 2003-03-06 18:12:26
|
Barry suggested that I introduce myself to the list and tell you guys what I'm up to. My name is Gre7g Luterman and I'm working on a proposal to revamp the tmda.net site. I'm trying to bring it from being purely text-based to giving it more of a modern, graphic-oriented look. As you may know, tmda.net uses ht2html to generate the navigation for the site. For the most part, ht2html will do what I want, but it makes a few assumptions that I couldn't have. For example, assuming a width for the sidebar and assuming that a spacer should be placed between topics. I've added methods to override these assumptions. At this point, I've almost finished my patches and they are really not as drastic as I had feared they would be. I've had to make a handful of changes to Sidebar.py and Skeleton.py. With luck, they are still backward compatible. I believe they still are, but when I'm done, we'll want to run regression tests to make sure that the new code still generates comparable HTML with old settings/files. For those who are interested, here's some URLs you may look at: The original site: http://tmda.sourceforge.net/ The look I'm going for: http://wolfhome.com/~gre7g/layout2.htm What I have so far: http://lazarus.wolfhome.com/~gre7g/tmda/ Like I said, it's almost there. I'm still working on making a collapse-able menu in the sidebar and clearly some of the topics will need to be wrapped to keep them from bleeding into the body region. Additionally, I've written Perl <retch!> code to dynamically generate the text for the topic buttons and the mirror list at the top. This will still need to be integrated into either the make file or the classmod (preferrably the classmod as I prefer working in Python over messing with Makefile's). When I'm done, I'll submit the patches and a copy of the TMDA site design so you can see how I'm doing what I do. Feedback is welcome. Gre7g. ================================================================= Gre7g Luterman gr...@wo... http://www.templeofluna.com/ Stay informed: http://www.templeofluna.com/keeper/mailinglist.htm If it weren't for sex, none of us would be here. And of course, by 'here' I mean 'on the internet'. |
From: <ba...@zo...> - 2003-03-05 18:41:41
|
I answered these in private email, so let me repeat myself... GL> Question 1: (licence) GL> Is ht2html open source? It has all the appearances of an open GL> source project, but I don't see any agreement in any of the GL> downloaded files or on any of the webpages. May I freely GL> modify this, distribute patches, or would it be best for me to GL> join the ht2html group so I can submit CVS changes for added GL> features? It is open source, and should be considered to be covered under the PSF license (with the words Python scratched out and the words HT2HTML written in in crayon). GL> Question 2: (practical) GL> I want to switch TMDA's design over from purely text-based: GL> http://tmda.sourceforge.net/ GL> To something a little more graphical: GL> http://wolfhome.com/~gre7g/layout2.htm GL> This shouldn't be too impossible, but ht2html makes a bunch of GL> assumptions that will sabotage the process (such as fixed size GL> spacers). Clearly those pieces of code would have to be GL> overridden or changed to make this work. Do you know anyone GL> who has done this before or would I be breaking new ground? You'd probably be breaking new ground. GL> Question 3: (philosophical) GL> I understand that ht2html allows us to build a class that can GL> then override various portions of the output, but I was GL> wondering why you chose to do this with with functions? GL> In other words, why have functions like get_style(), GL> get_stylesheet(), get_banner(), etc. that only return a GL> string? Wouldn't it have been simpler and more GL> straightforward to just keep a class with a bunch of class GL> constants such as style, stylesheet, banner, etc. and then GL> allow us to overload these values? It seems to me that it GL> would be simpler and more straightforward to define values GL> than functions. It also makes more readible code to pull out GL> variables than functions. Mostly historical baggage from the earlier implementations. I won't make any claims about the cleanliness or flexibility of the code, just that it's been Good Enough for our purposes up to now. -Barry |
From: Gre7g L. <gre...@wo...> - 2003-03-04 17:07:14
|
I've been using ht2html for a while now. I contribute to TMDA and as you may know, they use it to generate their web pages. Question 1: (licence) Is ht2html open source? It has all the appearances of an open source project, but I don't see any agreement in any of the downloaded files or on any of the webpages. May I freely modify this, distribute patches, or would it be best for me to join the ht2html group so I can submit CVS changes for added features? Question 2: (practical) I want to switch TMDA's design over from purely text-based: http://tmda.sourceforge.net/ To something a little more graphical: http://wolfhome.com/~gre7g/layout2.htm This shouldn't be too impossible, but ht2html makes a bunch of assumptions that will sabotage the process (such as fixed size spacers). Clearly those pieces of code would have to be overridden or changed to make this work. Do you know anyone who has done this before or would I be breaking new ground? Question 3: (philosophical) I understand that ht2html allows us to build a class that can then override various portions of the output, but I was wondering why you chose to do this with with functions? In other words, why have functions like get_style(), get_stylesheet(), get_banner(), etc. that only return a string? Wouldn't it have been simpler and more straightforward to just keep a class with a bunch of class constants such as style, stylesheet, banner, etc. and then allow us to overload these values? It seems to me that it would be simpler and more straightforward to define values than functions. It also makes more readible code to pull out variables than functions. Thanks in advance for any insight, Gre7g. ================================================================= Gre7g Luterman gr...@wo... http://www.templeofluna.com/ Stay informed: http://www.templeofluna.com/keeper/mailinglist.htm If it weren't for sex, none of us would be here. And of course, by 'here' I mean 'on the internet'. |
From: Fred L. D. <fd...@us...> - 2003-02-09 16:35:29
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv12852 Modified Files: PDOGenerator.py Log Message: Use a different location for the CSS style sheet. Index: PDOGenerator.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/PDOGenerator.py,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -d -r2.10 -r2.11 *** PDOGenerator.py 4 Nov 2002 15:45:35 -0000 2.10 --- PDOGenerator.py 9 Feb 2003 16:35:26 -0000 2.11 *************** *** 92,96 **** def get_stylesheet(self): ! return posixpath.join(self.__d['rootdir'], 'style.css') def get_title(self): --- 92,96 ---- def get_stylesheet(self): ! return posixpath.join(self.__d['rootdir'], 'css', 'ht2html.css') def get_title(self): |
From: David G. <go...@py...> - 2002-11-18 01:55:40
|
The original didn't make it to the list, probably due to the "members-only" posting policy. Is that for spam prevention? From: "Oliver Rutherfurd" <ol...@ru...> Date: Tue, 12 Nov 2002 10:26:36 -0500 To: <doc...@li...>, <ht2...@li...> Subject: [Docutils-develop] using reStructuredText with ht2html Hi All, I've written a guide explaining how I'm using reStructuredText with ht2html to create my website. For anyone interested in reading it, the article can be found here: http://www.rutherfurd.net/articles/rst-ht2html.html Thanks to David Goodger for his feedback on this article. Comments and criticism welcome! -Ollie ol...@ru... |
From: David G. <go...@py...> - 2002-11-08 23:12:30
|
Fred L. Drake, Jr. wrote: > Is the goal to have the content portion of .ht files be reST, or to > allow HT2HTML to start with reST content to begin with? What's the distinction? Actually, the Docutils component that Oliver wrote produces ordinary .ht intermediate files: RFC822 headers plus regular HTML. It's an ht2html "Writer". The way it's written now, one would have to run Docutils and then ht2html. It would almost require a Makefile. Not ideal. But it should be easy to make an ht2html "Reader" (Docutils code calls ht2html) or a generator module for ht2html (which would call Docutils code). One of these days I'd like to actually *use* ht2html, and dig through the code; then I'll have a better idea of which side should be "in control". > I'm sure either could be done, but using .ht files with reST for the > body would be the easier of the two. Yes, they would look *exactly* like reStructuredText PEP source files. -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |
From: <ba...@zo...> - 2002-11-08 22:41:30
|
>>>>> "DG" == David Goodger <go...@py...> writes: DG> I don't know how encoding-friendly ht2html is. Probably not at all. Or to put it another way, it's completely ignorant of all such issues. -Barry |
From: Fred L. D. Jr. <fd...@ac...> - 2002-11-08 22:28:35
|
David Goodger writes: > I agree. There has been some interest in integrating the two recently. > Oliver Rutherfurd has written a preliminary Writer component for .ht output: > http://docutils.sourceforge.net/sandbox/oliverr/ht/ Cool! > I think this is a roundabout way of doing the job. Please take a look at > the link above. It produces real .ht files, with the title in the RFC822 > header. The encoding could go there too (assuming it's ASCII-compatible). > I don't know how encoding-friendly ht2html is. I doubt it is, but it could be made more so. > Ideally, I'd like to see a system which programmatically controls both > Docutils and ht2html, so that intermediate files don't have to be created. > I haven't looked into the ht2html code enough yet to know if this is > feasible. Is the goal to have the content portion of .ht files be reST, or to allow HT2HTML to start with reST content to begin with? I'm sure either could be done, but using .ht files with reST for the body would be the easier of the two. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation |
From: David G. <go...@py...> - 2002-11-08 21:39:39
|
Handzsuj,Thomas wrote: > I have a suggestion for using ht2html together with docutils > (http://docutils.sourceforge.net/) > > The advantage is that I have to deal only with simple and readable ASCII > files. I agree. There has been some interest in integrating the two recently. Oliver Rutherfurd has written a preliminary Writer component for .ht output: http://docutils.sourceforge.net/sandbox/oliverr/ht/ > The problem is that docutils creates normal html files. The information in > the header of these files (e.g. title, charset) is lost if I use them as ht > files. > > To transfer this information I wrote a simple Parser based on SGMLParser. It > collects information from the body and the get_.. functions take this > information. I think this is a roundabout way of doing the job. Please take a look at the link above. It produces real .ht files, with the title in the RFC822 header. The encoding could go there too (assuming it's ASCII-compatible). I don't know how encoding-friendly ht2html is. Ideally, I'd like to see a system which programmatically controls both Docutils and ht2html, so that intermediate files don't have to be created. I haven't looked into the ht2html code enough yet to know if this is feasible. -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |
From: Handzsuj,Thomas <tho...@dr...> - 2002-11-08 10:34:21
|
Hi, I have a suggestion for using ht2html together with docutils (http://docutils.sourceforge.net/) The advantage is that I have to deal only with simple and readable = ASCII files. The problem is that docutils creates normal html files. The information = in the header of these files (e.g. title, charset) is lost if I use them = as ht files. To transfer this information I wrote a simple Parser based on = SGMLParser. It collects information from the body and the get_.. functions take this information. (My generator is based on PDOGenerator.py) Here it is: class extraParser(SGMLParser): def __init__(self): SGMLParser.__init__(self) self.text =3D '' self.startRec =3D 0 =20 def start_title(self, attrs): self.startRec =3D 1 def end_title(self): self.title =3D self.text self.startRec =3D 0 def start_meta(self,attrs): for k,v in attrs: if k=3D=3D'content' and v.find('charset') >=3D 0: self.charset =3D v.split('=3D')[1] def handle_data(self, text): if self.startRec: self.text +=3D text else: self.text +=3D '' It is used after reading the body (in __grokbody of my generator): self.__extraParser.feed(text) self.__extraParser.close() Information is used like this: def get_title(self): try: return self.__extraParser.title except AttributeError: return self.__parser.get('title') Best regards / Mit freundlichen Gr=FC=DFen=20 Thomas Handzsuj Design and Development Intensive Care ---------------------------------------------------- DR=C4GER MEDICAL Dr=E4ger Medical AG & Co. KGaA Moislinger Allee 53-55 D-23542 L=FCbeck Tel: + 49-451-882-1524 Fax: + 49-451-882-71524 (PC) Fax: + 49-451-882-2856 (paper print) ----------------------------------------------------- |
From: Handzsuj,Thomas <tho...@dr...> - 2002-11-08 08:03:52
|
Hi, as often the solution is simple and is caused by my own limited = knowledge: I did not overwrite the function get_charset() with the default = "us-ascii". After changing this to "utf8" everything is fine. Thomas > ---------- > Von: Handzsuj,Thomas > Gesendet: Montag, 4. November 2002 09:53 > An: 'ht2...@li...' > Betreff: [HT2HTML-devel] German umlauts >=20 > Hi, >=20 > I have the following problem with ht2html (version 2.0): >=20 > German umlauts are replaced by a '?' (seen in the html source) >=20 > I am using > - a slightly modified version of PDOGenerator.py > - python 2.0 (linux) and 2.2.2 (Windows NT) > - a very simple ht file (a header and one paragraph) >=20 > index.ht: > "Title: Thomas Handzsuj @ mt-i-euk >=20 > <h3>Was gibts hier =FCberhaupt</h3> >=20 > <p>Mal sehen wie die Umlaute aussehen "=FC=F6=E4=DF" > " >=20 > resulting in: > "... > <!-- start of body cell --> > <td valign=3D"top" width=3D"90%" class=3D"body"><br> > <h3>Was gibts hier ?berhaupt</h3> >=20 > <p>Mal sehen wie die Umlaute aussehen "????" >=20 >=20 > </td><!-- end of body cell --> > ..." >=20 > With python 2.2.2 there are _two_ '?' for each umlaut. >=20 > Please give me a hint where to look in the ht2html sources (or a > solution).=20 >=20 > Thank you. >=20 > Best regards / Mit freundlichen Gr=FC=DFen=20 >=20 > Thomas Handzsuj >=20 > Design and Development > Intensive Care > ---------------------------------------------------- > DR=C4GER MEDICAL >=20 > Dr=E4ger Medical AG & Co. KGaA > Moislinger Allee 53-55 > D-23542 L=FCbeck > Tel: + 49-451-882-1524 > Fax: + 49-451-882-71524 (PC) > Fax: + 49-451-882-2856 (paper print) > ----------------------------------------------------- >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: ApacheCon, November 18-21 in > Las Vegas (supported by COMDEX), the only Apache event to be > fully supported by the ASF. http://www.apachecon.com > _______________________________________________ > HT2HTML-devel mailing list > HT2...@li... > https://lists.sourceforge.net/lists/listinfo/ht2html-devel >=20 |
From: <ba...@zo...> - 2002-11-04 15:55:37
|
>>>>> "Fred" == Fred L Drake, Jr <fd...@ac...> writes: Fred> I can't reproduce this at all (Python 2.0.1, 2.1.3, 2.2.2, Fred> 2.3a0), and don't see any obvious place where there's Fred> anything being done to the body text. Fred> Barry, does this smell like something locale-specific Fred> creeping in? ;-( I suspect so, because there's only two places I'm aware of that do ? replacement. One is in the unicode() builtin / unicode.encode() method, when the last argument is `replace'. But we don't use those anywhere (ht2html is decidedly non-i18n-aware). The other is in the browser, e.g. when Mozilla gets characters outside the page's charset and you've explicitly set the browser charset to us-ascii. But I think Thomas was giving samples of the .html file generated from the .ht. Other than that, I can't think of why those "funny" characters would get transformed. -Barry |
From: Fred L. D. Jr. <fd...@ac...> - 2002-11-04 15:49:49
|
Handzsuj,Thomas writes: > Hi, > > I have the following problem with ht2html (version 2.0): > > German umlauts are replaced by a '?' (seen in the html source) PDOGenerator is not compatible with Python 2.0 for other reasons; I'm not sure how you got that to work, unless you added an argument to the time.localtime() call in the constructor (or dropped it). I've fixed that in CVS to make it more compatible. > resulting in: ... > <h3>Was gibts hier ?berhaupt</h3> > > <p>Mal sehen wie die Umlaute aussehen "????" ... > With python 2.2.2 there are _two_ '?' for each umlaut. I can't reproduce this at all (Python 2.0.1, 2.1.3, 2.2.2, 2.3a0), and don't see any obvious place where there's anything being done to the body text. Barry, does this smell like something locale-specific creeping in? ;-( -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation |
From: Fred L. D. <fd...@us...> - 2002-11-04 15:45:39
|
Update of /cvsroot/ht2html/ht2html In directory usw-pr-cvs1:/tmp/cvs-serv5874 Modified Files: PDOGenerator.py Log Message: Be compatible with Python 2.0. Index: PDOGenerator.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/PDOGenerator.py,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -d -r2.9 -r2.10 *** PDOGenerator.py 29 Oct 2002 22:49:26 -0000 2.9 --- PDOGenerator.py 4 Nov 2002 15:45:35 -0000 2.10 *************** *** 50,54 **** p.sidebar.append(BLANKCELL) copyright = self.__parser.get('copyright', '%d' % ! time.localtime()[0]) p.sidebar.append((None, '© ' + copyright)) p.sidebar.append(('http://www.python.org/psf/', --- 50,54 ---- p.sidebar.append(BLANKCELL) copyright = self.__parser.get('copyright', '%d' % ! time.localtime(time.time())[0]) p.sidebar.append((None, '© ' + copyright)) p.sidebar.append(('http://www.python.org/psf/', |
From: Fred L. D. Jr. <fd...@ac...> - 2002-11-04 15:30:04
|
Jim Tittsler writes: > http://ht2html.sourceforge.net/examples.html > contains a pair of broken links in the first paragraph: > components#sidebar -> components.html#sidebar > components#corner -> components.html#corner Fixed; thanks! -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation |
From: Fred L. D. <fd...@us...> - 2002-11-04 15:23:07
|
Update of /cvsroot/ht2html/ht2html/doc In directory usw-pr-cvs1:/tmp/cvs-serv27989 Modified Files: examples.ht Log Message: Fix a couple of linkos reported by Jim Tittsler. Index: examples.ht =================================================================== RCS file: /cvsroot/ht2html/ht2html/doc/examples.ht,v retrieving revision 2.0 retrieving revision 2.1 diff -C2 -d -r2.0 -r2.1 *** examples.ht 22 Mar 2002 17:45:40 -0000 2.0 --- examples.ht 4 Nov 2002 15:23:03 -0000 2.1 *************** *** 6,12 **** web site styles. These are done by creating a <em>generator</em> class, which customizes not only style elements such as the ! <a href="components#sidebar">sidebar</a> colors and the ! <a href="components#corner">corner</a> icon, but also such elements as the copyright notice and what --- 6,12 ---- web site styles. These are done by creating a <em>generator</em> class, which customizes not only style elements such as the ! <a href="components.html#sidebar">sidebar</a> colors and the ! <a href="components.html#corner">corner</a> icon, but also such elements as the copyright notice and what |
From: Handzsuj,Thomas <tho...@dr...> - 2002-11-04 08:53:22
|
Hi, I have the following problem with ht2html (version 2.0): German umlauts are replaced by a '?' (seen in the html source) I am using - a slightly modified version of PDOGenerator.py - python 2.0 (linux) and 2.2.2 (Windows NT) - a very simple ht file (a header and one paragraph) index.ht: "Title: Thomas Handzsuj @ mt-i-euk <h3>Was gibts hier =FCberhaupt</h3> <p>Mal sehen wie die Umlaute aussehen "=FC=F6=E4=DF" " resulting in: "... <!-- start of body cell --> <td valign=3D"top" width=3D"90%" class=3D"body"><br> <h3>Was gibts hier ?berhaupt</h3> <p>Mal sehen wie die Umlaute aussehen "????" </td><!-- end of body cell --> ..." With python 2.2.2 there are _two_ '?' for each umlaut. Please give me a hint where to look in the ht2html sources (or a = solution).=20 Thank you. Best regards / Mit freundlichen Gr=FC=DFen=20 Thomas Handzsuj Design and Development Intensive Care ---------------------------------------------------- DR=C4GER MEDICAL Dr=E4ger Medical AG & Co. KGaA Moislinger Allee 53-55 D-23542 L=FCbeck Tel: + 49-451-882-1524 Fax: + 49-451-882-71524 (PC) Fax: + 49-451-882-2856 (paper print) ----------------------------------------------------- |