Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

one2md

one2md converts Microsoft OneNote® files to Markdown. It supports converting single sections (.one files), complete notebooks (.onetoc2 files), and notebook packages (.onepkg files).

It is the Markdown sibling of one2html, built on the same OneNote parser.

Features

  • Converts sections, whole notebooks, and notebook packages
  • Rich text formatting (bold, italic, highlights, hyperlinks, …)
  • Nested lists and tables
  • OneNote to-do tags, rendered as GitHub-flavored Markdown task lists (- [ ] / - [x])
  • Math equations, rendered as LaTeX
  • Ink drawings, rendered as inline SVG
  • Images and embedded file attachments, extracted next to the generated Markdown files

Installation

You'll need the latest stable Rust compiler. Then install from crates.io:

cargo install one2md

Or build and install from source:

git clone https://github.com/msiemens/one2md
cd one2md
cargo install --path .

Alternatively, you can download a pre-built binary from the releases page.

Usage

Step 1: Download OneNote files

First you need to download your OneNote notebooks or sections from OneDrive. Due to limitations of the OneNote parser, only files downloaded from OneDrive are supported. Files created by the OneNote 2016 desktop application cannot be converted.

To download your files, you can use one of these methods:

  • onedrive-cli: onedrive-cli cp -R 'Documents/NotebookName' .
  • The OneDrive website: select the notebook or section you want to download, then click "Download" in the toolbar.

Step 2: Convert to Markdown

Convert a single section:

one2md -i 'Section.one' -o ./output_dir/

Convert a whole notebook:

one2md -i 'Notebook/Open Notebook.onetoc2' -o ./output_dir/

Convert a notebook package:

one2md -i 'Notebook.onepkg' -o ./output_dir/

Each section is converted into a folder of Markdown files, one per page, with images and attachments stored alongside them.

Related projects

  • one2html: Convert OneNote files to HTML
  • onenote.rs: The OneNote file format parser powering this tool

License

This project is licensed under the MIT License.

Disclaimer

This project is neither related to nor endorsed by Microsoft in any way. The author does not have any affiliation with Microsoft.

About

Convert OneNote files to Markdown

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages