eive-obsw/generators/gen.py

41 lines
1.0 KiB
Python
Raw Normal View History

2021-08-02 11:43:49 +02:00
#!/usr/bin/env python3
import time
from objects.objects import parse_objects
from events.event_parser import parse_events
from returnvalues.returnvalues_parser import parse_returnvalues
2022-03-01 18:03:50 +01:00
from fsfwgen.core import (
return_generic_args_parser,
init_printout,
)
2022-06-21 01:02:00 +02:00
from fsfwgen.logging import get_console_logger
LOGGER = get_console_logger()
2021-08-02 11:43:49 +02:00
def main():
2022-03-01 18:03:50 +01:00
init_printout(project_string="EIVE")
2021-08-02 11:43:49 +02:00
parser = return_generic_args_parser()
args = parser.parse_args()
2022-03-01 18:03:50 +01:00
if args.type == "objects":
2022-06-21 01:02:00 +02:00
LOGGER.info(f"Generating objects data")
2021-08-02 11:43:49 +02:00
time.sleep(0.05)
parse_objects()
2022-03-01 18:03:50 +01:00
elif args.type == "events":
2022-06-21 01:02:00 +02:00
LOGGER.info(f"Generating event data")
2021-08-02 11:43:49 +02:00
time.sleep(0.05)
parse_events()
2022-03-01 18:03:50 +01:00
elif args.type == "returnvalues":
2022-06-21 01:02:00 +02:00
LOGGER.info("Generating returnvalue data")
2021-08-02 11:43:49 +02:00
time.sleep(0.05)
parse_returnvalues()
2022-03-22 20:43:34 +01:00
elif args.type == "all":
2022-06-21 01:02:00 +02:00
LOGGER.info("Generating all data")
2022-03-22 20:43:34 +01:00
parse_objects()
parse_events()
parse_returnvalues()
2021-08-02 11:43:49 +02:00
if __name__ == "__main__":
main()