Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webclip extraction: support files referenced by objId, not hash #566

Open
Tokolino opened this issue Jan 3, 2024 · 3 comments
Open

Webclip extraction: support files referenced by objId, not hash #566

Tokolino opened this issue Jan 3, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Tokolino
Copy link

Tokolino commented Jan 3, 2024

Another case: An image file is extracted from the note, put in the resources folder, but it does not appear in the markdown file. At least I did not find any reference to it, may it be broken or not.

You may look out for file 15744e6612b51875a726e4c664000db3.png in the attached note.
Debug.zip

@akosbalasko
Copy link
Owner

Hi @Tokolino ,
I don't know whether it is an outdated behaviour as you use a really old Evernote client (v7), or a feature that I missed to support around attachments, but the thing is that the resource (I mean the file) is not referenced by its hash, as usually happens in Evernote, but by an objId.
I resolve it soon, but I think I'd label it as an enhanchement, because I've never seen this behavior.

@akosbalasko akosbalasko added the enhancement New feature or request label Jan 4, 2024
@akosbalasko akosbalasko changed the title Webclip extraction: file extracted but not referenced in md-file Webclip extraction: support files referenced by objId, not hash Jan 4, 2024
@Tokolino
Copy link
Author

Tokolino commented Jan 4, 2024

Maybe you could provide a placeholder for all resources that have been extracted but not linked to the note, for whatever reason. Like {unlinked-resources-block}{unlinked-resources}{end-unlinked-resources-block}.

@akosbalasko
Copy link
Owner

I was wrong, objIds and hashes work and be recognized well, so it is a bug, and the problem is that it is placed within many embedded lists (OL/UL and LI tags), and as Evernote has trouble of storing LI tags, our workaround was to reshape them, and reorganize the content of the li tags.
As I tested it, the problem is in this function:

const fixSublists = (node: HTMLElement) => {

Nevertheless I'm afraid it takes more time to resolve it.

@akosbalasko akosbalasko added bug Something isn't working and removed enhancement New feature or request labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants