diff options
author | crupest <crupest@outlook.com> | 2024-11-11 01:12:29 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-01-09 20:33:26 +0800 |
commit | c761b945bc8ab0226576b75144440e1f619e69e8 (patch) | |
tree | 177071951d8bcd2de37876f875fdfed07a1dd809 /tools/cru-py/cru/service/_template.py | |
parent | 47ebda69daa34ea7992b6bbadf46de98dd17a390 (diff) | |
download | crupest-c761b945bc8ab0226576b75144440e1f619e69e8.tar.gz crupest-c761b945bc8ab0226576b75144440e1f619e69e8.tar.bz2 crupest-c761b945bc8ab0226576b75144440e1f619e69e8.zip |
HALF WORK: 2024.1.9 - 2
Diffstat (limited to 'tools/cru-py/cru/service/_template.py')
-rw-r--r-- | tools/cru-py/cru/service/_template.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/cru-py/cru/service/_template.py b/tools/cru-py/cru/service/_template.py index 23bff4d..3ffb15e 100644 --- a/tools/cru-py/cru/service/_template.py +++ b/tools/cru-py/cru/service/_template.py @@ -64,10 +64,16 @@ class TemplateManager(AppCommandFeatureProvider): def setup_arg_parser(self, arg_parser): subparsers = arg_parser.add_subparsers(dest="template_command") _list_parser = subparsers.add_parser("list", help="List templates.") + _variables_parser = subparsers.add_parser( + "variables", help="List variables for a specific template." + ) _generate_parser = subparsers.add_parser("generate", help="Generate template.") def run_command(self, args: Namespace) -> None: if args.template_command == "list": self.print_file_lists() + elif args.template_command == "variables": + for var in self.template_tree.variables: + print(var) elif args.template_command == "generate": self.generate_files() |