Mercurial > hg > config
comparison bin/pastebin.sh @ 0:f3ab51c79813
adding configuration from https://svn.openplans.org/svn/config_jhammel/
author | k0s <k0scist@gmail.com> |
---|---|
date | Thu, 15 Oct 2009 11:41:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f3ab51c79813 |
---|---|
1 # all spaces must be converted to '+' | |
2 # all newlines must be converted to %0D%0A | |
3 # this is probably better off converted in a python script | |
4 | |
5 CONTENT_DATA=`python -c "import sys; print '%0D%0A'.join(sys.stdin.read().split('\n'))" | sed 's/ /+/g'` | |
6 | |
7 #echo $CONTENT_DATA | |
8 #CONTENT_DATA=`echo ${CONTENT_DATA} | sed 's/ /+/g'` | |
9 #echo $CONTENT_DATA | |
10 #CONTENT_DATA=`echo ${CONTENT_DATA} | sed 's/$/%0D%0A/g'` | |
11 | |
12 wget --post-data="content=${CONTENT_DATA}&s=Submit+Post&description=&type=1&expiry=&name=" -O- http://www.pastebin.ca/index.php | grep 'meta http-equiv="refresh"' | sed 's/^.*\(http:[^"]*\).*/\1/' | |
13 |