On Tue, Oct 06, 2009 at 08:21:54AM -0400, W. Trevor King wrote:
> On Tue, Oct 06, 2009 at 09:47:24AM +0200, Gianluca Montecchi wrote:
> 
> > The only showstopper is where to put the template directory once be is 
> > installed. Any suggestion ? It can be put in the interface directory
> > to keep coherence i think.
> 
> Inside the interface directory I think
>   be
>   `-- interfaces
>       `-- web
>           `-- html
>               `--template
>                  |--default
>                  |--template_1
>                  |--...


Good

 
> Installation of the default templates should be via
>     data_files=[
>         ('share/man/man1', ['doc/be.1']),
>         ]
> in setup.py.  Probably into 'share/be/html/templates' or similar.  I
> don't remember the syntax off the top of my hand, but it should be
> easy to find.  Hmm, I'm also not sure how your script is supposed to
> locate the installed data, but that must be a solved distutils
> problem...

To find the installed data is relatively simple: just define a variable
in the source and then try to open the directory. This way solve the other 
problem about how to package.


> You should also add an option `be html --template-dir ~/X/Y/Z` so the
> user can override the default templates even if they don't have access
> to the default installation path (e.g. if installed into /usr/local/).

Already done, even if I use a different option name ;-)

> Another alternative would be to keep default templates in the the
> code, and allow overriding with --template-dir.  That avoids all the
> data_files confusion, while still offering flexibility and fairly
> clean code.

This is my previous idea, using just an option for the css file and not
for the entire template.
Probably it is anyway the better solution.

bye
Gianluca


_______________________________________________
Be-devel mailing list
[email protected]
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel

Reply via email to