summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pastebinit-bzr.patch80
-rw-r--r--pastebinit-configparsing.patch34
-rw-r--r--pastebinit.spec10
3 files changed, 3 insertions, 121 deletions
diff --git a/pastebinit-bzr.patch b/pastebinit-bzr.patch
deleted file mode 100644
index 4f71dd2..0000000
--- a/pastebinit-bzr.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -urN pastebinit-1.1.org/pastebin.d/paste2.org.conf pastebinit-1.1/pastebin.d/paste2.org.conf
---- pastebinit-1.1.org/pastebin.d/paste2.org.conf 2010-04-11 18:12:46.000000000 +0200
-+++ pastebinit-1.1/pastebin.d/paste2.org.conf 2010-11-21 15:59:49.000000000 +0100
-@@ -10,5 +10,5 @@
- parent = parent
-
- [defaults]
--page = 'new-paste'
-+page = '/new-paste'
- parent = 0
-diff -urN pastebinit-1.1.org/pastebin.d/pastebin.com.conf pastebinit-1.1/pastebin.d/pastebin.com.conf
---- pastebinit-1.1.org/pastebin.d/pastebin.com.conf 2010-04-11 18:03:09.000000000 +0200
-+++ pastebinit-1.1/pastebin.d/pastebin.com.conf 2010-11-21 15:59:49.000000000 +0100
-@@ -3,23 +3,21 @@
- regexp = "http://((([a-zA-Z0-9\-_\.]*)(pastebin\.com)))"
-
- [format]
--content = paste_code
--user = paste_name
-+submit = submit
-+parentpid = paste_parent_key
- subdomain = paste_subdomain
--private = paste_private
--expiry = paste_expire_date
-+content = paste_code
- paste_format = paste_format
--email = paste_email
-+expiry = paste_expire_date
-+private = paste_private
-+remember = paste_remember
- page = page
--submit = submit
--regexp = regexp
-
- [defaults]
--submit = submit
--paste_format = text
-+paste_format = 1
- private = 0
-+remember = 1
- expiry = N
-+submit = submit
- subdomain = ""
--email = ""
--page = "/api_public.php"
--regexp = "(.*)"
-+page = "/post.php"
-diff -urN pastebinit-1.1.org/pastebin.d/yourpaste.net.conf pastebinit-1.1/pastebin.d/yourpaste.net.conf
---- pastebinit-1.1.org/pastebin.d/yourpaste.net.conf 2010-04-11 18:08:12.000000000 +0200
-+++ pastebinit-1.1/pastebin.d/yourpaste.net.conf 2010-11-21 15:59:49.000000000 +0100
-@@ -18,4 +18,4 @@
- private = 0
- remember = 0
- page = '/paste'
--regexp = '">http://yourpaste.net/(.*)</a>'
-+regexp = '">http://yourpaste.net(.*)</a>'
-diff -urN pastebinit-1.1.org/pastebinit pastebinit-1.1/pastebinit
---- pastebinit-1.1.org/pastebinit 2010-04-11 18:13:18.000000000 +0200
-+++ pastebinit-1.1/pastebinit 2010-11-21 15:59:49.000000000 +0100
-@@ -25,7 +25,7 @@
- gettext.textdomain("pastebinit")
-
- defaultPB = "http://pastebin.com" #Default pastebin
-- version = "1.1" #Version number to show in the usage
-+ version = "1.0" #Version number to show in the usage
- configfile = os.path.expanduser("~/.pastebinit.xml")
-
- # Custom urlopener to handle 401's
-@@ -281,10 +281,7 @@
- try:
- if reLink: #Check if we have to apply a regexp
- website = website.replace(tmp_page, "")
-- if reLink == '(.*)':
-- print page.read().strip()
-- else:
-- print website + re.split(reLink, page.read())[1] #Print the result of the Regexp
-+ print website + "/" + re.split(reLink, page.read())[1] #Print the result of the Regexp
- else:
- print page.url #Get the final page and show the ur
- except KeyboardInterrupt:
diff --git a/pastebinit-configparsing.patch b/pastebinit-configparsing.patch
deleted file mode 100644
index 4a63283..0000000
--- a/pastebinit-configparsing.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- pastebinit.orig 2009-03-10 06:24:07.000000000 +0100
-+++ pastebinit 2009-07-24 18:59:46.045879618 +0200
-@@ -177,6 +177,12 @@
- def getFirstNodeText(nodes, title):
- return getText(getFirstNode(nodes, title).childNodes)
-
-+ def nodeExists(nodes, title):
-+ node = nodes.getElementsByTagName(title)
-+ if node == []:
-+ return None
-+ return True
-+
- # Display usage instructions
- def Usage ():
- print "pastebinit v" + version
-@@ -231,10 +237,14 @@
- if gotconfigxml == 1:
- try:
- configxml = xml.dom.minidom.parseString(configtext)
-- website = getFirstNodeText(configxml, "pastebin")
-- user = getFirstNodeText(configxml, "author")
-- format = getFirstNodeText(configxml, "format")
-- jabberid = getFirstNodeText(configxml, "jabberid")
-+ if nodeExists(configxml, "pastebin"):
-+ website = getFirstNodeText(configxml, "pastebin")
-+ if nodeExists(configxml, "author"):
-+ user = getFirstNodeText(configxml, "author")
-+ if nodeExists(configxml, "format"):
-+ format = getFirstNodeText(configxml, "format")
-+ if nodeExists(configxml, "jabberid"):
-+ jabberid = getFirstNodeText(configxml, "jabberid")
- except KeyboardInterrupt:
- sys.exit(_("KeyboardInterrupt caught."))
- except:
diff --git a/pastebinit.spec b/pastebinit.spec
index 3c60a06..b68ab09 100644
--- a/pastebinit.spec
+++ b/pastebinit.spec
@@ -1,14 +1,12 @@
Summary: Command line Pastebin
Summary(pl.UTF-8): Pastebin działający z linii poleceń
Name: pastebinit
-Version: 1.1
-Release: 3
+Version: 1.2
+Release: 1
License: GPL v2+
Group: Applications
Source0: http://launchpad.net/pastebinit/trunk/%{version}/+download/%{name}-%{version}.tar.gz
-# Source0-md5: 669a27ff705e101488834e1524196587
-Patch0: %{name}-bzr.patch
-Patch1: %{name}-configparsing.patch
+# Source0-md5: 676dca696755bb92dd485a2246b1d75d
URL: https://launchpad.net/pastebinit
BuildRequires: gettext-devel
BuildRequires: rpm-pythonprov
@@ -30,8 +28,6 @@ standardowego wyjścia, a on przeklei informacje na Pastebin.
%prep
%setup -q
-%patch0 -p1
-%patch1 -p0
%{__sed} -i -e 's#http://pastebin.com#http://pld.pastebin.com#g' pastebinit