diff --git a/README.md b/README.md index 51be8ee..1eb2a25 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,23 @@ # Pastebinner Check out the examples folder for some examples. I will add more soon. -## Usage -### Configuration +## Configuration -### Docker -- build the image: +#### Docker +- Build the image: ```shell docker build -t pastebinner . ``` -- run the image: +- Run the image: ```shell docker run -it --env-file .env --network="host" pastebinner ``` +#### Console -Set the following environment variables and source them: +The console will launch you into a running pry session where you will have access to an elasticsearch object and a pastebinner object. From there you can poke around and investigate further how the program works. + +I am working on setting it up with docker-compose to connect elasticsearch and redis in docker containers. +Set the following environment variables in a file named .env and source them: ``` pastebin_api_key @@ -22,8 +25,17 @@ pastebin_username pastebin_password ``` +optional environment variables if planning on using elasticsearch and redis +``` +elasticsearch_url +redis_url +``` + + If you want to scrape pastes, you can view a json response of the latest pastes by using the ```-s``` or ```--scrape_public``` options. -Creating pastes is built in, check ```lib/api_client.rb```, I am still working on adding in the functionality to use it on the command line. +Creating pastes is built in, check ```lib/api_client``` + +#### Commandline The command line app can be used as follows: ```shell @@ -62,4 +74,4 @@ The data directory will then be populated with pastebin raw paste files with the - fulltext search of raw pastes via elastic search, mysql, postgres, sqlite, or some other method - adding exceptions - adding configuration file support -- adding rspec tests +- adding rspec tests \ No newline at end of file