Using pbpaste

I would like to use http://pastie.caboo.se/paste/4703 from the command
line, but the syntax escapes me :frowning:

thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ cat pbpaste.rb
#!/bin/sh
# With a little automator workflow, quicksilver magic, and a judicious
# placement of pbpaste on the next line you can paste with almost no
effort at
# all.
url=$(curl http://pastie.caboo.se/pastes/create \
    -H "Expect:" \
    -F "paste[parser]=plaintext" \
    -F "paste[body]=<-" \
    -s -L -o /dev/null -w "%{url_effective}")

echo -n "$url" | pbcopy
echo "$url"
thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ ruby pbpaste.rb

how do I generate a URL like wgetpaste does?

thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ wgetpaste

ahhh, this one works fine from gentoo.
Your paste can be seen here: http://rafb.net/p/UpiiMu57.html
thufir@arrakis ~/Desktop $

thanks,

Thufir

Dude, don't put yourself through that kind of pain. The next version
of my Utility Belt gem will have a pastie command-line tool. It
already has one for IRB.

Utility Belt! Only $9.99! Call now!

···

On 1/2/08, Thufir <hawat.thufir@gmail.com> wrote:

I would like to use http://pastie.caboo.se/paste/4703 from the command
line, but the syntax escapes me :frowning:

thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ cat pbpaste.rb
#!/bin/sh
# With a little automator workflow, quicksilver magic, and a judicious
# placement of pbpaste on the next line you can paste with almost no
effort at
# all.
url=$(curl http://pastie.caboo.se/pastes/create \
    -H "Expect:" \
    -F "paste[parser]=plaintext" \
    -F "paste[body]=<-" \
    -s -L -o /dev/null -w "%{url_effective}")

echo -n "$url" | pbcopy
echo "$url"
thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ ruby pbpaste.rb

how do I generate a URL like wgetpaste does?

thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $
thufir@arrakis ~/Desktop $ wgetpaste

ahhh, this one works fine from gentoo.
Your paste can be seen here: http://rafb.net/p/UpiiMu57.html
thufir@arrakis ~/Desktop $

thanks,

Thufir

--
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com