diff --git a/webgen.py b/webgen.py index d259a46..39baad3 100755 --- a/webgen.py +++ b/webgen.py @@ -6,8 +6,16 @@ from dialog import Dialog # If not choosen stdout as output, where should the generated file go to and what # fileending (f.e. .html) shall it have -targetdir = os.path.expanduser("~/www/i21k.de/posts/") +webbasedir = os.path.expanduser("~/www/i21k.de/") +targetdir = webbasedir + "posts/" sourcedir = os.path.expanduser("~/python/webgen/") +### for module mkdirindex: +filesdir = webbasedir + "files/" +indexfilename = "index.html" +filesdirheadline = "Files" +dirindexfile = open(filesdir + indexfilename, "w") +#### + fileending = "" locale.setlocale(locale.LC_ALL, "") clear = "\x1b[2J\x1b[H" @@ -20,14 +28,6 @@ redonblack = "\x1b[38;5;9m\x1b[48;5;16m" xwidth = os.get_terminal_size()[0] - 3 ywidth = os.get_terminal_size()[1] - 3 os.chdir(sourcedir) - -### for module mkdirindex: -filedir = "/home/wn/www/i21k.de/files/" -indexfilename = "index.html" -filedirheadline = "Files" -dirindexfile = open(filedir + indexfilename, "w") -#### - # Prepend an hourly tinestamp to the later name of the file creationtime = datetime.datetime.now().strftime("%Y-%m-%d %H:00 ") # generate a more precise ctime to be included in the resulting webpage @@ -188,8 +188,8 @@ head1 = ( style_fn = '' head2 = "
\n" -body1 = 'Back' -foot = "