Skip to content

making sure that mark file signatures can be processed - #8

Closed
Tboules wants to merge 4 commits into
philips:mainfrom
Tboules:handling-mark-files
Closed

making sure that mark file signatures can be processed#8
Tboules wants to merge 4 commits into
philips:mainfrom
Tboules:handling-mark-files

Conversation

@Tboules

@Tboules Tboules commented May 21, 2026

Copy link
Copy Markdown

Hello, I want to use this plugin to create a new obsidian workflow where I automatically generate digest notes based on an exported back-up of the Digests.

The backup file is a zip of a bunch of files, but the handwritten section of the digest is saved as a .mark file.

I used this file and updated your test to process it. I can share that code with you if you'd like as well.

I added the test at the bottom of this to your main.test file and ran it with one of the mark files generated in the back-up. It worked just fine. I can't upload my mark file for some reason as it's not an accepted format for github. But anyways. This simple update would allow me to use the supernote-typescript library which would be very helpful!

Thank you!

describe('digest_image', () => { test( 'convert mark file into a png image', async () => { let sn = new SupernoteX(await readFileToUint8Array('digest_test.mark')); let images = await toImage(sn); expect(images).not.toBeUndefined(); for await (const [index, image] of images.entries()) { await imagejs.writeSync( tests/output/digest_image.mark-${index}.png, image, ); } }, { timeout: 30000 }, ); });

@philips

philips commented May 22, 2026

Copy link
Copy Markdown
Owner

Please send the test cases and tests as a PR. Or, upload to a fork on Github.

How do you generate a mark file?

@Tboules

Tboules commented May 22, 2026

Copy link
Copy Markdown
Author

Hey just added those commits to this PR.

the mark file is generated in the following way.

Open Supernote > Settings > System > Backup and Restore > Backup > Digest.

Once you select "Back Up Now" it generates a backup.snbak file (lol not sure what snbak is exactly)

the backup.snbak file is just a zip, when you unzip it you will see a JSON with all of the metadata for your Digests and a folder containing the mark files which are the handwritten notes.

image

My plan is to create a plugin that will allow a user to upload the backup.snbak file and generate atomic notes from the digests.

@philips

philips commented Jul 25, 2026

Copy link
Copy Markdown
Owner

@Tboules Why did you change the background from transparent to white in 1e50176?

philips-clanker added a commit that referenced this pull request Jul 27, 2026
Supernote digest exports use a "markSN_FILE_VER_" signature instead
of "noteSN_FILE_VER_". Accept both so SupernoteX can parse .mark
files exported from digest backups.

Rebased from #8 (Tboules): carries forward the signature-parsing fix
and the digest_test.mark fixture/test, dropped the incidental
formatting, tsconfig, and dependency-version churn that had gone
stale against current main.
philips added a commit that referenced this pull request Jul 27, 2026
Support .mark file signatures (rebase of #8)
@philips

philips commented Jul 27, 2026

Copy link
Copy Markdown
Owner

merged #30 with this feature.

@philips philips closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants