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

Limitations of the onenote import and differences with the original onenote.rs repo #11546

Open
Doublonmousse opened this issue Dec 21, 2024 · 2 comments
Assignees
Labels
bug It's a bug desktop All desktop platforms high High priority issues

Comments

@Doublonmousse
Copy link

Operating system

Windows

Joplin version

d9df2dc

Desktop version info

Joplin 3.2.5 (dev, win32)

ID client : 93b58e4182c7400f930e687963e71621
Version de Synchro : 3
Version du profil : 47
Trousseau supporté : Oui

Révision : d9df2dc (dev)

Backup: 1.4.2
Freehand Drawing: 2.13.0

Current behaviour

I wanted to check what joplin was using for the (recently added) onenote import and I was surprised to find that it's a modified version of onenote.rs.

In particular, this part

// TODO: add support for last_modified
// let last_modified = Time::parse(PropertyType::LastModifiedTime, object)?.ok_or_else(|| now )?;
// let last_modified = match Time::parse(PropertyType::LastModifiedTime, object) {
// Ok(time) => Ok(time.unwrap()),
// Ok(None) => Ok(now),
// Err(time_err) => Ok(now),
// }?;

is different from the latest commit, as a workaround around msiemens/onenote.rs#11.
Nevertheless, I'm not able to import the file provided in the onenote.rs issue (there is no error message but no added note either).

The other part I want to know is how this vendored package differs from onenote.rs. It's not listed as a fork so I'm not sure how much difference there is (what's changed, what is fixed from the existing) .I think there would be some interest in using this version over the original one if there's renewed interest in maintaining it and improving it, but it wouldn't hurt to increase visibility from users of the original crate.

Expected behaviour

The file from msiemens/onenote.rs#11 (comment) is imported successfully. For now, there is no added notebook when importing despite the absence of errors.

I do think informing the user on the success/failure of the import would go a long way in making the UX better (I'm thinking of listing the onenote structure -notebook and pages- and whether each one was imported successfully or not)

Logs

2024-12-21 12:23:59: InteropService_Importer_OneNote: Unzipping files...
2024-12-21 12:23:59: Updating items_normalized from {"updated_time":0,"id":""}
2024-12-21 12:23:59: InteropService_Importer_OneNote: Extracting OneNote to HTML
2024-12-21 12:23:59: InteropService_Importer_OneNote: Extracting SVGs into files
2024-12-21 12:23:59: SearchEngine: Updated FTS table in 179ms. Inserted: 0. Deleted: 0
2024-12-21 12:23:59: InteropService_Importer_OneNote: Importing HTML into Joplin
2024-12-21 12:23:59: InteropService_Importer_OneNote: Finished

@Doublonmousse Doublonmousse added the bug It's a bug label Dec 21, 2024
@laurent22 laurent22 added desktop All desktop platforms high High priority issues labels Dec 21, 2024
@laurent22
Copy link
Owner

So I think there are two issues here:

  1. Improve error messages when something is not imported

  2. Import the file from that issue

@laurent22
Copy link
Owner

The other part I want to know is how this vendored package differs from onenote.rs. It's not listed as a fork so I'm not sure how much difference there is (what's changed, what is fixed from the existing) .I think there would be some interest in using this version over the original one if there's renewed interest in maintaining it and improving it, but it wouldn't hurt to increase visibility from users of the original crate.

We have no plan to maintain a generic Rust package for OneNote import at this point, so the package may contain Joplin-specific features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug desktop All desktop platforms high High priority issues
Projects
None yet
Development

No branches or pull requests

3 participants