Play the Evernote Web Clipper in Rails

I would like to write a Rails application that can capture a web page, such as an Evernote clipper. If you are not familiar, in your browser you can click on the button on the toolbar and display a fairly accurate copy of the layout of the web page. For example, go to http://www.evernote.com/pub/jssmith072/shared and click on one note on this page, and you will be able to see the web page that I captured. Here are a few reasons why I don’t know where to start:

  • How to get a rendered webpage programmatically in a Rails application? Can / should I use WebKit?
  • How to save this web page in my database?
  • How can I consistently display this archive of web pages in browsers?
+3
source share
1 answer

Personally, I would be inclined not to store it in the database at all, but rather create a background task to pull out the site, analyze it and filter it using the read port, and then save it to the file system somewhere (public or non, public, in depending on your needs, you can easily write an asset controller to publish non-public static content) using a directory scheme that uniquely identifies it.

, - , , , , - , , .

- , URL-, - , , ( , ), / , , .

0

Source: https://habr.com/ru/post/1753972/


All Articles