paperwork / paperwork

Paperwork - OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep
https://xn--gckvb8fzb.com/project-updates-q1-2022/?github#paperwork
GNU Affero General Public License v3.0
7.84k stars 656 forks source link

Import pictures from copy-paste #811

Closed midaw1 closed 5 years ago

midaw1 commented 7 years ago

Often the sites from which we copy information are lost from the Internet. And links to these sites become empty. I would like a function in the program that will pull the image into its own repository and insert them instead of the links. It would be nice to do this in the form of a button / function and settings for importing and starting the function of converting links into your own pictures.

idreamerhx commented 7 years ago

I currently working on a copy-paste hook. If it works I'll push to github.

idreamerhx commented 7 years ago

I finished part of the work. Currently I can copy image form base64 to my binary download server. My binary server depends on Simple-Web-Server previously.

I don't know how to pull request on github. I wish paperwork owner to develop a better one.

https://github.com/idreamerhx/paperwork/blob/master/copy_image_1.diff https://github.com/idreamerhx/paperwork/blob/master/http_examples.cpp https://github.com/eidheim/Simple-Web-Server

Use the please read code, modify binary server to your ip address and port (http://your-ip-addr:8093/b64img).

Works only in chrome with --allow-running-insecure-content --disable-web-security --user-data-dir="C:/chromedev" --allow-file-access-from-files

I will add "Offline image" for some website only need http Referer Cookies to download image. This does not need develop mode chrome. But some website such as weixin really makes me confuse when get images.

midaw1 commented 7 years ago

Sorry, I do not have the opportunity to check now. It is easier for you to create a change request for the author of the development and he will check the improvements.

Liongold commented 7 years ago

@idreamerhx Feel free to open a pull request with that code and someone might review it. To open the request, just push your updated version to your own fork and then open the pull request from the Github UI. If you need any help, please ask.

mrusme commented 5 years ago

This idea was reported for v1, but it seems relevant for v2 as well. Taking it on the v2 roadmap.

mrusme commented 5 years ago

On a second thought, this feature is something that is/will be in place through notes with attachments. You will either be able to simply create a note, download the image from the internet, upload it as a note attachment and link the attachment within the note or you will be able to use a browser extension (which on its own uses the quick-import endpoints ) to import a whole webpage with all its images and content.

Please refer to the linked issue for future reference.