[Gimp-web] rewrite_attrs.py

Sven Neumann sven at gimp.org
Sat Apr 19 12:59:49 2003


Hi again,

I just converted the image links for the Books section and I have a
few more comments. Please don't get this wrong, I'm not volunteering
to do any work on this, so you may as well ignore my criticism.
Whoever does the work, decides how it is done...

OK, so here are my points:

(1) The way images are handled feels rather obscure. The current
    approach seems to be to rewrite attributes one per one. So in
    order to insert an image I need to write:

    <img class="icon" src="wgo:image-book-gimp_esential_reference" alt=""
         width="wgo:image-book-gimp_esential_reference"
         height="wgo:image-book-gimp_esential_reference"/>

    With a slightly more intelligent rewriting script, it should be
    possible to reduce this to:

    <img class="icon" src="wgo:image-book-gimp_esential_reference"/>

    The missing attributes could be inserted from the dictionary. It
    seems akward that the author of the page has to do all this
    redundant and error-prune typing.

(2) The attribute rewriter seems to reorder the attributes
    alphabetically. This is no problem but IMO it makes the generated
    source look rather strange.

(3) If I regenerate the site locally I have to do "make
    DocumentRoot=`pwd`".  IMO this should be the default so that
    simply typing 'make' would work. What is the DocumenRoot used for
    anyway? It doesn't look as if it is prepended to absolute links
    which is what I would have expected. It would also be nice to
    .cvsignore files so that I don't get all the html files listed
    when I 'cvs update' after using make.


Sven