Skip to main content

Jupyter Code Cells to TXT

PyPI version Build Status License

A simple command-line tool for extracting code cells from Jupyter notebooks. Optionally, it allows extraction of all cell types including markdown.

Table of Contents

Installation

Development Installation

For those contributing and making changes to the codebase, it's often more efficient to install the package in 'editable' mode. This way, changes you make to the source immediately reflect in the installed package.

To install in editable mode:

python setup.py develop

This will set up a link to your source code, so you won't have to repackage and reinstall every time you make a change.

Local Installation

  1. Clean the dist directory to prevent old distributions:
rm -r dist/*
  1. Package the project:
python setup.py sdist bdist_wheel
  1. Install the packaged distribution (Note: the version might depend on what is set in setup.py):
pip install --upgrade dist/jupyter-code-extractor-0.1.tar.gz

Usage

After installation, you can run the jupyter-code-extractor directly from the CLI.

To extract all cell types, use the --all-cells option:

jupyter-code-extractor --all-cells your_notebook.ipynb

Without the --all-cells option, only code cells will be extracted.

Requirements

  • Python 3.x
  • Other dependencies can be found in the requirements.txt file.

Contributing

For contributions, please create a fork, make your changes, and submit a pull request. Details on the development setup and guidelines can be found in the CONTRIBUTING.md file.

Once pull requests are approved and merged, maintainers will handle versioning and releases. New releases on GitHub will automatically trigger package updates on PyPI via GitHub Actions.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Changelog

For a detailed history of changes, see CHANGELOG.md.

  • 0.1 - Initial release with basic features.
  • 0.2 - ... (and so on for a few recent versions)

For any issues or contributions, please open an issue or pull request.

Metadata

Release files for jupyter-code-extractor 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyter-code-extractor 0.1.2
File Size Uploaded
jupyter-code-extractor-0.1.2.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-code-extractor 0.1.2
File Interpreter ABI Platform
jupyter_code_extractor-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.2 kB

Release files / jupyter-code-extractor-0.1.2.tar.gz

Download URL jupyter-code-extractor-0.1.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2fcc04a21025deb92822af1066a364331ff7f452c582ed12bd584a2e8b246004
BLAKE2b-256 checksum
How to use checksums
577558fd00310de7306a835815d3648fcbc4a6ce23a472f290190a6892107e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / jupyter_code_extractor-0.1.2-py3-none-any.whl

Download URL jupyter_code_extractor-0.1.2-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19eb74f5c30b5a2ec657f9bd712008017eb5dfa6aed0f8848940814527479cd0
BLAKE2b-256 checksum
How to use checksums
94df9f2c53bb444cdb27e9051e8e418b4a865124c6cb30677ae11543426528a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page