SOURCES: pastebinit-anybin.patch (NEW) - space cleanup - regexp simplify - ...

glen glen at pld-linux.org
Wed Mar 4 10:27:11 CET 2009


Author: glen                         Date: Wed Mar  4 09:27:11 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- space cleanup
- regexp simplify
- allow any pastebin install, just require /pastebin/ being it's install location

---- Files affected:
SOURCES:
   pastebinit-anybin.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/pastebinit-anybin.patch
diff -u /dev/null SOURCES/pastebinit-anybin.patch:1.1
--- /dev/null	Wed Mar  4 10:27:12 2009
+++ SOURCES/pastebinit-anybin.patch	Wed Mar  4 10:27:05 2009
@@ -0,0 +1,54 @@
+--- pastebinit-0.11/pastebinit~	2009-03-04 11:19:30.208328432 +0200
++++ pastebinit-0.11/pastebinit	2009-03-04 11:23:48.005016629 +0200
+@@ -12,7 +12,7 @@
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+-#				
++#
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+@@ -54,13 +54,13 @@
+ 		"Return the parameters array for the selected pastebin"
+ 		params={}
+ 		# pastebin.com v0.50
+-		if (re.search("http://((([a-zA-Z0-9\-_\.]*)(pastebin\.com)))", website) and not website == "http://www.pastebin.com") or website == "http://pastebin.mozilla.org":
++		if (re.search("http://(?:[^/]*pastebin\.com|[^/]+/pastebin/)", website) and not website == "http://www.pastebin.com") or website == "http://pastebin.mozilla.org":
+ 			params['poster'] = user
+ 			params['code2'] = content
+ 			params['version'] = version
+ 			params['parent_pid'] = parentpid #For reply, "" means homepage (new thread)
+ 			params['format'] = format #The format, for syntax hilighting
+-			params['paste'] = "Send" 
++			params['paste'] = "Send"
+ 			params['remember'] = "0" #Do you want a cookie ?
+ 			params['expiry'] = "f" #The expiration, f = forever
+ 		elif website == "http://pastebin.ca":
+@@ -70,7 +70,7 @@
+ 			params['save'] = "0" #Do you want a cookie ?
+ 			params['s'] = "Submit Post"
+ 			params['regexp'] = '">http://pastebin.ca/(.*)</a></p><p>'
+-		elif re.search("http://((([a-zA-Z0-9\-_\.]*)(1t2\.us)))", website):	
++		elif re.search("http://[a-zA-Z0-9\-_\.]*1t2\.us", website):
+ 			params['poster'] = user
+ 			params['jid'] = jabberid
+ 			params['code2'] = content
+@@ -120,7 +120,7 @@
+ 			params['lang'] = format
+ 			params['code'] = content
+ 			params['parent'] = "0"
+-		elif re.search("http://((([a-zA-Z0-9\-_\.]*)(pastey\.net)))", website):	
++		elif re.search("http://[a-zA-Z0-9\-_\.]*pastey\.net", website):
+ 			params['author'] = user
+ 			params['subject'] = title
+ 			params['parent'] = pasteyParentFixup(website, parentpid)
+@@ -299,7 +299,7 @@
+ 			sys.exit(_("Unable to read from: %s") % filename)
+ 
+ 	params = getParameters(website, content, user, jabberid, version, format, parentpid, permatag, title, username, password) #Get the parameters array
+-	
++
+ 	if not re.search(".*/", website):
+ 		website += "/"
+ 
================================================================


More information about the pld-cvs-commit mailing list