This is an addon for browser that permits to convert OneNote notes into Xournal++ XOPP format.
This is an evolution of my old Python script that did more or less the same thing. The difference with the Python script is that the addons works directly inside the browser so it can retrieve more data useful (mainly offsets between elements once rendered) to the conversion.
Exporting your note into Xournal++ format can be useful for multiple reason:
- the web version of OneNote is painfully slow;
- OneNote doesn't permit you to export PDF (or, it exports your extremely long note sheet into multiple A4), Xournal does;
- Xournal++ is open source :D
Please note that there's no way to convert back your notes or import them again into OneNote.
The addons scans the page looking for the images, pen/highlighter strokes and texts.
Once it founds them, it does a best effort conversion from HTML format to Xournal++ XML format.
The conversion is completely done by your computer, so no data are collected or sent to external servers.
There are a few steps that are required to get an optimal result:
- Open the notes that you want to convert
- Scroll the notes down to the bottom. This step is needed because OneNote loads images and strokes lazily, doing that you force it to download them all.
- Scroll the notes up again. This is required because the script uses some position relative data to calculate the actual position of the elements.
- Press the addon button on your Toolbar and wait...
Once the page is converted a "download" will start automatically.
The time required for the conversion depends on your computer and the size of your notes.
With a medium size file and a relatively beefy computer it requires no more than a second to export the file, I suppose it should take less than a minute in any other case with some exceptions.
The plugin is entirely written in TypeScript. It's the first time that I make a browser plugin, so I may have made some mistakes.
To work on the code, you need NPM, then with a terminal
- Clone the repository
git clone https://github.com/nico9889/OneNote2Xournalpp.git
- Install the dependencies
npm install
At this point you are ready to work.
- To build the plugin:
npm run build
This command creates a "dist" directory with the reduced JS file and the assets
- To pack the plugin in a ZIP file:
npm run pack
This command creates a "web-ext-artifacts" directory with the contents of "dist" zipped, ready to be installed on Firefox.