diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..69dddea --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +# FreeBSD Ports Makefile For 'nohtml' +# $Id: Makefile,v 1.1 2003/05/05 21:32:41 tundra Exp $ + +all: # Do nothing - this is a python script that needs no build + +install: + ${BSD_INSTALL_SCRIPT} nohtml.py ${PREFIX}/bin + ${BSD_INSTALL_MAN} nohtml.1.gz ${PREFIX}/man/man1 diff --git a/mknohtml b/mknohtml new file mode 100755 index 0000000..bb8d362 --- /dev/null +++ b/mknohtml @@ -0,0 +1,57 @@ +#!/bin/sh +# Build a release of nohtml +# $Id: mknohtml,v 1.1 2003/05/05 21:32:41 tundra Exp $ + +COLOR= +#COLOR=--color +PROGFILE="nohtml.py" +SUPPFILES="Makefile nohtml.1 nohtml-license.txt" +DOCFILES="nohtml.html nohtml.ps nohtml.pdf nohtml.py.ps READ-1ST.txt WHATSNEW.txt nohtml.txt" + +# Check Command Line Args + +DIR="nohtml-"$1 + +if [ $# -ne 1 ] + then + echo "usage: mknohtml version-number" + exit +fi + +# Create Working Directory + +mkdir $DIR + +# Extract Files From RCS + +co -r$1 $PROGFILE +chmod 755 $PROGFILE +co $SUPPFILES +co $DOCFILES + +# Pretty Print The Source Code + +enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow $COLOR -pnohtml.py.ps nohtml.py + +# Build Documentation + +rman -fHTML -l nohtml nohtml.1 > nohtml.html +groff -man -Tps nohtml.1 >nohtml.ps +gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=nohtml.pdf nohtml.ps +groff -man -Tascii nohtml.1 | col -xb >nohtml.txt +chmod 644 $DOCFILES *txt +gzip *.1 + +# Build And Save The Release + +mv $PROGFILE $SUPPFILES $DOCFILES $DIR +mv *.gz $DIR +rlog $PROGFILE >$DIR/CHANGELOG.txt +flip -vm $DIR/*txt +tar -czvf $DIR.tar.gz $DIR +mv $DIR.tar.gz Releases + +# Remove Working Directory +rm -rf $DIR + + diff --git a/nohtml-license.txt b/nohtml-license.txt new file mode 100644 index 0000000..d32a20a --- /dev/null +++ b/nohtml-license.txt @@ -0,0 +1,105 @@ +$Id: nohtml-license.txt,v 1.1 2003/05/05 21:32:41 tundra Exp $ + +In order to use, study, modify, or copy 'nohtml', you must read +and agree to all the licensing terms below. If you do not agree with +or do not understand *ANYTHING* you see in this document, you are NOT +granted a license to use, study, modify, or copy 'nohtml'. By +using, studying, modifying, or copying 'nohtml', you are agreeing +to all the terms of the 'nohtml' LICENSE below in their entirety. + + + 'nohtml' LICENSE AGREEMENT + + +1) DEFINITIONS + +Throughout this Agreement, the term 'nohtml' is used to mean: + +Anything included in the 'nohtml' software distribution package +from TundraWare Inc. This includes scripts, programs, documentation, +license text and all other files provided in that original software +distribution package. + +Throughout this Agreement the term "User" is used to mean any person +who is enagaged in any of the following activities: + + a) Uses any files found in the 'nohtml' software distribution + in any way. + + b) Reads the 'nohtml' documentation. + + c) Reads or studies the 'nohtml' program source code or + supporting files. + + d) Makes use of any part of the 'nohtml' software distribution + for any purpose. + + e) Duplicates and/or distributes the 'nohtml' software distribution. + + +2) OWNERSHIP + +'nohtml' Is Copyright (c) 2003 TundraWare Inc. All Rights Reserved. + + +3) TERMS + +Permission is hereby granted to the User for the duplication and use +of 'nohtml' so long as ALL the following conditions are met: + + a) There is no license fee for NON-COMMERCIAL use of + 'nohtml'. This means that the program may be used at no + cost in personal applications, legally recognized non-profit + organizations, legally recognized educational institutions, + and government organizations. Voluntary donations from such + users are accepted and encouraged. A donation of $5 US per + user is recommended and information on how to contribute can + be obtained by contacting nohtml@tundraware.com. + + Use of 'nohtml' in FOR-PROFIT organizations, including + government contractors, requires a payment of $5 US per user. + For information on how to submit payment, please contact + nohtml@tundraware.com + + + b) The User of 'nohtml' understands and agrees that this is + EXPERIMENTAL SOFTWARE which is provided "AS-IS" with no + warranties expressed or implied by TundraWare Inc. + + c) The User acknowledges 'nohtml' has NOT been tested for: + + i) Correct operation + + ii) Freedom from unintended consequences + + iii) Any operation or condition which might cause damage, + compromise, or disruption to the User's or other: + hardware, software, networks, or data, or which might + cause any breach of system security of such systems, + software, and networks. + + d) By using 'nohtml' in any way, the User does so at their + own risk and agrees to hold TundraWare Inc. harmless for any + damage, direct or indirect, that this software may or does + cause to the User's computational environment, including, but + not limited to, the User's or others' hardware, software, + network, or data. THE USER FURTHER AGREES TO HOLD TUNDRAWARE + INC. HARMLESS FOR ANY ECONOMIC DAMAGE OR ANY OTHER ADVERSE + CONSEQUENCE, DIRECT OR INDIRECT, CAUSED BY THE USE OF + 'nohtml'. + + e) If duplicated and/or distributed, no fee beyond reasonable + duplication charges may be charged for 'nohtml'. No + commercial use of 'nohtml' which involves any + remuneration beyond these duplication charges is permitted. + + f) Any distributed copies of 'nohtml' must include all the + originally provided software, documentation, and licensing + information in their original distribution format and + packaging without any modifications. + +By using any part or all of 'nohtml', you are agreeing to be +bound by this license. + +IF YOU DO NOT UNDERSTAND, OR CANNOT ABIDE BY ANY OF THESE CONDITIONS, +DO NOT USE 'nohtml'. diff --git a/nohtml.1 b/nohtml.1 new file mode 100644 index 0000000..10ec0bd --- /dev/null +++ b/nohtml.1 @@ -0,0 +1,38 @@ +.ds CP 2003 + +.TH nohtml 1 "TundraWare Inc." +.SH NAME +nohtml \- Short Description + +.SH SYNOPSIS +nohtml [-hv] + +.SH DESCRIPTION +Long description + +.SH OPTIONS +.TP +.B -h +print this help information + +.TP +.B -v +print detailed version information. + +.SH OTHER +You must have a reasonably current version of Python installed. + +.SH BUGS AND MISFEATURES +None known as of this release. + +.SH COPYRIGHT AND LICENSING +\'nohtml\' is Copyright(c) \*(CP TundraWare Inc. For terms of use, see +the nohtml-license.txt file in the program distribution. If you +install \'nohtml\' on a FreeBSD system using the 'ports' mechanism, you +will also find this file in /usr/local/share/doc/nohtml. + +.SH AUTHOR +.nf +Tim Daneliuk +nohtml@tundraware.com + diff --git a/nohtml.py b/nohtml.py new file mode 100755 index 0000000..87600f8 --- /dev/null +++ b/nohtml.py @@ -0,0 +1,168 @@ +#!/usr/bin/env python +# nohtml.py +# Copyright (c) 2003 TundraWare Inc. All Rights Reserved. +# For Updates See: http://www.tundraware.com/Software/nohtml + +# Program Information + +PROGNAME = "nohtml" +RCSID = "$Id: nohtml.py,v 1.1 2003/05/05 21:32:41 tundra Exp $" +VERSION = RCSID.split()[2] + +# Copyright Information + +CPRT = chr(169) +DATE = 2003 +OWNER = "TundraWare Inc." +RIGHTS = "All Rights Reserved" +COPYRIGHT = "Copyright %s %s %s %s. " % (CPRT, DATE, OWNER, RIGHTS) + + +#----------------------------------------------------------# +# Variables User Might Change # +#----------------------------------------------------------# + + + +#------------------- Nothing Below Here Should Need Changing ------------------# + + +#----------------------------------------------------------# +# Imports # +#----------------------------------------------------------# + +import getopt +import os +import sys + + +#----------------------------------------------------------# +# Aliases & Redefinitions # +#----------------------------------------------------------# + + + +#----------------------------------------------------------# +# Constants & Literals # +#----------------------------------------------------------# + + + +##### +# Constants +##### + +FALSE = 0 == 1 # Booleans +TRUE = not FALSE + + + +##### +# Literals +##### + + +lCONFFILE = os.path.join(os.getenv("HOME"), "." + PROGNAME + "rc") # conf file + + + +#----------------------------------------------------------# +# Prompts, & Application Strings # +#----------------------------------------------------------# + + +##### +# Error Messages +##### + +eERROR = "ERROR" + + +##### +# Informational Messages +##### + + +##### +# Usage Prompts +##### + +uTable = [PROGNAME + " " + VERSION + " - %s\n" % COPYRIGHT, + "usage: " + PROGNAME + " [-hv] where,\n", + " -h print this help information", + " -v print detailed version information", + ] + + +##### +# Prompts +##### + + + +#----------------------------------------------------------# +# Global Variables & Data Structures # +#----------------------------------------------------------# + + + +#--------------------------- Code Begins Here ---------------------------------# + + +#----------------------------------------------------------# +# Object Base Class Definitions # +#----------------------------------------------------------# + + + +#----------------------------------------------------------# +# Supporting Function Definitions # +#----------------------------------------------------------# + + +##### +# Print An Error Message +##### + +def errmsg(emsg): + print PROGNAME + " " + VERSION + " " + eERROR + ": " + emsg + +# End of 'errmsg()' + + +##### +# Print Usage Information +##### + +def Usage(): + for line in uTable: + print line + +# End of 'Usage()' + + +#----------------------------------------------------------# +# Program Entry Point # +#----------------------------------------------------------# + +# Command line processing - Process any options set in the +# environment first, and then those given on the command line + +OPTIONS = sys.argv[1:] +envopt = os.getenv(PROGNAME.upper()) +if envopt: + OPTIONS = envopt.split() + OPTIONS + +try: + opts, args = getopt.getopt(OPTIONS, '-hv') +except getopt.GetoptError: + Usage() + sys.exit(1) + +for opt, val in opts: + if opt == "-h": + Usage() + sys.exit(0) + if opt == "-v": + print RCSID + sys.exit(0)