26 lines
554 B
Python
26 lines
554 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import argparse
|
||
|
import uuid
|
||
|
import webbrowser
|
||
|
|
||
|
OBS_URL_F = "https://openobs.mnhn.fr/redirect/sinp/occurrences/{obs_uuid}"
|
||
|
TEST1 = "45A202E8-A4D0-41E9-AC27-041004CB8AD0"
|
||
|
TEST2 = "45A202E8A4D041E9AC27041004CB8AD0"
|
||
|
|
||
|
|
||
|
def main():
|
||
|
parser = argparse.ArgumentParser()
|
||
|
parser.add_argument("uuid")
|
||
|
args = parser.parse_args()
|
||
|
open_uuid(args.uuid)
|
||
|
|
||
|
|
||
|
def open_uuid(uuid_str: str):
|
||
|
obs_uuid = uuid.UUID(uuid_str)
|
||
|
webbrowser.open_new_tab(OBS_URL_F.format(obs_uuid=str(obs_uuid)))
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|