supernote-obsidian-plugin icon indicating copy to clipboard operation
supernote-obsidian-plugin copied to clipboard

Help Wanted: more test files

Open philips opened this issue 11 months ago • 15 comments

I could use some simple and small test .note files from supernote X2 devices and some with text too. I believe the single test file I have is from X series devices but I don't know as I don't have either.

philips avatar Mar 01 '24 23:03 philips

link to test files are here: https://file.io/nZpssgTjMnT0

There are 5 files total -4 .note files -1 .doc file

Files were created using the supernote nomad running Chauvet 3.15.27

'20240303_155152.doc' contains a line of text. 'blank template.note' is just a blank .note 'dot template.note' is a blank note using the 5mm dot background 'blank-2p.note' contains two pages of handwritten text, and demos the available writing tools. This was done using the blank background template, and contains a link to the first page on the second page. 'blank-shapes-and-RTR.note' conains a single page of shapes, patterns, and handwritten text. Headings and keyword highlighting included in file. This file was created using Real Time Recognition (allows export of handwritten notes as text within the nomad), with the blank background template.

If you need anything else, please let me know.

isolatedvirus avatar Mar 03 '24 21:03 isolatedvirus

Thanks! Did you try the plugin too? Did it work?

philips avatar Mar 03 '24 21:03 philips

Thanks @isolatedvirus I added these to the test suite and see that they currently fail. I will try and fix that! https://github.com/philips/supernote-typescript/tree/nomad

  ● smoke › convert a note from a nomad Chauvet 3.15.27 with handwriting recognition to png pages

    TypeError: Cannot read properties of undefined (reading 'alpha')

      201 |     let newColor = encodedColor === -1 ? Color("transparent") : translation[encodedColor]
      202 |     let chunk: Buffer
    > 203 |     if (newColor.alpha() === 0) {
          |                  ^
      204 |       chunk = Buffer.from(new Uint8Array([0, 0, 0, 0]))
      205 |     } else {
      206 |       chunk = Buffer.from(new Uint8Array([...newColor.rgb().array(), ~~(255 * newColor.alpha())]))

      at RattaRLEDecoder.addColorBuffer (src/conversion.ts:203:18)
      at RattaRLEDecoder.decode (src/conversion.ts:176:14)
      at src/conversion.ts:46:34
          at Array.map (<anonymous>)
      at src/conversion.ts:45:8
          at Array.map (<anonymous>)
      at src/conversion.ts:42:16
      at src/conversion.ts:8:71

philips avatar Mar 04 '24 03:03 philips

@isolatedvirus Made a new release that extracts the text and images!

Square
Triangle
Circle
Star

nomad-3 15 27-blank-2p note-0 nomad-3 15 27-blank-2p note-1 nomad-3 15 27-blank-shapes-and-RTR note-0

philips avatar Mar 04 '24 18:03 philips

Hi, I tried Obsidian importing with this note: https://file.io/fN9NqG5QRohV

which looks like this in Obsidian: image

which is fine in Nomad: IMG_6660

orhoncan avatar Mar 05 '24 16:03 orhoncan

Very simple realtime note that is failing on 1.0.2. SN is A5X with 2.14.28. Obsidian is running on Windows 11 Home, v 23H2, Build 22631.3235.
20240304_154111 Obsidian Integration Test File.zip

Zevoros-cyber avatar Mar 05 '24 17:03 Zevoros-cyber

@orhoncan made a fix! https://github.com/philips/supernote-typescript/commit/990230c8c1c6849f306a2f761557e98afc1b1bec

I want to figure out @Zevoros-cyber issue before cutting a new plugin release.

philips avatar Mar 06 '24 09:03 philips

@philips , would you like a complex A5X test file? I can create one with various styles of links, headings, and keywords if you don't already have one to work with.

Zevoros-cyber avatar Mar 06 '24 14:03 Zevoros-cyber

@Zevoros-cyber This is the first time I have had a file with a custom background. I got it to work, I think.

a5x-2 14 28 note-0

philips avatar Mar 06 '24 19:03 philips

@philips Sorry, I should have mentioned the custom background. I've been using it for so long that I forgot it was a custom! I do have a question about the display of the extracted image, however. The actual custom background is black lines on white (FFFFFF) background. Should the background post-processing from the plugin be gray (C8C8C8)?

Zevoros-cyber avatar Mar 06 '24 19:03 Zevoros-cyber

I believe one of the test files I sent over also had a similar issue, but I think light grey and dark grey were swapped. answer On mobile currently so I'm unable to check.

On Wed, Mar 6, 2024, 14:36 Zeveros @.***> wrote:

@philips https://github.com/philips Sorry, I should have mentioned the custom background. I've been using it for so long that I forgot it was a custom! I do have a question about the display of the extracted image, however. The actual custom background is black lines on white (FFFFFF) background. Should the background post-processing from the plugin be gray (C8C8C8)?

— Reply to this email directly, view it on GitHub https://github.com/philips/obsidian-plugin-supernote/issues/1#issuecomment-1981646605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKSNLV7LAOYSCHQWDS4FUTYW5V25AVCNFSM6AAAAABECRLLM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBRGY2DMNRQGU . You are receiving this because you were mentioned.Message ID: @.***>

isolatedvirus avatar Mar 06 '24 19:03 isolatedvirus

I uploaded 1.0.3 with fixes for your issues @Zevoros-cyber and @orhoncan. Please give it a try!

https://github.com/philips/obsidian-plugin-supernote/releases/tag/1.0.3

philips avatar Mar 06 '24 21:03 philips

@isolatedvirus that is odd.... I filed a bug about the general grayscale handling in the library here: https://github.com/philips/supernote-typescript/issues/1

philips avatar Mar 06 '24 21:03 philips

I uploaded 1.0.3 with fixes for your issues @Zevoros-cyber and @orhoncan. Please give it a try!

https://github.com/philips/obsidian-plugin-supernote/releases/tag/1.0.3

It's working perfectly! Of course, with my usually poor handwriting, I'm going to need to automate text cleanup in the md via a local gen AI model. I think that there should be plugins for that.

Zevoros-cyber avatar Mar 06 '24 21:03 Zevoros-cyber

Noice! Thanks for testing @Zevoros-cyber

philips avatar Mar 06 '24 21:03 philips