Skip to content

Commit

Permalink
Disable regexp when not useful (caused URLs like /blah/ to work and r…
Browse files Browse the repository at this point in the history
…eturn an error message), disable pastebin.ca (they use some kind of CAPTCHA), remove archlinux.org (closed), change expiry and regexp for yourpaste.net, update debian/control
  • Loading branch information
stgraber committed Feb 19, 2008
1 parent 95dd9bc commit 3d5cb7b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Build-Depends: debhelper (>= 5)
Build-Depends-Indep: xsltproc, docbook-xml, docbook-xsl
Standards-Version: 3.7.3
Homepage: http://www.stgraber.org/category/pastebinit

Package: pastebinit
Architecture: all
Depends: ${python:Depends}
Depends: python, ${python:Depends}
XB-Python-Version: ${python:Versions}
Description: command-line pastebin client
pastebinit is a command-line tool to send data
Expand All @@ -25,4 +26,3 @@ Description: command-line pastebin client
- http://rafb.net/paste
- http://pastebin.archlinux.org
.
Homepage: http://www.stgraber.org/category/pastebinit
32 changes: 12 additions & 20 deletions pastebinit
Original file line number Diff line number Diff line change
Expand Up @@ -46,37 +46,29 @@ try:
params['paste'] = "Send"
params['remember'] = "0" #Do you want a cookie ?
params['expiry'] = "f" #The expiration, f = forever
elif re.search("http://pastebin.ca/?", website):
params['name'] = user
params['content'] = content
params['type'] = "1" #The expiration, 1 = raw
params['save'] = "0" #Do you want a cookie ?
params['s'] = "Submit Post"
params['regexp'] = '">http://pastebin.ca/(.*)</a></p><p>'
elif re.search("http://pastebin.archlinux.org/?", website):
params['poster']=user
params['code2']=content
params['format']="text" #The format, for syntax hilighting
params['homosapien']="1"
params['paste']="Send"
params['remember']="0" #Do you want a cookie ?
params['expiry']="f" #The expiration, f = forever
elif re.search("http://rafb.net/paste/?", website):
params['page']="paste.php"
# elif website == "http://pastebin.ca":
# params['name'] = user
# params['content'] = content
# params['type'] = "1" #The expiration, 1 = raw
# params['save'] = "0" #Do you want a cookie ?
# params['s'] = "Submit Post"
# params['regexp'] = '">http://pastebin.ca/(.*)</a></p><p>'
elif website == "http://rafb.net" :
params['page']="/paste/paste.php"
params['nick']=user
params['text']=content
params['lang']="Plain Text" #The format, for syntax hilighting
params['cvt_tabs']="No"
elif re.search("http://yourpaste\.net/?", website):
elif website == "http://yourpaste.net":
params['syntax'] = format
params['name'] = user
params['desc'] = title
params['expire'] = "600" # Forever
params['expire'] = "0" # Forever
params['code'] = content
params['private'] = "0" # It's not a private post
params['remember'] = "0" # Cookies? ;)
params['page'] = "/paste"
params['regexp'] = '">http://yourpaste.net(.*)</a>'
params['regexp'] = '">http://yourpaste.net(.*)/</a>'
else:
sys.exit(_("Unknown website, please post a bugreport to request this pastebin to be added (%s)") % website)
return params
Expand Down

0 comments on commit 3d5cb7b

Please sign in to comment.