Replies: 1 comment 1 reply
-
|
The post hook runs strictly after all files have been generated, so you’ll be able to access the generated files and directories from within the post hook. For example, the following post hook will print all generated files and directories: #!/usr/bin/env python3
from typing import Any, TypedDict
import pathlib
import os
import sys
import json
class Input(TypedDict):
answers: dict[str, Any]
template_dir: str
output_dir: str
def main():
context: Input = json.load(sys.stdin)
path = pathlib.Path()
output_dir = path / context["output_dir"]
for f in os.listdir(output_dir):
print(f)
if __name__ == "__main__":
main()Could you provide more details about your case? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to add a post finished hook that have the same information as post hook but can operate on the generated files and folders?
Beta Was this translation helpful? Give feedback.
All reactions