#! /usr/bin/env python3
ID = '$Id: cl2xhtml,v 1.12 2021/03/28 02:20:34 eagle Exp $'
#
# cl2xhtml -- Convert a GNU-style ChangeLog to XHTML Strict.
#
# Copyright 2002-2003, 2006, 2008, 2013, 2021 Russ Allbery
#
# See the documentation at the end of this file for the license.
import getopt, re, sys, time
# This page header is common to all generated pages. Variables are in all
# caps surrounded by %%, and are substituted when the header is printed.
page_header = '''
%NAME% Change History
%NAME% Change History
'''
def version():
"""Return the version number of this program.
Returns the verison number of this program as a string containing the
program name, the CVS revision number, and the last modification date in
parentheses. This is taken from the global ID variable.
"""
# Make sure CVS doesn't see a variable here to substitute.
if ID != '$' + 'Id$':
data = ID.split()
date = data[3].replace("/", "-")
program = data[1][:-2]
version = data[2]
return program + " " + version + " (" + date + ")"
else:
return ''
def usage():
"""Print usage information for this program.
"""
print("Usage: cl2xhtml [-hv] -n -s