Sorry for the noise, here's a new tarball with an updated patch, nothing else is changed:
Ensure integer typed results from integer division with the floordiv
operator
when using Python 3. `type(int(1)/int(1))' yields "<class 'int'>" and
"<class 'float'>" in Python 2 and 3 respectively.
Decode ARC node names and string property values as UTF-8 to preserve
the output
format and fix --grep when using Python 3, e.g. print/use "value"
instead of
"b'value'". Python 3 uses type "<class 'bytes'>" and does not decode
automatically, Python 2 uses "<class 'str'>" already for everything.
Index: tools/mdprint/mdprint.py
...
For example, show only the root node of guest 1:
$ mdprint -g root.pri-version ./guest1.md
mdprint 1.3
Input file
"/tmp/obsd-ams/guest1.md"
Limiting output to
root . { * }
root (node 0x0) {
content-version = "1.0"
pri-version = "1.0"
reset-reason = 0x0 /* 0 */
fwd --> channel-endpoints (node 0x245)
fwd --> cpus (node 0x14)
fwd --> domain-services (node 0x23c)
fwd --> ioaliases (node 0x45)
fwd --> memory (node 0x10)
fwd --> openboot (node 0x34)
fwd --> phys_io (node 0x1f)
fwd --> platform (node 0x22)
fwd --> power-management (node 0x4e)
fwd --> variables (node 0x2c4)
fwd --> virtual-devices (node 0x38)
}
Without mdprint header, show the PRI version only but in parsable form:
$ mdprint -q -p -g root.pri-version ./guest1.md
root|0x0|pri-version="1.0"
HTML output works alike.
Feedback? OK?
mdprint.tgz
Description: Binary data
