#!/usr/bin/env python
import sys
from glob import glob
from os.path import isfile, dirname, abspath, join, basename, splitext
from rst import Rest, Paragraph, Strong, ListItem, Link


here = abspath(dirname(__file__))
html = glob(join(here, '*.pdf'))

basehtml = [basename(htm) for htm in html]
basehtml.sort()

content = Rest()

for htm in basehtml:
    link = Link( htm , "pdfreport/" +htm)
    content.add(ListItem(link))

sys.stdout.write(content.text())


