{"action":"opened","issue":{"url":"https://api.github.com/repos/audreyr/cookiecutter/issues/851","repository_url":"https://api.github.com/repos/audreyr/cookiecutter","labels_url":"https://api.github.com/repos/audreyr/cookiecutter/issues/851/labels{/name}","comments_url":"https://api.github.com/repos/audreyr/cookiecutter/issues/851/comments","events_url":"https://api.github.com/repos/audreyr/cookiecutter/issues/851/events","html_url":"https://github.com/audreyr/cookiecutter/issues/851","id":189913785,"number":851,"title":"Access the Context dict in the Pre/Post-Generate Hook scripts","user":{"login":"tuxredux","id":13526277,"avatar_url":"https://avatars.githubusercontent.com/u/13526277?v=3","gravatar_id":"","url":"https://api.github.com/users/tuxredux","html_url":"https://github.com/tuxredux","followers_url":"https://api.github.com/users/tuxredux/followers","following_url":"https://api.github.com/users/tuxredux/following{/other_user}","gists_url":"https://api.github.com/users/tuxredux/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxredux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxredux/subscriptions","organizations_url":"https://api.github.com/users/tuxredux/orgs","repos_url":"https://api.github.com/users/tuxredux/repos","events_url":"https://api.github.com/users/tuxredux/events{/privacy}","received_events_url":"https://api.github.com/users/tuxredux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-17T02:11:00Z","updated_at":"2016-11-17T02:11:00Z","closed_at":null,"body":"Hey, just want to start off by saying thanks for making this awesome project! :)\r\n\r\nThe title says it all--is there any way to access the CLI Context dictionary in the `pre_gen_project.py` and `post_gen_project.py` hook scripts? I want to be able to add an extra context variable [(a timestamp just like the example)](https://cookiecutter.readthedocs.io/en/latest/advanced/injecting_content.html#example-injecting-a-timestamp), but without having to write my own script that wraps the `cookiecutter.main.cookiecutter` function. I also wanted to be able to reassign the context variables if validation fails, [instead of just raising an exception](https://cookiecutter.readthedocs.io/en/latest/advanced/hooks.html#example-validating-template-variables).\r\n\r\nAny help is greatly appreciated! Keep up the great work!"}}
{"actor":{"display_login":"tuxredux"}}