Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/genietim/onenoteexporter
Export some OneNote pages as a combined HTML
https://github.com/genietim/onenoteexporter
Last synced: 11 days ago
JSON representation
Export some OneNote pages as a combined HTML
- Host: GitHub
- URL: https://github.com/genietim/onenoteexporter
- Owner: GenieTim
- License: gpl-3.0
- Created: 2019-11-17T16:35:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-06T18:19:33.000Z (2 months ago)
- Last Synced: 2024-10-11T13:13:34.558Z (27 days ago)
- Language: JavaScript
- Size: 361 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OneNoteExporter
Export some OneNote pages as a combined HTML file.At the moment, it works for me, but may need additional adjustments for your use.
An introduction how I used this repo can be found in my [Blog](https://www.genieblog.ch/blog/en/2020/onennote-to-latex).- [OneNoteExporter](#onenoteexporter)
- [Overview](#overview)
- [Usage](#usage)
- [Using API](#using-api)
- [Using Browser](#using-browser)## Overview
Motivation: export certain pages automated.
Unfortunately, I did not find an easy way around a web-interface for the Office 365 login except for the direct interaction with OneNote online. Read further for the two approaches and their benefits.
## Usage
Make sure to have [NodeJS](https://nodejs.org/en/) and [yarn](https://yarnpkg.com/) installed.
After downloading the repository, run `yarn` in this directory to install all necessary components.### Using API
This approach uses the official OneNote API (resp. Microsoft Graph).
A webpage helps to choose which pages to download if you don't know their IDs.- create a msal.config.js file in the config folder, fill it appropriately as listed in the msal documentation
- Use `yarn compile` to run browserify (make sure to have it installed).
- Use the files src/one-note-diary-export.{bundle.js, html} on your server. Have fun.### Using Browser
This approach uses Puppeteer so you can just navigate to the page in OneNote online to download the relative pages.
Advantage includes an easier application (no need to register this app in your Azure AD)
and more content (math equations are not supported by the API).
Disadvantages include more complicated HTML and more manual work, as you have to export each page separately.- Run `node ./bin/interactive-exporter.js`
- Follow the instructions in the CMD/act accordingly in the browser.