updated readme

This commit is contained in:
booboy 2019-02-02 04:54:26 -06:00
parent 1b6759952e
commit dacfc616c4

View file

@ -15,36 +15,45 @@ Creating pastes is built in, check ```lib/pastebinner.rb```, I am still working
The command line app can be used as follows:
```shell
pastebinner --help
Usage: pastebinner [options]
-h, --help Show this help messae
-v, --verbose Verbose http output (WIP)
-s, --scrape_public Scrape public pastes
-r, --raw Raw paste. Requires --key passed with a valid key
-g, --get_keys Get unique paste keys from public pastes
-k, --key= Unique paste key
-d, --download Download all public pastes to data directory
-j, --json Download all public pastes as a json into data directory
-t, --trending Trending pastes
```
### Downloading pastes
Create a directory in the git repo named data, this is where the raw pastes will be stored.
Here is an example of what it looks like:
#### Raw pastes to files
```shell
pastebinner --download
Downloading paste data into the data directory...
Complete.
```
#### JSON file with paste_metadata and paste_text
```shell
pastebinner --json
Downloading paste data as a json into the data directory...
Complete.
```
The data directory will then be populated with pastebin raw paste files with the following naming scheme:
```shell
pastebin_paste_key_agiArDuG
pastebin_paste_key_agiArDuG.raw
```
or
```shell
pastebin_paste_key_agiArDuG.json
```
where the last characters are the paste key for that specific paste.
### To Add:
- fulltext search of raw pastes via elastic search, mysql, postgres, sqlite, or some other method
- create pastes from the command line
- adding exceptions
- adding configuration file support
- adding rspec tests