Ipynb Preview as Markdown
A Sublime Text plugin to preview a .ipynb file in Markdown.
Details
Installs
- Total 529
- Win 272
- Mac 164
- Linux 93
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 2 | 2 | 0 | 1 | 3 | 1 | 1 | 0 | 0 | 4 | 5 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 2 | 2 | 2 | 4 | 3 | 1 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 0 | 1 | 0 | 3 | 0 |
Mac | 0 | 1 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 2 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 2 | 2 | 1 | 0 | 1 | 0 | 0 | 4 | 1 | 3 | 0 | 2 | 0 | 1 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 2 | 0 | 1 |
Linux | 0 | 1 | 0 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 2 | 0 | 0 | 1 |
Readme
- Source
- raw.githubusercontent.com
Ipynb Preview as Markdown
Ipynb Preview as Markdown is a plugin for Sublime Text that enables users to view .ipynb
(Jupyter Notebook) files as Markdown directly within the editor. This plugin provides a convenient way to preview notebook files without leaving Sublime Text, displaying the Markdown, source code, and output cells in a readable format.
Features
Below is an overview of the capabilities integrated into this plugin:
Selective Cell Omission: Users have the flexibility to exclude specific cells from the final Markdown document. This includes the ability to omit cells containing source code, those that display outputs following execution, or both.
Image Handling Enhancements: To address the limitations of Base64 encoded images within notebooks, this tool automatically converts these images into references to temporary files. This approach not only makes the document more readable but also facilitates easier manipulation and sharing of the generated Markdown files.
Absolute Image Paths in Markdown Cells: For Markdown cells that include references to local images, the tool automatically replaces the original path with an absolute path. This adjustment ensures that images are correctly rendered when using document conversion plugins like Pandoc.
Language Preservation for Source Code Cells: In recognition of the diverse programming languages that can be used within notebooks, this tool maintains the original language specified for code cells in the notebook when converting to Markdown. This commitment to preserving the source language ensures that the syntax highlighting and other language-specific features remain intact in the final document, providing a seamless transition from notebook to Markdown format.
Installation
“Ipynb Preview as Markdown” can be installed either manually or via Package Control, the convenient package manager for Sublime Text.
Option 1: Install Using Package Control (Recommended)
- Install Package Control: If you haven't already, follow the installation instructions to install Package Control.
- Open Command Palette: Use
Shift+Ctrl+P
on Windows/Linux orCmd+Shift+P
on macOS to open the Command Palette. - Install Package: Type
Package Control: Install Package
and press Enter. - Find and Install: Search for “Ipynb Preview as Markdown” in the list, then press Enter to install it.
- Restart Sublime Text: Ensure the plugin is properly loaded.
Option 2: Manual Installation
- Download the Plugin: Clone this repository or download the ZIP file and extract it.
- Locate Sublime Text Packages Directory:
- On Windows, the path is usually
C:\Users\<Your Username>\AppData\Roaming\Sublime Text 3\Packages\
- On macOS, the path is usually
/Users/<Your Username>/Library/Application Support/Sublime Text 3/Packages/
- On Linux, the path is usually
~/.config/sublime-text-3/Packages/
- On Windows, the path is usually
- Install the Plugin: Copy the plugin directory (containing
ipynb_viewer.py
andDefault.sublime-commands
files) into the Sublime Text Packages directory. - Restart Sublime Text: This ensures the plugin is loaded and ready to use.
Usage
To use the “Ipynb Preview as Markdown” plugin:
- Open a
.ipynb
file in Sublime Text. - Open the Command Palette using
Shift+Ctrl+P
(orCmd+Shift+P
on macOS). - Type Preview ipynb as Markdown and select the command when it appears.
- A new window will open with the Markdown preview, showing all the types of cell (Markdown, Source code, or Result). The preview is read-only and cannot be edited.
- Type instead Preview ipynb as Markdown (No output) to ommit the cells with results in the preview.
- Type instead Preview ipynb as Markdown (No code) to ommit the cells with source code in the preview.
- Type instead Preview ipynb as Markdown (No code, No output) to show only the Markdown cells in the preview.
License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 Valentin Barral
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.