diff --git a/project.py b/project.py index 1bbe4d8..9483d80 100644 --- a/project.py +++ b/project.py @@ -375,6 +375,9 @@ class Project: def print_wokwi_id(self): print(self.wokwi_id) + def print_top_module(self): + print(self.top_module) + def fetch_wokwi_files(self): logging.info("fetching wokwi files") src_file = self.src_files[0] diff --git a/tt_tool.py b/tt_tool.py index 25bfc40..40714f6 100755 --- a/tt_tool.py +++ b/tt_tool.py @@ -57,6 +57,12 @@ if __name__ == "__main__": action="store_const", const=True, ) + parser.add_argument( + "--print-top-module", + help="prints the name of the top module", + action="store_const", + const=True, + ) # documentation parser.add_argument( @@ -134,6 +140,9 @@ if __name__ == "__main__": if args.print_wokwi_id: project.print_wokwi_id() + if args.print_top_module: + project.print_top_module() + if args.create_user_config: project.create_user_config()