add size params
This commit is contained in:
parent
6cff5f247d
commit
6a05cae640
@ -94,6 +94,7 @@ async def main():
|
|||||||
)
|
)
|
||||||
parser.add_argument("-t", "--traceroute", default=None)
|
parser.add_argument("-t", "--traceroute", default=None)
|
||||||
parser.add_argument("--example", action="store_true")
|
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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
locations = []
|
locations = []
|
||||||
@ -123,7 +124,10 @@ async def main():
|
|||||||
else:
|
else:
|
||||||
points_3d = [latlon_to_xyz(lat, lon) for lat, lon in locations]
|
points_3d = [latlon_to_xyz(lat, lon) for lat, lon in locations]
|
||||||
|
|
||||||
height, width = await kitty.get_terminal_size_pixel()
|
if args.size:
|
||||||
|
width, height = args.size
|
||||||
|
else:
|
||||||
|
height, width = await kitty.get_terminal_size_pixel()
|
||||||
plotter = TerminalPlotter(width, height)
|
plotter = TerminalPlotter(width, height)
|
||||||
plotter.add_mesh(globe, color="tan", smooth_shading=False, texture=tex, show_edges=False)
|
plotter.add_mesh(globe, color="tan", smooth_shading=False, texture=tex, show_edges=False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user