[Rest2web-develop] How to arrange multiple rest2web trees?
Brought to you by:
mjfoord
|
From: Chris G <cl...@is...> - 2007-03-30 10:53:15
|
Maybe it's just me and wanting a tidy way to do things but I just
can't come up with a 'tidy' way of arranging a rest2web installation
so it appears logical and reasonably easy to maintain.
How do others handle this?
As I see it (and this will probably ramble a bit as I explain as I'm
talking to myself to some extent):-
When you install rest2web you (very reasonably) get a
rest2web-0.5.1 directory where everything you need is installed.
I have copied the rest2web subdirectory to my python site-packages
directory and I have put a copy of r2w.py on my path. So far so
good.
Now I want to create a new 'source' tree for creating a web site.
In my case it's called 'info'. One of the major advantages of
rest2web is that the source is readable in its own right, this is
why I chose it. So I create a sub-directory 'info' in my home
directory and create text files there which I can (and will) view
directly for local use.
So where do I put the r2w files associated with my 'info' tree?
By default r2w expects them to be in /home/chris/info but, to my
mind anyway, that clutters the nice clean information resource I'm
creating with things like templates, css files, etc.
My solution at present is to create an 'info' directory in the
rest2web-0.5.1 directory and put an r2w.ini, template file, css,
etc. there but it's not ideal because that's the r2w software
installation directory and having other (configuration related)
stuff there makes upgrades awkward. It also doesn't really work
with the r2w examples and documentation there which are partly but
not totally done the same way.
Maybe I'm being too complicated/demanding but ideally how I'd like it
to work is:-
The rest2web installation itself goes into /usr/local or somewhere
like that and, once installed, you never touch it except to
upgrade it. (Automation of the copying to site-packages would be
nice but I'm quite happy with doing it manually)
There's a configuration directory, probably somewhere in the
user's home directory, where the .ini file for each 'tree' is kept
and also any custom template and css files. (I'm not sure about
css, since they're used at run time)
The 'source' and 'destination' directories (i.e. where the .txt
files and .html files are respectively) have *only* the .txt and
.html files in them.
I think there's probably a 'grey area' around the css files and maybe
template.txt. Having 'images' and 'stylesheets' directories in the
destination directory is not too unreasonable as these don't visibly
clutter places that one sees normally. On the other hand they're not
really in an easy to find place while building a site.
Just some ideas for kicking around, if I'm the only person thinking
this way then never mind, I'll live with it as it is because it does
so much in the sort of way I want.
--
Chris Green
|