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

Images missing #4

Open
andypillip opened this issue Aug 8, 2020 · 6 comments
Open

Images missing #4

andypillip opened this issue Aug 8, 2020 · 6 comments

Comments

@andypillip
Copy link

Hi there!

Thanks so much for your app! It's what I was missing on my remarkable.
I just installed the services (despite your warning of random restarts). My device restarted once for now, I'll keep an eye on it.

I noticed that images are missing from my articles. The log contains lines like

[05:42.243] Warning: Unable to open file /wp-content/uploads/2020/06/GettyImages
-1247012970.jpeg (:0, )

Am I guessing right that it's the readability package that is causing this error? It seems like some prefix is missing to the path, it's actually quite dangerous that it's trying to store images on root level.

I'll be happy to report the issue over at https://github.com/go-shiori/go-readability/

Thanks!

@GliderGeek
Copy link
Owner

Hey, thanks for the kind words.
I actually think that there are no images extracted at all and only the links are kept.

@fedecupe
Copy link

Hey, thanks for the kind words.
I actually think that there are no images extracted at all and only the links are kept.

Is this by design or is waiting implementation?

@GliderGeek
Copy link
Owner

This is not necessarily by design, but haven't really missed it myself so never took the effort.
Can imagine that very large images could pose a problem since the storage on the reMarkable is not that large?

@fedecupe
Copy link

RM2 has > 6GB, also with only 10 articles...

@GliderGeek
Copy link
Owner

yeah, maybe not really a problem. i won't mind adding this

@andypillip
Copy link
Author

I read some source code, and if I'm not mistaken, Readability will return XHTML with absolute URLs in the src attributes?

newSrc := toAbsoluteURI(src, ps.documentURI)
dom.SetAttribute(media, "src", newSrc)

Hence, it would be up to the epub package to go download that image file and add it to the epub – but it seems that it doesn't. Should it?

Instead, it offers a method addImage which probably we'd need to call ourselves for all media…

What is your understanding?

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

No branches or pull requests

3 participants