-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow export command to create subfolders via file format #300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey that's super cool! Thanks for you contribution.
I think a slightly shorter flag name would make this a bit easier to use (see above) :)
Hah! I did this myself in a local branch to test things. I like the idea of a flag to enable it. But I can also see why it is dangerous in the first place. Tanka runs the replace, probably to cover things like labels or whatnot having slashes and getting put into file paths. So is there a way to allow explicit path breaks in a format sting, without accidentally getting path breaks from malformed data inside the templates? My dirty solution was to use
To add safety, perhaps a template function to put in some even more unlikely string so you don't accidentally use it. Maybe something like that would allow this functionality without a new flag? |
Ah thats a great idea with the template function. Will check it out and report later on |
Awesome that works even better and is super intuitive :D Just insert the |
Anything else left to do? |
Hey @simonfrey, sorry for the delay here. I talked about this with @malcolmholmes and we both feel the What he suggested instead, is to replace all occurences of Finally, you replace all Let me know if that sounds good to you as well, happy to discuss :) |
Tried it and it feels more natural. Added the change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Some nits and we are good to go :)
This change allows to create subfolders via the
--format
flag.In order to allow controlledcreation of subfolders and not accidentally do it when there is a
/
in the format the new flag--allow-subfolder-creation
needs to be set to enable this feature.Without setting the flag the behavior of the command is equal to before.
Edit: Thanks to @captncraig this uses a template function for format now instead of the less secure way with the flag