Skip to content

Commit 02e0aaa

Browse files
committed
Update README.md
1 parent efbb58b commit 02e0aaa

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ To install just download the python script you want (or all of them). They have
66

77
If for some reason drag-and-drop to the python script doesn't work, make sure you have python files set to open with the python interpreter, if that doesn't work, repair your installation / re-install
88

9+
__NOTE ABOUT PYTHON:__
10+
11+
Your life will be much better, and the use of these is far easier if you __DO__ check the box to add python to your `$PATH` environmental variable when you are installing it. If you did not do this, you can re-install python, or 'modify' your installation from Add/Remove programs. Be warned, this is one of the times that an installer tells you to reboot that you actually have to do it.
12+
913
---
1014

1115
## compareTranslations.py
@@ -21,6 +25,7 @@ $ python .\compareTranslations.py .\testFiles\translations\translation_en.xml .\
2125
```
2226

2327
### Translation file format
28+
2429
By default, compareTranslations.py expects a file of the format:
2530

2631
```xml
@@ -104,6 +109,10 @@ __Options:__
104109

105110
* `--no_pretty_print` Do not line up the "node" entries on output. Pretty print is on by default.
106111

112+
### Batch File: i3dMapper_toClipboard.bat
113+
114+
Dropping an i3d file on this batch file will generate the mappings and store them on your clipboard (windows only of course)
115+
107116
### Sample Output
108117

109118
```xml
@@ -203,3 +212,74 @@ Unknown, uncommon, or depreciated collisionMasks:
203212
Unknown, uncommon, or depreciated collisionMasks:
204213
collisionMask for 'torion1914_main_component1' (6303746)/(0x603002) uses depreciated bits and needs corrected
205214
```
215+
216+
217+
## xmlChecker.py
218+
219+
This script looks at your vehicle / placeable / etc xml file and tells you if it finds any problems with it.
220+
221+
__Data File Note:__
222+
223+
This is the only script that requires an extra file - make sure you grab the `xmlChecker_data.json` file and keep it in the same folder as the script.
224+
225+
__Usage:__
226+
227+
```shell
228+
$ python xmlChecker.py .\testFiles\i3dMap\mrplow_heavy_5.xml
229+
```
230+
231+
__Options:__
232+
233+
* __--no-depre-check__ Disable checking depreciated xml tags and attributes
234+
* __--no-file-check__ Disable checking linked files
235+
* __--no-schema__ Disable checking schema
236+
237+
### Sample Output - Depreciations
238+
239+
```text
240+
Files Found: 1
241+
242+
Testing: polanin.xml
243+
PROCESSING: xml file is of type 'vehicle'
244+
PROCESSING: depreciated tags / attributes:
245+
Depreciated usage found: 'areaMarkers#backIndex' is now 'areaMarkers#backNode'
246+
Depreciated usage found: 'areaMarkers#leftIndex' is now 'areaMarkers#leftNode'
247+
Depreciated usage found: 'areaMarkers#rightIndex' is now 'areaMarkers#rightNode'
248+
```
249+
250+
### Sample Output - Missing Files
251+
252+
```text
253+
Files Found: 1
254+
255+
Testing: lizardAugerMaster.xml
256+
PROCESSING: xml file is of type 'vehicle'
257+
PROCESSING: checking file links
258+
FILE NOT FOUND: $data/shared/wheels/michelin/cargoXBib/750_60R30_5.xml
259+
FILE NOT FOUND: $data/shared/wheels/trelleborg/TwinRadial/750_60R30_5.xml
260+
FILE NOT FOUND: $data/shared/wheels/trelleborg/TM600/420_85R34.xml
261+
```
262+
263+
### Sample Output - XSD Schema Validation (lxml required, see below)
264+
265+
```text
266+
Files Found: 1
267+
268+
Testing: lizardAugerMaster.xml
269+
PROCESSING: xml file is of type 'vehicle'
270+
PROCESSING: Checking against XSD Schema
271+
NOTICE: Validation failed:
272+
Line 35: Element 'schemaOverlay': Character content is not allowed, because the content type is empty.
273+
Line 35: Element 'schemaOverlay': Element content is not allowed, because the content type is empty.
274+
Line 379: Element 'brakeForce': Character content is not allowed, because the content type is empty.
275+
```
276+
277+
### LXML Requirement (schema only)
278+
279+
Sadly, the native etree implementation in python cannot do schema validation, so you will need to install `lxml` - the simplest method of this is to open a `cmd` or `Windows Terminal` __with administrator privileges__ and run:
280+
281+
```shell
282+
$ pip install lxml
283+
```
284+
285+
Note from the initial warning above, python must be installed __with__ the option to add it to your `$PATH` enviromental variable.

0 commit comments

Comments
 (0)