{"action":"created","issue":{"url":"https://api.github.com/repos/audreyr/cookiecutter/issues/900","repository_url":"https://api.github.com/repos/audreyr/cookiecutter","labels_url":"https://api.github.com/repos/audreyr/cookiecutter/issues/900/labels{/name}","comments_url":"https://api.github.com/repos/audreyr/cookiecutter/issues/900/comments","events_url":"https://api.github.com/repos/audreyr/cookiecutter/issues/900/events","html_url":"https://github.com/audreyr/cookiecutter/issues/900","id":205727183,"number":900,"title":"Support nested directory generation","user":{"login":"foxmk","id":5107532,"avatar_url":"https://avatars0.githubusercontent.com/u/5107532?v=3","gravatar_id":"","url":"https://api.github.com/users/foxmk","html_url":"https://github.com/foxmk","followers_url":"https://api.github.com/users/foxmk/followers","following_url":"https://api.github.com/users/foxmk/following{/other_user}","gists_url":"https://api.github.com/users/foxmk/gists{/gist_id}","starred_url":"https://api.github.com/users/foxmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxmk/subscriptions","organizations_url":"https://api.github.com/users/foxmk/orgs","repos_url":"https://api.github.com/users/foxmk/repos","events_url":"https://api.github.com/users/foxmk/events{/privacy}","received_events_url":"https://api.github.com/users/foxmk/received_events","type":"User","site_admin":false},"labels":[{"id":47798247,"url":"https://api.github.com/repos/audreyr/cookiecutter/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-06T22:28:34Z","updated_at":"2017-06-04T12:03:35Z","closed_at":null,"body":"It would be nice to have support for creating directory hierarchies.\r\n\r\nFor example: template directory `{{cookiecutter.package_name}}` creates \r\n`com/example/foo` if `coockiecutter.package_name` variable is `com.example.foo`.\r\n\r\nAn intuitive way would be `{{ cookiecutter.package_name | lower | replace('.', '/') }}`, but \r\nit doesn't work properly. On Mac created directory is named `com/example/foo` \r\nin Finder (not nested) and `com:example:foo` in console:\r\n\r\n```sh\r\n~ $ ls -la\r\ndrwxr-xr-x   3 foxmk   102B Feb  6 23:23 com:example:foo/\r\n```\r\n\r\nI suppose it can be done with custom Jinja function like `mkdirs`, if you name \r\ntemplate directory like `{{cookiecutter.package_name|mkdirs}}` it will replace `.` in\r\nvariable with correct path creation.\r\n\r\nThis could be very helpful for Java and Scala cookiecutters."},"comment":{"url":"https://api.github.com/repos/audreyr/cookiecutter/issues/comments/306035976","html_url":"https://github.com/audreyr/cookiecutter/issues/900#issuecomment-306035976","issue_url":"https://api.github.com/repos/audreyr/cookiecutter/issues/900","id":306035976,"user":{"login":"hackebrot","id":6024445,"avatar_url":"https://avatars2.githubusercontent.com/u/6024445?v=3","gravatar_id":"","url":"https://api.github.com/users/hackebrot","html_url":"https://github.com/hackebrot","followers_url":"https://api.github.com/users/hackebrot/followers","following_url":"https://api.github.com/users/hackebrot/following{/other_user}","gists_url":"https://api.github.com/users/hackebrot/gists{/gist_id}","starred_url":"https://api.github.com/users/hackebrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackebrot/subscriptions","organizations_url":"https://api.github.com/users/hackebrot/orgs","repos_url":"https://api.github.com/users/hackebrot/repos","events_url":"https://api.github.com/users/hackebrot/events{/privacy}","received_events_url":"https://api.github.com/users/hackebrot/received_events","type":"User","site_admin":false},"created_at":"2017-06-04T12:03:35Z","updated_at":"2017-06-04T12:03:35Z","body":"Hi @foxmk! 👋 \r\n\r\nThank you for your suggestion. As of now, this won't work out-of-the-box and will need some pre- and post-generation hooks. I have created an [example cookiecutter](https://github.com/hackebrot/cookiecutter-examples/tree/master/create-directories) to demonstrate what I mean by that.\r\n\r\nThank you for your interest, @SapanaJadhav! That's awesome 👍 \r\n\r\nI'm not sure how we want to solve this, do you have ideas? Ideally we add a *filepath* variable type to #848 and apply some extra processing for variables of that type.\r\n\r\nAny thoughts @pydanny @audreyr @michaeljoseph?"}}
{"actor":{"display_login":"hackebrot"}}