Eur Ing Chris Green wrote:
Ultimately what I want is a way to have a directory where I can have a reST generated index.html file and then a list of .PDF (for example) files that can be clicked on. I don't particularly want to have to edit the index.html every time I add or delete a .PDF file. Note, it's not *just* for PDF files but it's probably for a fairly short list of file types.
If you want the list of files to appear as a dynamic part of the index file, then you could knock up a small Python or Perl script (to get the list of directory entries you are interested in) and embed it as a server-side include. All you need to do is configure Apache to process your index file as an SSI, e.g. (from memory):
<Directory /home/httpd/whatever> Options ExecCGI Includes AddHandler server-parsed .shtml </Directory>
and then add something like
<html><head><title>My Index Page</title></head> <body> <h1>Content</h1> <p>Some stuff</p> <h1>Files</h1>
<!--#set var="locn" value="/my/current/directory"--> <!--#exec cgi="/cgi-bin/listfiles.py"-->"
</body>
where you want your list to appear. The #set passes the cwd as a CGI param which your script can query.
Cheers, Simon