Screenshotter
A simple app that takes a screenshot of a website and then uploads it to your S3 bucket
##TODOs:
- Make concurrent & use OTP
Usage
- Install dependencies with
mix deps.get
- Setup your
AWS_KEY
,AWS_REGION
&AWS_SECRET
environment variables - Get PhantomJS running with
phantomjs --wd
- Run
./screenshotter <any-url> <your-s3-bucket> </path/to/directory>
. The third argument will default to root and passing in--h
or--help
as the only arguments will return instructions
Running Test
To run the default test suite, run mix test
To run tagged tests (tests that interact with API’s or manipulate files)…
Run mix test --only tagged_test
(replace tagged_test
with the name of the tag)
Tests that communicate with the AWS API will requires your API key/secret to be set. Tests, such
as fetch_screenshot
will require PhantomJS running
Installation
If available in Hex, the package can be installed as:
Add
screenshotter
to your list of dependencies inmix.exs
:def deps do [{:screenshotter, "~> 0.1.0"}] end
Ensure
screenshotter
is started before your application:def application do [applications: [:screenshotter]] end