Giter VIP home page Giter VIP logo

onenote2md's Introduction

onenote2md

An automated tool to convert OneNote notebooks to markdown files. ๐Ÿ‘

Features

  • 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.

How to use it

  • 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 object model

  • OneNote uses a simple object model of nested hierarchical objects. The base object is the Notebook which contain SectionGroups and Section objects which in turn contain Page 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 a PageLevel.
  • 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>

OneNote object model synopsis:

Notebook
    SectionGroup
        SectionGroup
        Section
    Section
        Page
            OEChildren

Mapping

  • We map OneNote content to markdown using the following conventions:
  • Rich text formatting (bold, italic, underline) is retained.

Page Title

  • Converted to heading 1 (#).

Headers

  • OneNote headers (heading 1 to 6) are mapped to md headers (# to ######).

Quotes and Citations

  • Quotes and Citations a converted to italics.

Code

  • Code is converted to single line or
multiline 

Rich text

  • Italics is converted to italics.
  • Bold is converted to bold.
  • Underline is converted to bold.
  • Strikethrough is converted to strikethrough.

Lists

  • Unordered lists use * for list beginning and white space nesting for nesting such as:

    • Sub list
      • Sub list
        • Sub list
          • Sub list
  • Ordered lists use 1 for list beginning and white space nesting for nesting such as:

    1. Sub list
      1. Sub list
      2. Sub list
    2. Sub list
      1. Sub list
      2. Sub list

Links

Images

  • 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:
  • alt text

Tables

  • 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

  • Html can be embedded within md.

Horizontal rule


Videos

IMAGE ALT TEXT HERE

Task lists

  • Converted to md as:
    • Task 1
    • Task 2 completed

Tag

  • Converted using emojis such as ๐Ÿ‘

Attachments

  • Linked in place

example-attachment.pdf

Roadmap

  • Support handwriting, drawing etc as image export.

Resources

OneNote

Markdown

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.