Skip to content

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

@Doublonmousse

Description

@Doublonmousse

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

Metadata

Metadata

Assignees

Labels

bugIt's a bugdesktopAll desktop platformshighHigh priority issues

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions