|
|
|
|
@ -14,14 +14,6 @@ import pylog_config as cfg |
|
|
|
|
|
|
|
|
|
__version = "v0.1-(2012-03-15)" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def header(): |
|
|
|
|
print '<head>' |
|
|
|
|
print '<meta charset="UTF-8">' |
|
|
|
|
print '<title>'+cfg.title+'</title>' |
|
|
|
|
print cfg.header |
|
|
|
|
print '</head>' |
|
|
|
|
|
|
|
|
|
def dir_entry(f,path,depth,hidden): |
|
|
|
|
if '_' in os.path.basename(f): |
|
|
|
|
typ = f[f.rindex('_')+1:] |
|
|
|
|
@ -169,7 +161,8 @@ else: |
|
|
|
|
script = sys.argv[0][sys.argv[0].rindex('/')+1:] |
|
|
|
|
files,keys=get_newest(cfg.numofposts) |
|
|
|
|
tz = time.timezone |
|
|
|
|
tzHHMM = "%03d%02d" % (tz/3600,abs((tz%3600)/60)) |
|
|
|
|
|
|
|
|
|
tzHHMM = "%0+3d%02d" % (tz/-3600,abs((tz%3600)/60)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print '''<?xml version="1.0"?> |
|
|
|
|
@ -180,7 +173,7 @@ else: |
|
|
|
|
print " <title>"+cfg.blogtitle+"</title>" |
|
|
|
|
print " <description>"+cfg.subtitle+"</description>" |
|
|
|
|
print " <link>"+cfg.topurl+script+"</link>" |
|
|
|
|
print " <generator>Pylog"+__version+"</generator>" |
|
|
|
|
print " <generator>Pylog "+__version+"</generator>" |
|
|
|
|
if len(keys)>0: |
|
|
|
|
date=datetime.fromtimestamp(int(keys[0])).strftime("%a, %d %b %Y %H:%M:%S ") |
|
|
|
|
print " <lastBuildDate>"+date+tzHHMM+"</lastBuildDate>" |
|
|
|
|
@ -226,7 +219,12 @@ path=get_valid_path(path) |
|
|
|
|
|
|
|
|
|
print '<!DOCTYPE html>' |
|
|
|
|
print '<html>' |
|
|
|
|
header() |
|
|
|
|
print '<head>' |
|
|
|
|
print '<meta charset="UTF-8">' |
|
|
|
|
print '<title>'+cfg.title+'</title>' |
|
|
|
|
print '<link rel="alternate" type="application/rss+xml" title="RSS" href="'+cfg.topurl+script+'"?rss=1 />' |
|
|
|
|
print cfg.header |
|
|
|
|
print '</head>' |
|
|
|
|
print '<body>' |
|
|
|
|
print '<h1 id="blogtitle"><a href="'+script+'">'+cfg.blogtitle+'</a></h1>' |
|
|
|
|
print '<h2 id="subtitle">'+cfg.subtitle+'</h2>' |
|
|
|
|
|