We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0721012 commit 335d7b7Copy full SHA for 335d7b7
ctfcli/cli/templates.py
@@ -2,7 +2,9 @@
2
import shutil
3
import subprocess
4
from glob import glob
5
+from pathlib import Path
6
7
+from ctfcli.utils.config import get_base_path
8
from ctfcli.utils.templates import get_template_dir
9
10
@@ -18,6 +20,12 @@ def uninstall(self, template_name):
18
20
shutil.rmtree(template_dir)
19
21
22
def list(self):
23
+ # Print included templates
24
+ path = Path(get_base_path()) / "templates"
25
+ for dir in path.iterdir():
26
+ print(dir.relative_to(path))
27
+
28
+ # Print installed templates
29
template_dir = get_template_dir() + "/"
30
for template in glob(f"{template_dir}/**/*/cookiecutter.json", recursive=True):
31
# Remove prefix of template_dir and remove suffix of /cookiecutter.json
0 commit comments