eive-obsw/generators/gen.py
Robin Mueller 72ab141b41
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
use lib logger
2022-06-21 01:02:00 +02:00

41 lines
1.0 KiB
Python
Executable File

#!/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
from fsfwgen.core import (
return_generic_args_parser,
init_printout,
)
from fsfwgen.logging import get_console_logger
LOGGER = get_console_logger()
def main():
init_printout(project_string="EIVE")
parser = return_generic_args_parser()
args = parser.parse_args()
if args.type == "objects":
LOGGER.info(f"Generating objects data")
time.sleep(0.05)
parse_objects()
elif args.type == "events":
LOGGER.info(f"Generating event data")
time.sleep(0.05)
parse_events()
elif args.type == "returnvalues":
LOGGER.info("Generating returnvalue data")
time.sleep(0.05)
parse_returnvalues()
elif args.type == "all":
LOGGER.info("Generating all data")
parse_objects()
parse_events()
parse_returnvalues()
if __name__ == "__main__":
main()