web crawl API for Apple Shortcuts mobile app
Shork enables you to use Shortcuts "get contents of webpage" module to get and process any data from the web.
Shork receives 2 GET params. 'p' is an URL of a page that is going to be scraped and 's' is CSS selector that will be used to find content. There is a form available on landing page that lets you generate a link. It takes care of encoding special characters before passing it as url param.
Lets say that we just want to read loud the header of example.com domain
- go to Shork.me and enter 'example.com' as URL and 'h1' as selector
- copy generated address
- enter Shortcuts app
- go to 'my shortcuts' tab and press 'create shortcut'
- press 'add action' > 'web' > 'get contents of Url'
- paste previously copied address to URL field
- press '+' at the bottom to add next module
- select 'documents' > 'speak text'. 'Contents of URL' should be automatically set as reference.
- press 'play' button at the bottom of the screen to see how things work. It should read 'Example domain'. You can check that this is what example.com header says.
- you can now title and save the shortcut and use it with Siri.
project was developed using ruby 2.5.3
poltergeist gem requires phantomjs installed locally
on mac: brew cask install phantomjs
No external services are being used.
No5hing else than rails s
Project has a typical rails structure
Master branch is automatically deployed to heroku production server.
