Skip to content

meichthys/onenote-html-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Onenote Html Export

Exports local onenote notebooks in html directory format. I've personally used the resulting files to import into Trilium Notes with good success.

❗ Note: If you want to convert an online notebook, import it into your Microsoft Office version of Onenote first.

The bulk of the code was taken from @passbe's blog post. The main change in this repository is the handling of onenote sub-pages and sub-sub-pages. If you would prefer sub-pages and sub-sub-pages to be exported in the same directory use @passbe's blog post script.

The output of onenote-powershell-html-export.ps1 will look like the following. The script will export all notebooks, sections, pages, sub-pages, sub-sub-pages, and attachments:

Export Directory
└── notebook
    └── section
        ├── page.htm
        ├── page
            ├── sub-page.htm
            └── sub-page
                └── sub-sub-page.htm
        └── page_files
            └── file.png
...

Usage

  • Have powershell installed
  • Open Onenote Desktop (Only Microsoft Office Versions of Onenote are supported by this script)
    • Import notebooks if exported from OneNote web version
  • Run the powershell script: onenote-powershell-html-export.ps1
    • Select your export directory.
    • Watch yourself exit Microsoft's walled garden
    • Check console for any errors (most can be ignored: see below)

Notes

  • Errors that look like the following can generally be ignored. They are usually a result of a deleted page or an outlook attachment/task: image
  • Page names containing invalid file/directory charachters are replaced with an underscore: 10_00am.htm replaces 10:00am

About

Exports local onenote notebooks in html directory format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published