jya-dev / supernote-tool

Unofficial python tool for Supernote
Apache License 2.0
237 stars 25 forks source link

Library doesn't work after recent .note file format change in beta #10

Closed fbalobanov closed 2 years ago

fbalobanov commented 2 years ago

Ratta has changed the .note format in beta 2.04 (the latest beta is 2.05).

The library is failing to convert the note with "UnsupportedFileFormat: unsupported file" format exception.

Here is the link to the test note from the 2.05 beta: https://www.dropbox.com/s/neduuwiu4xiv14v/test.note?dl=0

jya-dev commented 2 years ago

Thank you for providing test note.

I added D.101 (beta 2.04) support and also added a parser policy feature. commit: 3553976c55853fc1b229b3fbb58d0deeec4d31b8

Please check your other files created on beta 2.04 or 2.05.

The policy feature makes it easier for this library to continue to support future file format changes. When you set policy='loose' parameter to sn.load_notebook, the parser try to parse unsupported file. If you get next beta update and file format has changed, try this. (Of course if the file format has changed significantly, the parser returns exception.)

notebook = sn.load_notebook(filename, policy='loose')
fbalobanov commented 2 years ago

So far it worked with a new format without policy=loose. I've checked on all my files\pages. Thanks!

jya-dev commented 2 years ago

Thanks for your confirmation. I will close this issue after checking next stable firmware from Ratta.

jya-dev commented 2 years ago

Firmware update for X series has been released from Ratta finally! I checked the new file format and needed some modifications. The fix is done. bffbc0451f20d330ca7261a103c392fa3235a879

fbalobanov commented 2 years ago

Thanks a lot for your fast updates!

On Sun, Dec 19, 2021 at 05:05 jya @.***> wrote:

Firmware update for X series has been released from Ratta finally! I checked the new file format and needed some modifications. The fix is done. bffbc04 https://github.com/jya-dev/supernote-tool/commit/bffbc0451f20d330ca7261a103c392fa3235a879

— Reply to this email directly, view it on GitHub https://github.com/jya-dev/supernote-tool/issues/10#issuecomment-997362792, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFDXAUMATLYVAGDR6ON27LURWU7TANCNFSM5J2HS4HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>