|
4 | 4 | from pprint import pprint |
5 | 5 | from io import StringIO |
6 | 6 | from toml import loads |
7 | | -from firebird.uuid.spec import get_specifications, parse_specifications |
8 | | -from firebird.uuid.model import Node, build_tree |
9 | | -from firebird.uuid.registry import registry |
| 7 | +from firebird.uuid import get_specifications, parse_specifications, Node, oid_registry |
10 | 8 |
|
11 | 9 | def print_node(node: Node, indent=0, _to=None) -> None: |
12 | 10 | out = sys.stdout if _to is None else _to |
@@ -53,22 +51,22 @@ def main(): |
53 | 51 | #txt_1 = printout.getvalue() |
54 | 52 | #print_node(root) |
55 | 53 | ## |
56 | | - registry.update_from_specifications(specifications) |
| 54 | + oid_registry.update_from_specifications(specifications) |
57 | 55 | #spec2, err2 = get_specifications('https://raw.githubusercontent.com/FirebirdSQL/saturnin-core/master/oid/micros.oid') |
58 | 56 | #spec2, err2 = parse_specifications(spec2) |
59 | | - #registry.update_from_specifications(spec2) |
| 57 | + #oid_registry.update_from_specifications(spec2) |
60 | 58 | printout = StringIO() |
61 | | - print_node(registry.get_root(), _to=printout) |
| 59 | + print_node(oid_registry.get_root(), _to=printout) |
62 | 60 | txt_1 = printout.getvalue() |
63 | 61 | # |
64 | | - toml = registry.as_toml() |
| 62 | + toml = oid_registry.as_toml() |
65 | 63 | print(toml) |
66 | 64 | # |
67 | | - registry.clear() |
68 | | - registry.update_from_toml(toml) |
69 | | - #print_node(registry.get_root()) |
| 65 | + oid_registry.clear() |
| 66 | + oid_registry.update_from_toml(toml) |
| 67 | + #print_node(oid_registry.get_root()) |
70 | 68 | printout = StringIO() |
71 | | - print_node(registry.get_root(), _to=printout) |
| 69 | + print_node(oid_registry.get_root(), _to=printout) |
72 | 70 | txt_2 = printout.getvalue() |
73 | 71 | #data = loads(toml) |
74 | 72 | #nodes = [] |
|
0 commit comments