Metadata-Version: 2.4
Name: nbsync
Version: 0.1.0
Summary: MkDocs plugin treating Jupyter notebooks, Python scripts and Markdown files as first-class citizens for documentation with dynamic execution and real-time synchronization
Project-URL: Documentation, https://daizutabi.github.io/nbsync/
Project-URL: Source, https://github.com/daizutabi/nbsync
Project-URL: Issues, https://github.com/daizutabi/nbsync/issues
Author-email: daizutabi <daizutabi@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Daizu
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: documentation,dynamic-execution,jupyter,markdown,mkdocs,notebook,python,real-time-sync,visualization
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.10
Requires-Dist: mkdocs>=1.6
Requires-Dist: nbstore>=0.4.7
Description-Content-Type: text/markdown

# nbsync

[![PyPI Version][pypi-v-image]][pypi-v-link]
[![Python Version][python-v-image]][python-v-link]
[![Build Status][GHAction-image]][GHAction-link]
[![Coverage Status][codecov-image]][codecov-link]

<strong>Connect Jupyter notebooks to your MkDocs documentation</strong>

nbsync is a MkDocs plugin that seamlessly embeds Jupyter notebook
visualizations in your documentation, solving the disconnect between
code development and documentation.

## Why Use nbsync?

### The Documentation Challenge

Data scientists, researchers, and technical writers face a common dilemma:

- **Development happens in notebooks** - ideal for experimentation and visualization
- **Documentation lives in markdown** - perfect for narrative and explanation
- **Connecting the two is painful** - screenshots break, exports get outdated

### Our Solution

This plugin creates a live bridge between your notebooks and documentation by:

- **Keeping environments separate** - work in the tool best suited for each task
- **Maintaining connections** - reference specific figures from notebooks
- **Automating updates** - changes to notebooks reflect in documentation

## Key Benefits

- **True Separation of Concerns**:
  Develop visualizations in Jupyter notebooks and write documentation
  in markdown files, with each tool optimized for its purpose.

- **Intuitive Markdown Syntax**:
  Use standard image syntax with a simple extension to reference
  notebook figures: `![alt text](notebook.ipynb){#figure-id}`

- **Automatic Updates**:
  When you modify your notebooks, your documentation updates
  automatically in MkDocs serve mode.

- **Clean Source Documents**:
  Your markdown remains readable and focused on content, without
  code distractions or complex embedding techniques.

- **Enhanced Development Experience**:
  Take advantage of IDE features like code completion and syntax
  highlighting in the appropriate environment.

## Quick Start

### 1. Installation

```bash
pip install nbsync
```

### 2. Configuration

Add to your `mkdocs.yml`:

```yaml
plugins:
  - nbsync:
      src_dir: ../notebooks
```

### 3. Mark Figures in Your Notebook

In your Jupyter notebook, identify figures with a comment:

```python
# #my-figure
import matplotlib.pyplot as plt

fig, ax = plt.subplots(figsize=(8, 4))
ax.plot([1, 2, 3, 4], [10, 20, 25, 30])
```

### 4. Reference in Markdown

Use standard Markdown image syntax with the figure identifier:

```markdown
![Chart description](my-notebook.ipynb){#my-figure}
```

## Advanced Usage

For more detailed information on how to use nbsync, see:

- [Notebook Configuration](usage/notebook.md) - Setting up notebook directories
- [Class Options](usage/class.md) - Control how notebook content is displayed
<!-- - [Workflow Tips](usage/workflow.md) - Best practices for documentation -->

## The Power of Separation

Creating documentation and developing visualizations involve different
workflows and timeframes. When building visualizations in Jupyter notebooks,
you need rapid cycles of execution, verification, and modification.

This plugin is designed specifically to address these separation of
concerns, allowing you to:

- **Focus on code** in notebooks without documentation distractions
- **Focus on narrative** in markdown without code interruptions
- **Maintain powerful connections** between both environments

Each environment is optimized for its purpose, while the plugin
handles the integration automatically.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.

## License

This project is licensed under the MIT License.

<!-- Badges -->
[pypi-v-image]: https://img.shields.io/pypi/v/nbsync.svg
[pypi-v-link]: https://pypi.org/project/nbsync/
[python-v-image]: https://img.shields.io/pypi/pyversions/nbsync.svg
[python-v-link]: https://pypi.org/project/nbsync
[GHAction-image]: https://github.com/daizutabi/nbsync/actions/workflows/ci.yaml/badge.svg?branch=main&event=push
[GHAction-link]: https://github.com/daizutabi/nbsync/actions?query=event%3Apush+branch%3Amain
[codecov-image]: https://codecov.io/github/daizutabi/nbsync/coverage.svg?branch=main
[codecov-link]: https://codecov.io/github/daizutabi/nbsync?branch=main
