Support inp in coord, vertex, label

This commit is contained in:
WQY\qiong
2023-03-16 00:15:34 +08:00
parent bf1aeff1fa
commit 1d720c5b6c
4 changed files with 39 additions and 6 deletions

View File

@@ -98,6 +98,14 @@ def inp_in_vertex(section: list[str]) -> ChangeSet:
return cs
def inp_in_vertex_new(name: str, line: str) -> None:
tokens = line.split()
link = tokens[0]
x = float(tokens[1])
y = float(tokens[2])
write(name, f"insert into vertices (link, x, y) values ('{link}', {x}, {y});")
def inp_out_vertex(name: str) -> list[str]:
lines = []
objs = read_all(name, f"select * from vertices order by _order")