1.7 KiB
1.7 KiB
Pastebinner
Check out the examples folder for some examples. I will add more soon.
Usage
Set these three environment variables:
pastebin_api_key
pastebin_username
pastebin_password
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/pastebinner.rb
, I am still working on adding in the functionality to use it on the command line.
The command line app can be used as follows:
pastebinner --help
Usage: pastebinner [options]
-h, --help Show this help messae
-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
-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:
pastebinner --download
Downloading paste data into the data directory...
Complete.
The data directory will then be populated with pastebin raw paste files with the following naming scheme:
pastebin_paste_key_agiArDuG pastebin_paste_key_f9sZ4zfZ pastebin_paste_key_kkS48wHT pastebin_paste_key_rjxNDUbN pastebin_paste_key_vu5HSagJ pastebin_paste_key_ZZrUy4Fa
pastebin_paste_key_AHMT1YSC pastebin_paste_key_f9Zn6FWf pastebin_paste_key_kLVdVpTW pastebin_paste_key_rLDbHTZN pastebin_paste_key_vv6R1Dz4