-
Notifications
You must be signed in to change notification settings - Fork 520
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
cli option to output files as individual part files or .zip of parts #1263
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.
@tsdexter Cool! Nice set of changes, and tests!
I just suggested one little change.
Also, I'm wondering if 'parts' parameter should be named something like 'generateParts'.
I'm also wondering if the zip option might be applicable to all designs. It's really a convenience features, so why not allow all output to be zipped?
I will make adjustments sometime tomorrow. I agree I also thought about having zip flag for single part exports as well, but figured it wasn't necessary as they will always be one file anyway. However, I think there is still the use case of having a zip file for sharing and other use cases where certain formats are disallowed. I will add it as an option for all export types. |
- allow zipping single file exports - add test for single file export as zip - refactor zip tests to check actual zip contents
@z3dev I've added zip functionality to all exports (single or multi-file). I've created a test for single file .zip exports as well as refactoring the zip tests to actually check the contents of the zip file, instead of just its existence. |
@z3dev another feature that would be useful for me specifically is a
If the flag is used and the file exists, it would automatically use the .zip functionality and export all of your models files alongside the license.txt in a .zip file. Should I add this to the CLI as a useful feature for everyone, or do you think this should be handled in my own workflow? |
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.
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.
Looks good. I like the addition.
Also other mentioned features are interesting and could be another PR.
@z3dev whats the process for merging/releasing? |
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.
Overall looks good. I tested locally variations of zipped, unzipped, and various numbers of parts (including 0, 1, many parts) all seemed fine.
My only minor comment would be I wish we could have more descriptive cli flags names like "--parts" and "--zip". But this is a more general comment. But this PR is consistent with the current cli use of short names.
Thanks this is a nice contribution @tsdexter! I've had to use awkward parameter tricks to generate multipart files in the past, and this would make some use cases easier.
Adds the CLI export utilities a
-p
flag to output multiple parts as separate files as well as a-z
flag to zip the multiple files into onedesign.zip
exported filerelated: #1262
All Submissions:
Thank you for your help in advance, much appreciated !