A Redmine plugin that renders Jupyter notebook (.ipynb) previews inline — directly on issue pages, wiki pages, and documents, without leaving Redmine.
EXPERIMENTAL — opt-in: This plugin is not part of the production core. Expect defects, incomplete features, performance limits and breaking changes. Do not install it if you require production-level stability and support. Keep evaluation within the documented deployment flow.
- Inline previews of
.ipynbattachments on issues, wiki pages, and documents - Wiki macro
{{notebook_preview(filename.ipynb)}}for embedding previews in wiki content - LaTeX formulas in notebook previews are rendered by the separate
redmine_cbots_latexplugin. - Cache management — previews are generated once and cached; admins can purge the cache from the plugin settings page
- Report export — usable in cosmoSys reports exported to PDF, ODT and DOCX; LaTeX formulas are converted to images
- Permission-aware — regenerate button is only shown to users with edit rights
- Redmine 6.x
redmine_cbots_latexis a required plugin dependency, not an optional enhancement. Notebook Preview will refuse to load if it is missing; it also provides MathJax and static formula rendering.- Python 3 with
nbconvertinstalled and accessible to the Redmine process - A writable directory for the preview cache
git clone https://github.com/cosmobots/redmine_notebook_preview \
plugins/redmine_notebook_previewInstala primero
redmine_cbots_latex en
plugins/redmine_cbots_latex. redmine_notebook_preview comprueba esta
dependencia obligatoria al cargar y genera un error si no está instalada.
The plugin delegates conversion to jupyter nbconvert. Install it in a virtual environment:
python3 -m venv /opt/nbconvert-env
/opt/nbconvert-env/bin/pip install nbconvert nbformat jupyter_core matplotlibRestart your Redmine process to load the plugin.
Go to Administration → Plugins → Notebook Preview → Configure and set:
| Setting | Description |
|---|---|
| Jupyter binary path | Full path to the jupyter binary, e.g. /opt/nbconvert-env/bin/jupyter |
| Cache directory | Writable directory for cached HTML previews, e.g. /var/cache/redmine/notebook_preview |
Attach a .ipynb file to any issue. The preview will appear automatically below the issue description.
Embed a preview of a notebook attached to the current wiki page:
{{notebook_preview(analysis.ipynb)}}
If a preview fails or becomes stale, users with edit rights will see a Regenerate preview button below the preview area.
Admins can purge all cached previews at once from Administration → Plugins → Notebook Preview → Configure.
When a page that uses {{notebook_preview(...)}} is exported to PDF, ODT or
DOCX (for example a cosmoSys report), the preview is included as static HTML:
- Images are embedded as plain base64 data URIs.
- LaTeX formulas are converted to PNG images by
redmine_cbots_latex, because exporters cannot run MathJax. This uses matplotlib'smathtext, so it needsmatplotlibin the same virtual environment asjupyter(see installation). It covers the common subset of LaTeX (fractions, roots, sums, Greek letters, sub/superscripts). Environments such asalignormatrixare not supported and stay as text. Ifmatplotlibis missing, formulas also stay as text.
Previews cached before this behaviour existed must be regenerated (purge the cache from the plugin settings page).
Air-gapped deployments: MathJax is loaded from a CDN for LaTeX rendering. In environments without internet access, mathematical notation will not render. To support air-gapped deployments, configure
redmine_cbots_latexto load MathJax locally.
bundle exec rake redmine:plugins:migrate NAME=redmine_notebook_preview VERSION=0 RAILS_ENV=productionThen delete the plugin folder and restart Redmine.
Use persistent storage for Redmine files and the preview cache. Configure
JUPYTER_BIN for the Python environment containing nbconvert and matplotlib,
and NOTEBOOK_CACHE_DIR for a directory writable by the Redmine process.
The included Dev Container is for development, not a production deployment.
This plugin is distributed under GNU GPL v3; see LICENSE.txt.
For questions about this plugin, contact
cosmobots.eu@gmail.com.