-
Notifications
You must be signed in to change notification settings - Fork 95
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
Consider stripping out only IMAGES as option #58
Comments
Interesting, that sounds like a useful option. How do you see the "UI" of this option? Suppose this could even be easily generalized to support any data type to either keep or strip out. |
As an example, how about along these lines?
|
I thought about this as I was implementing
Thus |
@jpeacock29 Re: more output types. Consider a flag like where a user can implement their custom stripout by giving a regular expression. |
Sounds quite sensible! Let's start with images since this seems to be the most important case. One of you happy to have a go at this @rsvp @jpeacock29 ? |
What would the regex flag be matched against? Every key in the ipynb? |
@jpeacock29 here's a mock example for PNG images: That should get rid of the super long lines encoding PNG images for now. But --regex would be a handy tool in any case. |
Feel free to have a go at this, I'm not sure when I might find time to work on it myself. |
One of you interested in working on this @rsvp @jpeacock29 ? |
Are you still interested in this @rsvp @jpeacock29 ? |
hi @kynan my spare cycles are going to refactoring https://git.io/fecon235 Interestingly, one of the reasons leading to the spin-off of the source code So this issue is still pertinent. |
@rsvp do you still have this use case? |
There's an in flight pull request (#135) that's somewhat related: only strip outputs that are larger than a certain size. Would that fit the bill? |
Given #135 has been released in nbstripout 0.5.0 and is arguably even more flexible than what's requested here I'll close this as fixed. |
Frequently the output is useful as informal "testing" of results,
and there is very little overhead in keeping non-graphical results.
Images, however, add considerable unwanted bulk to a commit
for any version control system (unless those images are very
expensive to reproduce, or are historical for some reason).
Proposal: provide an option to strip out only output cells with images.
The text was updated successfully, but these errors were encountered: