An automated tool to convert OneNote notebooks to markdown files. 👍
- Convert OneNote 2016 Notebooks/Sections/Section Groups/Pages to folders and md files.
- Retains rich text formatting.
- Handles lists.
- Converts OneNote tables to md tables (GFM).
- Maps images to files and provide links to md files.
- Converts tags/todo lists.
- Converts code blocks/citations/quotes.
- Execute from command-line using
Onenote2md.Cmd NOTEBOOKNAME
to convert your notebook to md in current directory. - Use
Onenote2md.Cmd NOTEBOOKNAME OUTPUTDIR
to specify your output directory.
- OneNote uses a simple object model of nested hierarchical objects.
The base object is the
Notebook
which containSectionGroups
andSection
objects which in turn containPage
objects. - Page contain the actual note information including text, image, lists, table and other formatted content.
- Page itself is further decomposed into a hierachical structure containing page object
OEChildren
elements. - Each Page specifies a
Title
and aPageLevel
. - Each OEChildren can further contain:
- Text
- List
- Table
- Image
- Further OEChildren elements.
- Formatted text is maintained as CDATA HTML content.
- A table is specified with the following format:
Table:
<one:OE>
<one:Table>
<one:Columns>
<one:Column index=0 width=>
<one:Column index=n width=>
</one:Columns>
<one:Row>
<one:Cell>
<one:T>
<one:Cell>
</one:Row>
Notebook
SectionGroup
SectionGroup
Section
Section
Page
OEChildren
- We map OneNote content to markdown using the following conventions:
- Rich text formatting (bold, italic, underline) is retained.
- Converted to heading 1 (#).
- OneNote headers (heading 1 to 6) are mapped to md headers (# to ######).
- Quotes and Citations a converted to italics.
- Code is converted to
single line
or
multiline
- Italics is converted to italics.
- Bold is converted to bold.
- Underline is converted to bold.
- Strikethrough is converted to
strikethrough.
-
Unordered lists use * for list beginning and white space nesting for nesting such as:
- Sub list
- Sub list
- Sub list
- Sub list
- Sub list
- Sub list
- Sub list
-
Ordered lists use 1 for list beginning and white space nesting for nesting such as:
- Sub list
- Sub list
- Sub list
- Sub list
- Sub list
- Sub list
- Sub list
- Images are converted to png/jpg and linked as local image files.
- Every image is stored in the same folder as its page.
- Sample images:
- Inline-style:
- Tables are supported through GFM.
- Tables can contain rich text.
- Lists within tables are not supported.
- Sample table :
Tables | Are | Cool |
---|---|---|
col 3 is | right-aligned | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | aaaa |
- Html can be embedded within md.
- Converted to md as:
- Task 1
- Task 2 completed
- Converted using emojis such as 👍
- Linked in place
- Support handwriting, drawing etc as image export.