add size params

This commit is contained in:
Felix Pankratz 2025-07-21 23:33:08 +02:00
parent 6cff5f247d
commit 6a05cae640

View File

@ -94,6 +94,7 @@ async def main():
)
parser.add_argument("-t", "--traceroute", default=None)
parser.add_argument("--example", action="store_true")
parser.add_argument("-s", "--size", nargs=2, type=int, help="width x height in px")
args = parser.parse_args()
locations = []
@ -123,6 +124,9 @@ async def main():
else:
points_3d = [latlon_to_xyz(lat, lon) for lat, lon in locations]
if args.size:
width, height = args.size
else:
height, width = await kitty.get_terminal_size_pixel()
plotter = TerminalPlotter(width, height)
plotter.add_mesh(globe, color="tan", smooth_shading=False, texture=tex, show_edges=False)