web2png - convert a web tree from using GIFs to using PNGs
The arguments to web2png must be directories; if none are given, the current directory is assumed.
In each directory, web2png tries to convert every GIF to a PNG. It leaves alone GIFs that have either multiple images or transparency, because these will not display properly in all current browsers. It also does not reconvert GIFs that already have corresponding PNGs (e.g. the same name except for the .gif file extension). The original GIFs are left in place.
Web2png tracks successful conversions. It then looks at each HTML,
Style Sheet under the argument directories (extensions html, shtml,
each successful converted GIF to point at the PNG. References in
relative HREF and BACKGROUND tags are recognized by filename and fixed
(any base directory declared by a BASE tag will be be prepended to the
relative URL). References that are HTTP URLs are matched against the
list of convertible GIFs by basename; if there is such a match, the
contents of the URL is retrieved and compared to the convertible GIF.
If both basename and data match, the HTTP reference is fixed.
If the pages are under RCS version control, they're checked out for modification before being altered; otherwise, a copy of the original of each modified web page is left in the same directory, with the additional extension .bak.
The following options change the behavior of the program:
Web2png can be run on a directory that has already been partly converted by previous runs; it will do the minimum necessary amount of work. The changes it makes will be fully reversible with -r until you run it in -d mode.
Web2png is written in Python. Python 1.5.2 or better must be installed and accessible on your system in order for web2png to run.
This program does not automatically convert CGIs; you'll have to do that by hand. Other dynamic-content methods (such as server-side inclusions) may also require hand-hacking.
The program cannot tell converted from preexisting PNGs; if you have PNGs with the same stem name as corresponding GIFs but carrying different information, the -r mode will clobber them.
Закладки на сайте
Проследить за страницей
Created 1996-2021 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру