RSS time sign fixed, minor changes

master
Stefan Krulj 15 years ago
parent af36d6cbb0
commit 4e63b6c101
  1. 18
      pylog.py

@ -14,14 +14,6 @@ import pylog_config as cfg
__version = "v0.1-(2012-03-15)" __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): def dir_entry(f,path,depth,hidden):
if '_' in os.path.basename(f): if '_' in os.path.basename(f):
typ = f[f.rindex('_')+1:] typ = f[f.rindex('_')+1:]
@ -169,7 +161,8 @@ else:
script = sys.argv[0][sys.argv[0].rindex('/')+1:] script = sys.argv[0][sys.argv[0].rindex('/')+1:]
files,keys=get_newest(cfg.numofposts) files,keys=get_newest(cfg.numofposts)
tz = time.timezone 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"?> print '''<?xml version="1.0"?>
@ -226,7 +219,12 @@ path=get_valid_path(path)
print '<!DOCTYPE html>' print '<!DOCTYPE html>'
print '<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 '<body>'
print '<h1 id="blogtitle"><a href="'+script+'">'+cfg.blogtitle+'</a></h1>' print '<h1 id="blogtitle"><a href="'+script+'">'+cfg.blogtitle+'</a></h1>'
print '<h2 id="subtitle">'+cfg.subtitle+'</h2>' print '<h2 id="subtitle">'+cfg.subtitle+'</h2>'

Loading…
Cancel
Save