Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Add OneNote Importer #10642

Merged
merged 161 commits into from
Nov 9, 2024
Merged

Conversation

pedr
Copy link
Collaborator

@pedr pedr commented Jun 20, 2024

Summary

I'm adding a new package library that will be used to convert OneNote exports into Joplin Notes.

The onenote-converter is based on the implementations found in:
https://github.com/msiemens/one2html
https://github.com/msiemens/onenote.rs

We will be compiling the Rust code to wasm with the package wasm-pack to output a Node package that can be imported in our codebase


What is missing at this point:

  • Create resources from the SVG tags after the note is converted to HTML
  • Remove the feature from mobile/app-cli. Find a way to disable the option of importing there
  • Find a way to build the onenote-converter package (described bellow).
  • Fix run_ci.sh (changed to debug)
  • Fix yarn dist process (make sure the package is always build there)
  • Review code
  • [ ]

How the package is being integrated

Now Rust is a requirement, the message that is visible when Rust is not installed in the developer machine:

Error message Message that shows when you try to run yarn build from the package without having Rust:
js@mint:~/Desktop/joplin/fork/packages/onenote-converter$ yarn build
> wasm-pack build --target nodejs --release
Error: failed to start `cargo metadata`: No such file or directory (os error 2)
Caused by: failed to start `cargo metadata`: No such file or directory (os error 2)
Caused by: No such file or directory (os error 2)
Fatal error
----------------------------------------------------------------
Rust toolchain is missing, please install it: https://rustup.rs/
----------------------------------------------------------------

2024-08-12_17-13

pedr and others added 30 commits April 1, 2024 07:15
@laurent22 laurent22 added v3.2 and removed v3.1 labels Oct 17, 2024
@pedr
Copy link
Collaborator Author

pedr commented Nov 6, 2024

@laurent22 We talked about using an absolute path instead of a relative for the SVG extraction to remove an error message, but by using the absolute path when I tried to import the HTML to Joplin the absolute path images weren't imported to Joplin as resource, I guess to be imported they need to be relative.

I end up just using createHTMLDocument like Henry suggested and that already fixed the error that was appearing.

I also added the documentation needed.

@laurent22
Copy link
Owner

Sorry Pedro, there's a conflict now on Root.tsx. Once this is fixed we can merge

@personalizedrefrigerator personalizedrefrigerator added desktop All desktop platforms import Related to importing files such as ENEX, JEX, etc. labels Nov 8, 2024
@laurent22 laurent22 merged commit b248700 into laurent22:dev Nov 9, 2024
7 checks passed
laurent22 added a commit that referenced this pull request Nov 9, 2024
This reverts commit b248700.

We need to find a solution to make building the Rust package optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop All desktop platforms import Related to importing files such as ENEX, JEX, etc. v3.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants