ldcheck.py

changeset 77
d98502ae1f33
parent 63
8949af6a4279
child 81
e65d82501a38
--- a/ldcheck.py	Sun Jun 23 00:55:21 2019 +0300
+++ b/ldcheck.py	Sun Jun 23 12:09:20 2019 +0300
@@ -88,7 +88,7 @@
         action = ListTestSuiteAction,
         help = 'Lists all possible checks and exit',
     )
-    parser.add_argument('--dump-structure', action = 'store_true')
+    parser.add_argument('--dump', action = 'store_true')
     parser.add_argument('--rebuild', action = 'store_true')
     parser.add_argument('--flatness', action = 'store_true')
     args = parser.parse_args()
@@ -119,12 +119,14 @@
                 file,
                 name = basename(args.filename),
                 ldraw_directories = config['libraries'])
-            if args.dump_structure:
+            if args.dump:
                 print('header: ' + type(model.header).__name__)
                 for key in sorted(dir(model.header)):
                     if not key.startswith('__'):
                         print('\t' + key + ': ' + repr(getattr(model.header, key)))
-                for entry in model.body:
+                for i, entry in enumerate(model.body):
+                    if model.header.valid and i == model.header_size:
+                        print('--------- End of header')
                     print(entry)
             elif args.rebuild:
                 for entry in model.body:

mercurial