philips / supernote-obsidian-plugin

Supernote A5, A5X, A6X, A6X2 (Nomad) integration for Obsidian. Generate markdown, capture screen mirror, and more.
MIT License
137 stars 7 forks source link

feature: do not regenerate PNG and NOTE files #8

Closed edfinn1973 closed 8 months ago

edfinn1973 commented 8 months ago

Hello,

I recently installed the Supernote plugin for Obsidian and everything worked fine to get the notes and images in. However, when I combined the PNGs into a PDF and merged the MD files the other files will not delete. I can delete them in the moment, but when I close and then open Obsidian again, the PNGs and MD files all come back. I have tried this on OneDrive and my local drive with the same result. If I disable the plugin, the files stay deleted. Also, the file opens extremely low with the plugin enabled. Do you have any suggestions? I have the back and forth with the process steps that I went through with Obsidian support if needed. Thanks in advance for your help.

Ed

philips commented 8 months ago

Yes, currently I track whether or not the plugin processed a .note by checking if the target .md and .png files exist or not. I need to research more on how to create a UX around regeneration, etc. I don't know of a good pattern for this in Obsidian. Do you?

edfinn1973 commented 8 months ago

Brandon,

Thank you for the quick reply. I have asked Obsidian support to see if they have any ideas.

Thanks again,

Ed

On Mon, Mar 25, 2024 at 10:12 AM Brandon Philips @.***> wrote:

Yes, currently I track whether or not the plugin processed a .note by checking if the target .md and .png files exist or not. I need to research more on how to create a UX around regeneration, etc. I don't know of a good pattern for this in Obsidian. Do you?

— Reply to this email directly, view it on GitHub https://github.com/philips/obsidian-plugin-supernote/issues/8#issuecomment-2018236053, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHKDJF2RTSZC6TEANX7TXXLY2A5GVAVCNFSM6AAAAABFHGAPYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJYGIZTMMBVGM . You are receiving this because you authored the thread.Message ID: @.***>

-- Dr. Ed Finn

Indiana Wesleyan University Ed.D., Organizational Leadership ‘17

Indiana University M.S., Adult Education ‘09 B.S., Labor Studies ‘05

edfinn1973 commented 8 months ago

As a workaround, would you suggest populating them in one vault and then turning off the plug in and moving them over? It worked great to pull the notes in and now that they are and the plug in is off, I can easily manipulate it.

sigrunixia commented 8 months ago

Yes, currently I track whether or not the plugin processed a .note by checking if the target .md and .png files exist or not. I need to research more on how to create a UX around regeneration, etc. I don't know of a good pattern for this in Obsidian. Do you?

Hello! Sigrunixia of the Obsidian Team here. I really recommend getting help from the #plugin-dev channel (https://discord.com/channels/686053708261228577/840286264964022302) or our forums (https://forum.obsidian.md/c/developers-api/14).

Full disclosure, I am not usually on the code side of things, but I know enough to at least get the point across.

In the immediate term as a stopgap, I'd recommend that instead of automatic detection of the files on startup, that the user have to enter a specific mode/command for the listener to get the conversion of files going. On Obsidian load, there is a LOT going on with not just the application itself, but other plugins scanning file contents, rebuilding databases, reading Indexed.db, etc. Supernotes doesn't need to be doing anything for the user at that time, besides become loaded to where commands can be given to the plugin.

Additionally, automatic creation/deletion/moving of files by plugins tend to cause problems with sync services in general, not just Obsidian Sync. :(


Obsidian Gemmy plugin shows a very rudimentary way of achieving actions via a specific mode. https://github.com/ericaxu/gemmy/blob/6e2384a0017a73880a4c0702fd9bf810571430a9/main.ts#L183

philips commented 8 months ago

I started prototyping something where the user gets a preview of the note directly in Obsidian and then can choose to attach all of the files from the note to their vault or individual files.

https://github.com/philips/obsidian-plugin-supernote/tree/noteview

Screenshot 2024-03-26 at 3 17 29 PM
edfinn1973 commented 8 months ago

Brandon,

Thanks for sharing this. Would this combine all of the typed text and PNG files? Right now I have been merging the note files (0,1,2) and then converting the PNG files to PDF's. Then I embed the PDF in the note and tag. I am new to Obsidian so that has been my workflow. The thought is that I have everything in one note and can clean up the text conversion. I am definitely open to suggestions. I really appreciate your work on this.

Thanks,

Ed

Sent from Samsung Galaxy smartphone. Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Brandon Philips @.> Sent: Tuesday, March 26, 2024 5:19:42 PM To: philips/obsidian-plugin-supernote @.> Cc: edfinn1973 @.>; Author @.> Subject: Re: [philips/obsidian-plugin-supernote] feature: do not regenerate PNG and NOTE files (Issue #8)

I started prototyping something where the user gets a preview of the note directly in Obsidian and then can choose to attach all of the files from the note to their vault or individual files.

https://github.com/philips/obsidian-plugin-supernote/tree/noteview

Screenshot.2024-03-26.at.3.17.29.PM.png (view on web)https://github.com/philips/obsidian-plugin-supernote/assets/33544/18c6ffa8-9490-47f5-837f-260b87bd6922

— Reply to this email directly, view it on GitHubhttps://github.com/philips/obsidian-plugin-supernote/issues/8#issuecomment-2021566903, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BHKDJF6J5YOIZ56LOVQPTSDY2HX75AVCNFSM6AAAAABFHGAPYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRGU3DMOJQGM. You are receiving this because you authored the thread.Message ID: @.***>

philips commented 8 months ago

The new feature will create a markdown file that links all of the images into the markdown: https://github.com/philips/obsidian-plugin-supernote/issues/11#issuecomment-2023698076

Why would you want a PDF inside of Obsidian? Obsidian is primarily a Markdown tool so most people want Markdown and "attached" images.

edfinn1973 commented 8 months ago

This sounds great. I was doing a PDF because it came into the note as scrollable and combined all of the PNG pages into one document, which was smaller too. Again, I am brand new so just learning. I like seeing the image directly in the note file so it sounds like your new solution may accomplish that, as Ling as I don't have to scroll endlessly for individual pages.

Sent from Samsung Galaxy smartphone. Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Brandon Philips @.> Sent: Wednesday, March 27, 2024 1:45:30 PM To: philips/obsidian-plugin-supernote @.> Cc: edfinn1973 @.>; Author @.> Subject: Re: [philips/obsidian-plugin-supernote] feature: do not regenerate PNG and NOTE files (Issue #8)

The new feature will create a markdown file that links all of the images into the markdown: #11 (comment)https://github.com/philips/obsidian-plugin-supernote/issues/11#issuecomment-2023698076

Why would you want a PDF inside of Obsidian? Obsidian is primarily a Markdown tool so most people want Markdown and "attached" images.

— Reply to this email directly, view it on GitHubhttps://github.com/philips/obsidian-plugin-supernote/issues/8#issuecomment-2023701443, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BHKDJF4P3YN65LK5TVXAR6LY2MHUVAVCNFSM6AAAAABFHGAPYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRTG4YDCNBUGM. You are receiving this because you authored the thread.Message ID: @.***>

philips commented 8 months ago

Yes, the generated Markdown has headers and you can use the obsidian outline to jump between pages.

Screenshot 2024-03-27 at 12 10 10 PM
edfinn1973 commented 8 months ago

Brandon,

Thanks for the info. Here is how mine came in so far:

[image: image.png] The non-PNG files are the handwritten conversions.

On Wed, Mar 27, 2024 at 2:11 PM Brandon Philips @.***> wrote:

Yes, the generated Markdown has headers and you can use the obsidian outline to jump between pages. Screenshot.2024-03-27.at.12.10.10.PM.png (view on web) https://github.com/philips/obsidian-plugin-supernote/assets/33544/cd59a349-19bb-401b-a0d0-00f5fbf69168

— Reply to this email directly, view it on GitHub https://github.com/philips/obsidian-plugin-supernote/issues/8#issuecomment-2023771237, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHKDJF2QOV2LHHS646D5GQTY2MKVHAVCNFSM6AAAAABFHGAPYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRTG43TCMRTG4 . You are receiving this because you authored the thread.Message ID: @.***>

-- Dr. Ed Finn

Indiana Wesleyan University Ed.D., Organizational Leadership ‘17

Indiana University M.S., Adult Education ‘09 B.S., Labor Studies ‘05

philips commented 8 months ago

@edfinn1973 The screenshot didn’t come through on GitHub

edfinn1973 commented 8 months ago

Brandon,

Here are examples of what I am talking about. First, here is what the files come in like when I have the plugin turned on:

Raw Input

Here is what they look like after they are processed, but without me having edited the recognized text yet to clean up the notes:

PDF1 PDF2 PDF3

philips commented 8 months ago

I released v2.0.0 so you can try this out now: https://www.youtube.com/watch?v=tEoW35fYVew