[sane-devel] New program for generating HTML lists from backend description files

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 5 Jul 2002 22:05:59 +0200


Hi,

I have just committed tools/sane-desc.c, a C program that generates
HTML and ASCII lists from the backend description files. It's intended
as an replacement for sane-desc.el. It's not really nice, but does its
job.

It's compiled by running "make sane-desc". Have a look at its options
with "sane-desc --help".

What can it do?

1) Generate a HTML page similar to our current backend list
   (http://www.mostang.com/sane/sane-backends.html). Here is an example:
   http://www.meier-Geinitz.de/sane/tmp/sane-backends.html
   It was generated by the following command:
   ./sane-desc -m html-backends -d 1 -s ../doc/descriptions/ >sane-backends.html
   
   There are some slight differences between the new and the old page.
   First, if have splitted the list into the five SANE device types
   and added quick links for all the lists. Second, the backend column
   now also contains version, status and "new" information, if
   available. This way the available space is used better in my opinion.
   Otherwise there are only small changes, like HTML adjustment to get
   the page validated by W3C and a link to the SANE mailing list page
   instaead of a mailto: links directly to the list.
   
2) Generate a HTML page with lists sorted by Manufacturer. Example:
   http://www.meier-Geinitz.de/sane/tmp/sane-backends-mfgs.html
   It was generated by the following command:
   ./sane-desc -m html-mfgs -d 1 -s ../doc/descriptions/ >sane-backends-mfg.html

   I haven't tried to do table optimizations (rowspan etc.) like in the
   list sorted by backends. I'm not sure if it's necessary or possible
   at all. The tables contain all the "features" mentioned above.
   The tables for API and meta backends are sorted by backend, because
   there isn't a manufacturer in this case.
   
   This table shows some problems: There are different spellings for the
   manufacturers, e.g. Umax and UMAX, HP and Hewlett-Packard.
   
   Also entries like "USB scanners not supported" may be quite
   misleading in this table, because it's not that obvious that this
   statement may be only true for that backend.
   
3) Generate a simple ASCII list of all backends. While there is no
   graphical thrill, this mode shows all the options of the current
   format, e.g. multiple URLs.
   Example:  http://www.meier-Geinitz.de/sane/tmp/sane-backends.txt
   It was generated by the following command:
   ./sane-desc -m ascii -d 1 -s ../doc/descriptions/ >sane-backends.txt
   
There are some warnings while running sane-desc: Some backends use
":status :new" which shouldn't be used any more. Anyway, they won't be
new in SANE 1.0.9 so the backend authors should use the real status.
In the descriptions-external directory, there is something wrong with
lhii, I will have a look at this problem.

I'm interested in comments, especially:

1) Are there any bugs in the interpretation of the .desc files?
2) Can the tables be optimized, e.g. better usage of colors?
3) Which one of the two HTML formats should be used for the SANE page?
4) Are there any ideas for other output formats (sort by something else)?

Bye,
  Henning