-
Notifications
You must be signed in to change notification settings - Fork 27
/
contributions.mbox
172 lines (147 loc) · 6.43 KB
/
contributions.mbox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
From [email protected] Fri Sep 19 18:51:00 2008
Return-Path: <[email protected]>
Date: Sat, 20 Sep 2008 00:51:17 +0200
From: KELEMEN Peter <[email protected]>
To: Brett Smith <[email protected]>
Subject: [PATCH] dtrx: RAR support
Message-ID: <20080919225117.GA993@kaylee>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
Status: RO
X-Status: A
Content-Length: 1589
Lines: 48
Brett,
The following patch adds RAR support for dtrx.
HTH,
Peter
diff -r ececf7836546 scripts/dtrx
--- a/scripts/dtrx Tue Sep 16 21:51:59 2008 -0400
+++ b/scripts/dtrx Sat Sep 20 00:50:16 2008 +0200
@@ -515,6 +515,25 @@ class ShieldExtractor(NoPipeExtractor):
return result
+class RarExtractor(NoPipeExtractor):
+ file_type = 'RAR archive'
+ extract_command = ['unrar', 'x']
+ list_command = ['unrar', 'l']
+ border_re = re.compile('^-+$')
+
+ def get_filenames(self):
+ inside = False
+ for line in NoPipeExtractor.get_filenames(self):
+ if self.border_re.match(line):
+ if inside:
+ break
+ else:
+ inside = True
+ elif inside:
+ yield line.split(' ')[1]
+ self.archive.close()
+
+
class BaseHandler(object):
def __init__(self, extractor, options):
self.extractor = extractor
@@ -775,6 +794,10 @@ class ExtractorBuilder(object):
'mimetypes': ('x-cab',),
'extensions': ('cab',),
'magic': ('Microsoft Cabinet Archive',)},
+ 'rar': {'extractor': RarExtractor,
+ 'mimetypes': ('rar',),
+ 'extensions': ('rar'),
+ 'magic': ('RAR archive')},
'shield': {'extractor': ShieldExtractor,
'mimetypes': ('x-cab',),
'extensions': ('cab', 'hdr'),
From [email protected] Wed Sep 24 09:42:18 2008
X-Original-To: [email protected]
Date: Wed, 24 Sep 2008 15:31:18 +0200
From: KELEMEN Peter <[email protected]>
To: Brett Smith <[email protected]>
Subject: Re: [PATCH] dtrx: RAR support
Message-ID: <20080924133118.GG8943@kyra>
References: <20080919225117.GA993@kaylee> <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <[email protected]>
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
Status: RO
Content-Length: 684
Lines: 25
* Brett Smith ([email protected]) [20080921 14:05]:
> Thanks very much for this; it looks great.
You're welcome.
> Can you please confirm for me that it's licensed under GPLv3 or
> any later version? A simple "yes" will do. :)
Sure, GPLv3 is OK.
> Also, do you want me to add any copyright notice(s) for your
> contribution?
I'm ambivalent, I trust your judgement. Should you choose to do
so, please use my [email protected] address.
Thanks,
Peter
--
.+'''+. .+'''+. .+'''+. .+'''+. .+''
Kelemen Péter / \ / \ [email protected]
.+' `+...+' `+...+' `+...+' `+...+'
From - Thu Dec 01 18:53:16 2011
Return-Path: <[email protected]>
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on llewellyn
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS
autolearn=ham version=3.3.1
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from filtteri1.pp.htv.fi (filtteri1.pp.htv.fi [213.243.153.184])
by brettcsmith.org (Postfix) with ESMTP id A51BA67A6
for <[email protected]>; Thu, 1 Dec 2011 02:22:59 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
by filtteri1.pp.htv.fi (Postfix) with ESMTP id CC02018B3AA
for <[email protected]>; Thu, 1 Dec 2011 09:22:58 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from smtp5.welho.com ([213.243.153.39])
by localhost (filtteri1.pp.htv.fi [213.243.153.184]) (amavisd-new, port 10024)
with ESMTP id nX7Bob2-Ku0p for <[email protected]>;
Thu, 1 Dec 2011 09:22:56 +0200 (EET)
Received: from viper.bobcat.mine.nu (cs181085020.pp.htv.fi [82.181.85.20])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by smtp5.welho.com (Postfix) with ESMTPS id 50F675BC002
for <[email protected]>; Thu, 1 Dec 2011 09:22:56 +0200 (EET)
Message-ID: <[email protected]>
Date: Thu, 01 Dec 2011 09:22:56 +0200
From: =?ISO-8859-1?Q?Ville_Skytt=E4?= <[email protected]>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16
MIME-Version: 1.0
To: Brett Smith <[email protected]>
Subject: Re: [PATCH 0 of 3] Some trivial dtrx patches
References: <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]>
In-Reply-To: <[email protected]>
X-Enigmail-Version: 1.1.2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
On 12/01/2011 02:00 AM, Brett Smith wrote:
> On 11/30/2011 02:13 PM, Ville Skyttä wrote:
>> BTW, you mentioned earlier that you were applying some of my initial
>> trival patches but I don't see them in the public hg repo yet, did you
>> find a problem with them?
>
> No, no problem. That's really weird -- they started showing up at
> <http://brettcsmith.org/2007/dtrx/dtrx/> as soon as I pushed them, and
> when I clone that repository with hg they show up in the log too. How
> are you checking this?
hg pull -u. But I see the two first ones are indeed in the repository,
so it's possible that I've managed to mess up something locally. No
problem, I'll probably just throw away my earlier clone.
> I'm happy with the second round of patches too, but I meant to ask
> before I apply them: since they're more substantive, can I go ahead and
> add your copyright line to the source code? And can you please just
> confirm that you're okay with this code being distributed under GPLv3 or
> later?
Yes, go ahead, and GPLv3+ is fine. (That means that I may need to
switch from GPLv2+ to GPLv3+ for some other utilities I have that may be
using dtrx in the future, but that shouldn't be a problem.)