'make' feature: HTML drafts
This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
'make' feature: HTML drafts | Ulf-D. Ehlert | 05 Mar 20:53 |
'make' feature: HTML drafts | Axel Wernicke | 06 Mar 07:37 |
'make' feature: HTML drafts | Ulf-D. Ehlert | 06 Mar 20:47 |
'make' feature: HTML drafts | julien | 06 Mar 20:52 |
'make' feature: HTML drafts | Ulf-D. Ehlert | 07 Mar 11:37 |
'make' feature: HTML drafts | julien | 07 Mar 20:45 |
'make' feature: HTML drafts | Ulf-D. Ehlert | 08 Mar 11:22 |
'make' feature: HTML drafts | julien | 08 Mar 21:00 |
'make' feature: HTML drafts
Hi,
I have added a new "make" feature, which hopefully will make documenting and translating easier:
When you edit an XML source file and want to see the resulting HTML page, you have to create the new file 'xml/LANG.xml' and then 'html/LANG' - that's what "make ALL_LINGUAS=LANG" does. This process takes several minutes on my (very old) PC.
So I have added a new "make" target to create a single (quick and dirty)
HTML page.
Instead of using 'xml/LANG.xml' to create *all* HTML pages, the
new "make" target just uses the specified XML source file and creates
only one HTML file. This will take a few seconds.
Usage: to create an HTML file from e.g. src/foo/bar.xml, type
make src/foo/bar.draft [ALL_LINGUAS=...],
i.e. the path name where ".xml" has been replaced with ".draft".
The output filename will be derived from the first id found in the source file, and the output will be saved to html/LANG/.html. This is not necessarily the same HTML file a regular "make" call will create.
Of course, you'll have to pay the price for creating drafts: A HTML draft is an independent file, it does not know anything about the rest of the manual. So the links won't work any more, -links won't have a title, there is no navigation footer or header (with links to previous and next HTML pages).
But these files are useful for a quick check of your changes, to find and correct spelling errors, parser errors, etc.
Ulf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /lists/gimp-docs/attachments/20080305/e6523d31/attachment.bin
'make' feature: HTML drafts
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Ulf,
I didn't try that new feature, but it sounds good. Did you put the description in some GIMP-docs document? IIRC there is something in the tool directory? Or may be a section in the wiki??
Greetings, lexA
Am 05.03.2008 um 20:53 schrieb Ulf-D. Ehlert:
Hi,
I have added a new "make" feature, which hopefully will make documenting
and translating easier:When you edit an XML source file and want to see the resulting HTML page, you have to create the new file 'xml/LANG.xml' and then 'html/LANG' - that's what "make ALL_LINGUAS=LANG" does. This process takes several minutes on my (very old) PC.
So I have added a new "make" target to create a single (quick and dirty)
HTML page.
Instead of using 'xml/LANG.xml' to create *all* HTML pages, the new "make" target just uses the specified XML source file and creates only one HTML file. This will take a few seconds.Usage: to create an HTML file from e.g. src/foo/bar.xml, type
make src/foo/bar.draft [ALL_LINGUAS=...],
i.e. the path name where ".xml" has been replaced with ".draft".
The output filename will be derived from the first id found in the source file, and the output will be saved to html/LANG/.html. This is not necessarily the same HTML file a regular "make" call will create.
Of course, you'll have to pay the price for creating drafts: A HTML draft is an independent file, it does not know anything about the
rest of the manual. So the links won't work any more, -links won't
have a title, there is no navigation footer or header (with links to previous and next HTML pages).But these files are useful for a quick check of your changes, to find and correct spelling errors, parser errors, etc.
Ulf
'make' feature: HTML drafts
Hi Axel,
Axel Wernicke (Donnerstag, 6. M?rz 2008, 07:37):
I didn't try that new feature, but it sounds good. Did you put the description in some GIMP-docs document? IIRC there is something in the tool directory? Or may be a section in the wiki??
It's not a tool, so IMO documenting in "tools/README" does not make sense. In fact, no 'make' target is documented. Looks like it's time to add a "make help" command - a wiki section would be better, but probably hard to find.
Ulf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /lists/gimp-docs/attachments/20080306/7233a257/attachment.bin
'make' feature: HTML drafts
Hi Ulf,
Usage:
to create an HTML file from e.g. src/foo/bar.xml, typemake src/foo/bar.draft [ALL_LINGUAS=...],
i.e. the path name where ".xml" has been replaced with ".draft".
As usually, I don't understand this new feature:
- I updated to version 2394.
- I modified src/filters/blur/blur xml and saved it under .xml and .patch
- I ran
make src/filters/blur/blur.xml ALL_LINGUAS="fr"
and got "Nothing to do to blur.xml"
make src/filters/blur/blur.patch ALL_LINGUAS="fr"
and got "src/filters/blur/blur.draft is up-to-date"
What is wrong?
atb, Julien
'make' feature: HTML drafts
Hi Julien,
julien (Donnerstag, 6. M?rz 2008, 20:52):
- I modified src/filters/blur/blur xml and saved it under .xml and .patch -
You don't need "src/filters/blur/blur.patch". Just edit (and save) as usual.
I ran
make src/filters/blur/blur.xml ALL_LINGUAS="fr"
No.
and got "Nothing to do to blur.xml"
Yes, "make" won't touch or build "src/filters/blur/blur.xml".
make src/filters/blur/blur.patch ALL_LINGUAS="fr"
No. Try "make src/filters/blur/blur.draft".
and got "src/filters/blur/blur.draft is up-to-date"
There is (should be) no file named "src/filters/blur/blur.draft". Did you save your "blur.xml" as "blur.draft"? Then make would see an up-to-date file and won't do anything.
What is wrong?
Do not create a file named "*.draft". (Remove any existing files
named "*.draft".)
Let 'make' "create" the draft file - it's a pseudo target,
actually 'make' will use the first id to create the real target name.
It may look like this:
$ vi src/filters/blur/blur.xml
$ make src/filters/blur/blur.draft ALL_LINGUAS=fr
Making draft page (ignore any XSLT complaints):
Making ./html/fr/plug-in-blur.html ...
$ ls -l html/fr
total 37
-rw-r--r-- 1 ulf users 1361 Feb 2 20:30 gimp-help-custom.css
-rw-r--r-- 1 ulf users 272 Mar 5 18:00 gimp-help-draft.css
-rw-r--r-- 1 ulf users 1667 Jan 4 2007 gimp-help-plain.css
-rw-r--r-- 1 ulf users 13585 Mar 4 19:03 gimp-help-screen.css
-rw-r--r-- 1 ulf users 12563 Mar 1 19:00 gimp22.css
-rw-r--r-- 1 ulf users 2944 Mar 7 11:27 plug-in-blur.html
(There is only one HTML file here, since I usually do not build html/fr.)
HTH
Ulf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /lists/gimp-docs/attachments/20080307/524a03b9/attachment.bin
'make' feature: HTML drafts
Hi Ulf,
$ make src/filters/blur/blur.draft ALL_LINGUAS=fr
I got plug-in-blur.html :-)
But the html file is not complete: there only are changes I made in
and in . Changes in are absent .
Is it normal to get only changes? The whole html file would be better.
Are all these files created besides the html file necessary? They will complicate our work!
atb, julien
'make' feature: HTML drafts
Hi Julien,
julien (Freitag, 7. M?rz 2008, 20:45):
I got plug-in-blur.html :-)
But the html file is not complete: there only are changes I made in and in . Changes in are absent .
Missing or wrong "lang" attribute?
Is it normal to get only changes? The whole html file would be better.
You *will* get the whole HTML file, created from "src/filters/blur/blur.xml".
Are all these files created besides the html file necessary? They will complicate our work!
Oops, which files? Every "make scr/.../....draft" will create exactly one HTML file. (At least, it should...)
Ulf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /lists/gimp-docs/attachments/20080308/74e3f15d/attachment.bin
'make' feature: HTML drafts
Hi Ulf,
All's right this evening...
Thank you very much for this useful feature.
Julien