1
0
mirror of https://github.com/seejohnrun/haste-client.git synced 2025-12-16 16:51:29 +00:00

5 Commits

Author SHA1 Message Date
John Crepezzi
25140d99f5 Bump version to 0.1.4 2013-03-16 20:40:06 -04:00
John Crepezzi
6760a64957 Avoid explosions (code a little different from PR)
Closes #11
2013-03-16 20:39:20 -04:00
John Crepezzi
98e72bce43 Added note to README 2012-12-19 08:10:00 -05:00
John Crepezzi
b53350c723 Alternative 2012-12-16 16:21:45 -05:00
John Crepezzi
be8d4bc5de Added support page 2012-10-22 14:41:51 -04:00
3 changed files with 26 additions and 3 deletions

View File

@@ -13,6 +13,14 @@ This can be really really cool in combination with `pbcopy`, like:
after which the contents of `file` will be accessible at a URL which has been copied to your pasteboard. after which the contents of `file` will be accessible at a URL which has been copied to your pasteboard.
## Support
Please consider paying what you think haste-client is worth:
<a href="https://www.stripeme.com/pay/1r2f">
<img alt="Pay" src="https://www.stripeme.com/pay.jpg" />
</a>
## Making uploading file contents easier ## Making uploading file contents easier
If you supply a valid file path as argument #1 to the client, it will be uploaded: If you supply a valid file path as argument #1 to the client, it will be uploaded:
@@ -37,6 +45,20 @@ After which you can use `work_haste` to send hastes to that server instead.
If you'd like an alternative on Windows that supports functionality similar to `pbcopy`, check out Aidan Ryan's [WinHaste](https://github.com/ajryan/WinHaste) project. If you'd like an alternative on Windows that supports functionality similar to `pbcopy`, check out Aidan Ryan's [WinHaste](https://github.com/ajryan/WinHaste) project.
## Lightweight Alternative
Han Boetes has contributed a simple shell-script alternative for those not interested in installing a RubyGem:
``` bash
haste(){ ( echo "% $@"; eval "$@" ) | curl -F "$@=<-" http://hastebin.com/documents|awk -F '"' '{print "http://hastebin.com/"$4}'}
```
Usage:
``` bash
haste `cat index.html
```
## Author ## Author
John Crepezzi <john.crepezzi@gmail.com> John Crepezzi <john.crepezzi@gmail.com>

View File

@@ -11,8 +11,9 @@ module Haste
# Pull all of the data from STDIN # Pull all of the data from STDIN
def initialize def initialize
if STDIN.tty? if STDIN.tty?
abort 'No input file given' unless ARGV.length == 1 file = ARGV.first
abort "#{file}: No such path" unless File.exists?(file = ARGV[0]) abort 'No input file given' unless file
abort "#{file}: No such path" unless File.exists?(file)
@input = open(file).read @input = open(file).read
else else
@input = STDIN.readlines.join @input = STDIN.readlines.join

View File

@@ -1,5 +1,5 @@
module Haste module Haste
VERSION = '0.1.3' VERSION = '0.1.4'
end end