Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basnijholt/ipynb_git_filters
🤖 Clean your notebook outputs with every commit!
https://github.com/basnijholt/ipynb_git_filters
git git-filter ipynb jupyer-notebook nbconvert
Last synced: 27 days ago
JSON representation
🤖 Clean your notebook outputs with every commit!
- Host: GitHub
- URL: https://github.com/basnijholt/ipynb_git_filters
- Owner: basnijholt
- License: mit
- Created: 2018-04-11T12:04:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-15T00:19:40.000Z (almost 4 years ago)
- Last Synced: 2024-09-27T23:41:05.849Z (about 1 month ago)
- Topics: git, git-filter, ipynb, jupyer-notebook, nbconvert
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 7
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# strip output and metadata from your `.ipynb` as a git filter
`ipynb_filter.py`: using `nbconvert` to remove the a notebook's output on each commit to not clutter up your Git history.
* `+` No external dependencies, if you have `Jupyter notebook` installed you will have `nbconvert`
* `-` A bit slow, ~150 ms
* `-` need to make sure that every contributor uses it (otherwise it will result in conflicts)## Usage, install and forget
### Option 1 (fast)
Run `wget https://raw.githubusercontent.com/basnijholt/ipynb_git_filters/master/ipynb_filter.py && echo "*.ipynb filter=ipynb_filter" >> .gitattributes && python ipynb_filter.py`### Option 2 (manual, slow)
1. Copy `ipynb_filter.py` into your project root
2. Add the following line to your `.gitattributes`: `*.ipynb filter=ipynb_filter`
3. run `python ipynb_filter.py`