Hello,
I maintain all my programming snippets in CVS
(http://tinyurl.com/863zsh) and have a site mostly for snippets and
notes (http://uthcode.sarovar.org)
In order to maintain the site in a better way, I analyzed certain
tools and rest2web seems to be the way to go.
I see rest2web has developed a lot and has quite a bunch of options.
However, I was trying the following with rest2web and have not been
able to (yet).
1) Copying a number of .py files directly to output.
file: takes a single filename in the template.
file: *.py is wrong.
listing files one by one may be a bad idea.
I was thinking if in template, I execute a code to copy to output directory.
What are my options?
(Doing it outside of rest2web system would be my last option)
2) Another question is, in the template.txt file which is in /path/to/subdir/
If I use os.listdir(os.getcwd()). it is pointing to directory from
where python interpreter is running and not actually /path/to/subdir.
os.listdir(os.path.dirname(__file__)) wont work because __file__ is
not defined in the template.txt.
How do I go about in this case?
I want a list of files a in particular directory so that I can index
them in template.txt
Thanks,
Senthil
|