Project

hastebin

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
CLI tool that works with hasteb.in and hastebin.com .
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

hastebin

CLI tool that uploads text to hasteb.in . (Basically a Gem version of haste-client)

Installation

To install this package using GEM, run: gem install hastebin

Usage

Write via the Shell

$ hastebin --write "puts("hello")"

Upload Files via the Shell

$ hastebin --upload "./text.txt"

Download Files via the Shell

$ hastebin --download "wihuwavi"

Run Ruby Files via the Shell

$ hastebin --run "wihuwavi"

Read Files via the Shell

$ hastebin --read "wihuwavi"

Via the Ruby API

require 'hastebin'

# Write and Send
puts Hastebin.write("puts('Written with Hastebin CLI Ruby')") # return key

# Send Files
puts Hastebin.sendFile("./file.rb") # return key

# Read Files via hasteb.in
#                        key
puts Hastebin.readRaw('wihuwavi') # return raw

# Run Ruby File via hasteb.in
#                key
Hastebin.run('wihuwavi')

# Download File via hasteb.in
Hastebin.download('wihuwavi')

# Custom server
Hastebin.base_url = 'https://hastebin.com/'

puts Hastebin.base_url # https://hasteb.in/

puts Hastebin.domain # hasteb.in

puts Hastebin.ping # 450

License

This module is licensed under the MIT license.