[Bf-docboard] WML -> XML script

Stefano Selleri bf-docboard@blender.org
Tue, 17 Jun 2003 16:02:56 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C334E9.EAC306E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Et voil=E0,

here is the script

wml2xml.pl=20

is the translator, it is used like this:

Let's pretend you have a Directory 'DOC'

The directory 'DOC' contains the tree 'Manual2.0' as you obtain it by =
unpacking the public Manual2.0 sources.

The directory 'DOC' also contains a directory 'Manual2.0XML'

This latter directory contains an EMPTY tree equal to the CVS tree, that =
is
a directory 'gfx' with its subdirs, a directory 'chapters' with its =
subdirs etc.

You don't need a FULL tree, just the directory you want to update.

The script wml2xml.pl is to be placed in DOC

Run it as:

perl ./wml2xml.pl  -w Manual2.0/EditMode.wml -x =
Manual2.0xml/chapters/mesh_modelling/EditMode.xml -is Manual2.0/images =
-id gfx/chapter_mesh_modelling

This parses wml2xml.pl via the Perl interpreter=20

sourcing (-w) the file 'Manual2.0/EditMode.wml '

wtriting (-x) the file =
'Manual2.0xml/chapters/mesh_modelling/EditMode.xml'

Using the prefix, to find source images (-is) 'Manual2.0/images' (this
is necessary because WML doesn't use a full path)

Using the prefix to address xml images 'gfx/chapter_mesh_modelling' =
(this is necessary
because XML _do_ use a full path)

You can omit all switches _except_ -w (well, you must tell what to =
translate)
but then the XML and the images will be stored in 'DOC' and you
will have to manually edit the XML to get refs right in the CVS tree.

*WARNING*

For some strange reason the JPG images in the Manual 2.0 sources
are at a resolution of 1 dpi (yes, 1 pixel is 1 inch wide)

This is not a problem for HTML output, because HTML always
uses screen resolution, but will issue warnings on the PDF making and
will crash your PDF viewer, so you must OPEN the images, set a=20
decent resolution (100dpi or even 150dpi, see the style guide)
before using them.

Let me know

Stefano


------------------------------------------------------------------------
Ing. Stefano SELLERI - DET - Univ. of Florence - Via Lombroso 6/17
50134 - Firenze. T. +39-055-4796751. F. +39-055-4796767
------------------------------------------------------------------------



------=_NextPart_000_0007_01C334E9.EAC306E0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Et voil=E0,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>here is the script</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>wml2xml.pl </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>is the translator, it is used like=20
this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Let's pretend you have a Directory=20
'DOC'</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The directory 'DOC' contains the tree =
'Manual2.0'=20
as you obtain it by unpacking the public Manual2.0 sources.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The directory 'DOC' also contains a =
directory=20
'Manual2.0XML'</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This latter directory contains an EMPTY =
tree equal=20
to the CVS tree, that is</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>a directory 'gfx' with its subdirs, a =
directory=20
'chapters' with its subdirs etc.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You don't need a FULL tree, just the =
directory you=20
want to update.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The script wml2xml.pl is to be placed =
in=20
DOC</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Run it as:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>perl ./wml2xml.pl&nbsp; -w =
Manual2.0/EditMode.wml=20
-x Manual2.0xml/chapters/mesh_modelling/EditMode.xml -is =
Manual2.0/images -id=20
gfx/chapter_mesh_modelling</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This parses wml2xml.pl via the Perl =
interpreter=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>sourcing (-w) the file =
'Manual2.0/EditMode.wml=20
'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>wtriting (-x) the file=20
'Manual2.0xml/chapters/mesh_modelling/EditMode.xml'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Using the prefix, to find source images =
(-is)=20
'Manual2.0/images' (this</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>is necessary because WML doesn't use a =
full=20
path)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Using the prefix to address xml images=20
'gfx/chapter_mesh_modelling' (this is necessary</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>because XML _do_ use a full =
path)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You can omit all switches _except_ -w =
(well, you=20
must tell what to translate)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>but then the XML and the images will be =
stored in=20
'DOC' and you</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>will have to manually edit the XML to =
get refs=20
right in the CVS tree.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>*WARNING*</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>For some strange reason the JPG images =
in the=20
Manual 2.0 sources</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>are at a resolution of 1 dpi (yes, 1 =
pixel is 1=20
inch wide)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This is not a problem for HTML output, =
because HTML=20
always</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>uses screen resolution, but will issue =
warnings on=20
the PDF making and</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>will crash your PDF viewer, so you must =
OPEN the=20
images, set a </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>decent resolution (100dpi or even =
150dpi, see the=20
style guide)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>before using them.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Let me know</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Stefano</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>----------------------------------------------------------------=
--------<BR>Ing.=20
Stefano SELLERI - DET - Univ. of Florence - Via Lombroso 6/17<BR>50134 - =

Firenze. T. +39-055-4796751. F.=20
+39-055-4796767<BR>------------------------------------------------------=
------------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0007_01C334E9.EAC306E0--