Skip to content

jonas-kell/one_note_to_xopp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneNote to XOPP converter

This is an open source program, that converts the .one file format to .xopp.

I only implemented this, because my Microsoft Surface broke and my other laptop uses Linux, so I can no longer use OneNote. As this is only for my own limited use, NOT everything (not even most things) can be successfully converted.

The converter ONLY supports ink/pen drawings and images at the moment, nothing more. There is no plan from me to ever implement more, as I have never used other features of OneNote.

The implementation makes heavy use of Markus Siemens work in the field of OneNote file parsing. The code uses his package Rust OneNote® File Parser and my code is heavily "inspired" by his one2html project, only that mine has way worse support for elements and converts to Xournal++ instead of html. I suggest looking at his project first, I only made this public for the case case it could benefit someone, so please do not expect support.

Installation

At the moment only compiling from source is supported. This requires the latest stable Rust compiler. Once you've installed the Rust toolchain run:

git clone https://github.com/jonas-kell/one_note_to_xopp
cd one_note_to_xopp
cargo build --release

Usage

When the produced executable is run inside a folder it will take all the .one files from that folder as inputs and spit out the converted .xopp files into the same folder.

 ./target/release/one_note_to_xopp

(Of course this is the execution syntax for linux, that assumes you are still in the git repository. You can move the compiled executable into any folder you like, even into folders in Path, to get systemwide access. Append .exe for Windows).

CLI Arguments

The behavior can be adapted with CLI Arguments. They are documented when running

 ./target/release/one_note_to_xopp --help

Error messages

If error messages happen, try opening the .one section in the OneNote Browser version. That sometimes is enough to fix it.

The following error call:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: MalformedOneNoteFileData("ink stroke node has no ink bias") }', src/main.rs:36:67

Can be caused by the Coordinate System and other shape tools. These are some kind of ink stroke, however not real ink strokes and have a weird format. Delete them in the browser version of OneNote and replace with normal lines.

Where to get my .one files

To acquire the .one files from cour OneDrive, take a look here. It is a good idea to backup them anyway, because who knows how reliable Cloud-Storage is.

Disclaimer

This project is neither related to nor endorsed by Microsoft in any way. The author does not have any affiliation with Microsoft.

I have never used Rust before, so my code is probably shit, it is not commented and entirely inside one singular file, as this was all I needed to get it working and I do not have the time to learn how to use this language more proper.

About

Convert a .one (OneNote) file into .xopp (Xournal++)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages