Much more text.

This commit is contained in:
Niels Serup
2011-08-01 22:39:41 +02:00
parent aae339084f
commit d1b8234f78
41 changed files with 1131 additions and 48 deletions

View File

@@ -15,14 +15,17 @@ def download_prog(root, fname):
def list_pages(pathdir):
dl = htmlfunc.DefList()
fs = [(os.path.join(pathdir, f), f) for f in filter(
lambda f: f.endswith('.org') and f != 'index.org',
os.listdir(pathdir))]
fs = [(p if os.path.isfile(p) else os.path.join(
p, 'index.org'), f, f[:-4] if os.path.isfile(p) else f + '/') for p, f in filter(
lambda pf: (os.path.isfile(pf[0]) and pf[0].endswith('.org') and
pf[1] != 'index.org') or (
os.path.isdir(pf[0]) and os.path.isfile(os.path.join(pf[0], 'index.org'))),
((os.path.join(pathdir, f), f) for f in os.listdir(pathdir)))]
fs.sort(key=lambda pf: git.rr.get_last_modified_date(pf[0])[0] or
misc.utcwhenmodified(pf[0]))
for p, f in fs[::-1]:
for p, f, l in fs[::-1]:
a = htmlgen.org_to_abstract(p, isfile=True, only_metadata=True)
dl.add_item(htmlfunc.link(f[:-4], a.title), a.summary if a.summary
dl.add_item(htmlfunc.link(l, a.title), a.summary if a.summary
else None) #'No summary.')
return dl.generate_html()

Binary file not shown.