X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail.squbes.com (squbes.com [208.74.142.49]) by lists.alpinelinux.org (Postfix) with ESMTP id B41F21EB587 for ; Fri, 12 Feb 2010 20:46:23 +0000 (UTC) Received: from [10.252.6.134] (c-98-234-19-2.hsd1.ca.comcast.net [98.234.19.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: nangel@nothome.org) by mail.squbes.com (Postfix) with ESMTPSA id C8B8F5000A016; Fri, 12 Feb 2010 20:46:22 +0000 (UTC) Message-ID: <4B75BEA3.2030307@nothome.org> Date: Fri, 12 Feb 2010 12:48:35 -0800 From: Nathan Angelacos User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 To: Michael Mason CC: Alpine-devel Subject: Re: [alpine-devel] Mailing List Archives back online References: <4B75B62B.6020508@nothome.org> <55114990-816E-4A7F-91F4-D6D1D20B2F51@gmail.com> In-Reply-To: <55114990-816E-4A7F-91F4-D6D1D20B2F51@gmail.com> Content-Type: multipart/mixed; boundary="------------070803080609060806000603" This is a multi-part message in MIME format. --------------070803080609060806000603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Michael Mason wrote: > > On Feb 12, 2010, at 8:12 PM, Nathan Angelacos wrote: > >> Due to a malformed email, the alpine-devel mailing list archives >> hadn't been updated since 22 Dec 2009 >> >> The hypermail script is now updated to handle the condition, and the >> archives are now up-to-date again. >> >> Sorry for the outage. >> >> > Nangel: is the is mdir2mbox.lua script that has been included in the > hypermail package for alpine? If it is, please send me the update and I > will include it in the package. > one line patch: --- /usr/bin/mdir2mbox.lua +++ mdir2mbox.lua @@ -70,7 +70,7 @@ local date = string.match("\n" .. headers, "\nDate: ([^\n]*)") if date == nil then - date = os.date ("%c", posix.stat(path, "mtime")) + date = os.date ("%a, %d %b %Y %X +%z", posix.stat(path, "mtime")) end local weekday,day,month,year,time,offset = string.match(date, "([^,]*), +(%d+) (%a+) (%d+) ([%d:]*) ([%d]*)") New file is attached --------------070803080609060806000603 Content-Type: text/x-lua; name="mdir2mbox.lua" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mdir2mbox.lua" #!/usr/bin/lua -- This script takes a mlmmj archive "maildir format" directory and -- writes out an mbox formatted file to stdout -- Copyright (c) 2009 N. Angelacos under the GPL 2 License require "posix" -- command line parser, or exit check_command_line = function () local source_dir = arg[1] local source_time = arg[2] if (source_dir == nil ) then io.stderr:write("mdir2mbox source_dir [hours]\n" .. "Writes an mbox formatted file to stdout from the files in source_dir\n" .. "If [hours] is given, then only files newer then [hours] are processed\n") os.exit(-1) end if (posix.stat(source_dir, "type") ~= "directory") then io.stderr:write(source_dir .. " is not a directory\n") os.exit(-1) end return source_dir, source_time end -- Get candidates get_candidates = function (source, hours) local all = posix.dir(source) local candidates = {} local timestamp = 0 if (hours) then timestamp = os.time() - hours * 3600 end for k,v in ipairs(all) do local st = posix.stat(source .. "/" .. v) if (st) and (st.type == "regular") and (st.mtime > timestamp) then table.insert(candidates,source .. "/" .. v) end end return candidates end file_to_mbox = function (path) local fh = io.open(path) if (fh == nil) then return end local headers = "" local l = "" -- get headers repeat headers = headers .. l l = (fh:read("*l") or "" ) .. "\n" until (#l == 1) local from = string.match("\n" .. headers, "\nFrom: ([^\n]*)") if from == nil then from = string.match("\n" .. headers, "\nReply-To: ([^\n]*)") end if from == nil then from = "" end from = string.match(from, "<([^>]*)>") or string.match(from, "([^ ]*)") local date = string.match("\n" .. headers, "\nDate: ([^\n]*)") if date == nil then date = os.date ("%a, %d %b %Y %X +%z", posix.stat(path, "mtime")) end local weekday,day,month,year,time,offset = string.match(date, "([^,]*), +(%d+) (%a+) (%d+) ([%d:]*) ([%d]*)") print ("From " .. from .. " " .. string.format("%s %s %s %s %s", weekday, month, day, time, year, offset )) print (headers) -- get rest of message repeat local foo = fh:read("*l") if foo then print(foo) end until (foo == nil) fh:close() end candidates = get_candidates(check_command_line ()) for k,v in ipairs(candidates) do file_to_mbox(v) end print ("") --------------070803080609060806000603-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---