add version of simplewebs
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
import os,sys,time
|
import os,sys,time
|
||||||
import urllib
|
import urllib
|
||||||
|
VERSION="20160116"
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
''' Setup the command line options '''
|
''' Setup the command line options '''
|
||||||
@@ -20,6 +21,7 @@ def setup():
|
|||||||
help="Output filename (Default: index.html)")
|
help="Output filename (Default: index.html)")
|
||||||
parser.add_argument("-p",action="store_false",dest="parent",default=True,
|
parser.add_argument("-p",action="store_false",dest="parent",default=True,
|
||||||
help="Do no print .. link for parent folder.")
|
help="Do no print .. link for parent folder.")
|
||||||
|
parser.add_argument("--version",action='version', version=VERSION)
|
||||||
parser.add_argument("startpath",type=str,action="store",default=os.path.abspath('.'),nargs='?',
|
parser.add_argument("startpath",type=str,action="store",default=os.path.abspath('.'),nargs='?',
|
||||||
help="Root path of the index")
|
help="Root path of the index")
|
||||||
options=parser.parse_args()
|
options=parser.parse_args()
|
||||||
@@ -69,6 +71,7 @@ def get_header(title):
|
|||||||
header='''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
header='''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="generator" content="SimpleWebPage '''+VERSION+'''" />
|
||||||
<title>Index of '''+title+'''</title>
|
<title>Index of '''+title+'''</title>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
|||||||
Reference in New Issue
Block a user