Fmstrat / ownnote

Notes app for ownCloud
GNU Affero General Public License v3.0
168 stars 42 forks source link

Server: Web clipper function #41

Open seal20 opened 9 years ago

seal20 commented 9 years ago

First thanks for the great apps, you brought the inclusion of images to owncloud notes which is perfect and really needed.

For a next feature it would be great if there was a way to "clip" webpage.

As a workaround, I tried to open a web page in firefox and save it as html in the Notes folder but the link to image on the notes are broken. because the other note are in base64 i cannot see how the html is formatted

Steps to reproduce:

  1. Open this page:http://coral.aims.gov.au/factsheet.jsp?speciesCode=0122 Perhaps it works on a simpler page but my goal is to save such page.
  2. In firefox, saves the page (right click: save page), full web page, in your Notes folder, and rename from htm to html.
  3. once sync is finished the notes appears in the notes list but links are broken.

I tried to edit the edit htm file with a text editor but it doesn't work too (the page is good as seen in firefox and other browser).

Why the base64? I suppose there is a good reason but it will be easier if it was not in 64 so we can edit the notes in a text editor.

Fmstrat commented 9 years ago

I'm using base64 so the note is all self-contained in one file. It made management easier, and less load on ownCloud for syncing files (Picture if a note had 50 small images in it). It also makes mobile sync easier, too. I will take a look at this as an enhancement to the import functions.

seal20 commented 9 years ago

That make totally sense and I prefer fast apps! Now if I could find a good way to edit notes offline on the desktop... Web clipper would really be cool, thanks for investigating it.

seal20 commented 9 years ago

By the way, I found a "workaround": I open two separate windows and I drag and drop the text, then the pictures. The page setup is not as nice but it is more than enough.

Fmstrat commented 9 years ago

Glad you were able to figure that out until I can look into the imports, thanks.

Fmstrat commented 9 years ago

Out of curiosity, have you tried highlighting the whole page and copy/pasting?

muramasatheninja commented 9 years ago

First I want to say great app. I have been looking for something like this for a while.

I tried copy and pasting a whole page and it worked quite well. Unfortunately it doesn't grab the images when this is done but leaves the original links to the images intact. I ended up saving each picture and then re-adding it into the document. Would be nice to have an ability to save these images all at once from within the app. (Maybes something like "Mirror images" or "Make images Local"

Thanks

seal20 commented 9 years ago

I made different test on the page I refered before. Depending on how/what you select copy and paste will work or not. For example only the text works well, only the images too but if you select the text under the map with the image the copy paste do not work... same for drag&drop. I suspect it depends on the structure of the page, if tinymce does not support the structure it will not work.

Sorry it is not very informative...

And yes copy pasting do not "grab" the image but keep the link. This is the same behavior as evernote web clipper. I don't know what is the best: if you want "offline" mode, grabing the pics may be good, it also increases privacy. But keeping the link is perhaps simpler and reduce the size of the notes to sync...

enekux commented 9 years ago

I think that if this feature would be added I would stop using Evernote... I found attempts to do something similar in the next project:

https://github.com/Laverna/webclipper

but is not working... yet

muramasatheninja commented 9 years ago

Ok I found a few options for users using OwnNote.

The first would need some sort of help I think to work well. It's an add-on for Firefox called 'Scrapbook'. https://addons.mozilla.org/en-US/firefox/addon/scrapbook/

Basically you can highlight portions of a webpage and then save them to your machine. I did this and it works well but I wasn't able to get ownnote to convert it. (I just copied and pasted the folder in my ownnote and hoped it would import it). This one is kind of nice since you can actually high light what you want.

The other that I plan to use going forward is called "SingleFile" for Chrome. https://chrome.google.com/webstore/detail/singlefile/mpiodijhokgodhhofbcjdecpffjipkle?hl=en This exstension takes a whole page and converts it to a file with the images imbedded (Base64 Data URI if i'm using the right term) I found that I can edit the resulting page in ownnote. Also I can copy and paste straight to ownnote and it will grab images and all. He also has a github account which can be found here. https://github.com/gildas-lormeau/SingleFile Also related to Issue #7 . I plan to post there as well.