All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabian Aldo Santiago <fsantiago@gardenlan.com>
To: mlmmj@mlmmj.org
Subject: Re: [mlmmj] Mlmmj webarchiver
Date: Thu, 15 Nov 2018 23:14:44 +0000	[thread overview]
Message-ID: <71cb4b6b2e0ba1ba78d3e77a098fe714@gardenlan.com> (raw)
In-Reply-To: <74E860C1-8583-4681-B3BD-4B77BC283293@gardenlan.com>

On 2018-11-15 13:47, Fabian Aldo Santiago wrote:
> On 2018-11-15 13:35, A. Schulze wrote:
>> Am 15.11.18 um 16:28 schrieb fsantiago@gardenlan.com:
>>> https://git.cryptomilk.org/projects/mlmmj-webarchiver.git/
>>> And I’ve gotten it mostly working fine except the search link when 
>>> clicked presents a blank page. 
>>> I nginx with php-fpm to serve the site. The nginx error log complains 
>>> about an unexpected ‘&’ somewhere around line 34 of the search.php 
>>> file.
>> 
>> I've created a package for my installations. And - surprise - I wrote
>> a patch years ago that looks similar to your problem.
>> 
>> --- mlmmj-webarchiver.orig/mlmmj-webarchiver/search.php.newlist
>> +++ mlmmj-webarchiver/mlmmj-webarchiver/search.php.newlist
>> @@ -31,13 +31,13 @@
>>                 $html=array();
>>                 $count=0;
>>                 $maxresults=##MAX_RESULTS##;
>> -               exec("find -type f -name '0*.html' | xargs egrep -roi
>> '$words' | perl -pe 's/:.*//' | sort | uniq",&$output);
>> +               exec("find -type f -name '0*.html' | xargs egrep -roi
>> '$words' | perl -pe 's/:.*//' | sort | uniq",$output);
>>                 while(isset($output[$count]) && $count<$maxresults)
>>                 {
>>                         $file=$output[$count++];
>>                         $content=file_get_contents($file);
>>                         $matches=array();
>> -                       if (preg_match('/<em>Subject<\/em>:
>> ([^<]*)<\/li>[\S\s]+From<\/em>: ([^<]*)<\/li>[\S\s]+Date<\/em>:
>> ([^<]*)<\/li>/',$content,&$matches))
>> +                       if (preg_match('/<em>Subject<\/em>:
>> ([^<]*)<\/li>[\S\s]+From<\/em>: ([^<]*)<\/li>[\S\s]+Date<\/em>:
>> ([^<]*)<\/li>/',$content,$matches))
>>                         {
>>                                 $html[]="<li><a
>> href='$file'>$matches[1]</a>, $matches[2], $matches[3]</li>";
>>                         }
>> 
>>> Has anyone seen this?
>> obviously, because I wrote and forgot that patch :-)
>> 
>>> Does anyone still use this project?
>> yes - https://signing-milter.org/listarchive/ and
>> https://mail.dnswl.org/ml-archive/
>> 
>> Andreas
> 
> that's awesome! Thank you very much. I'll give this a whirl.

worked fine. thank you.

-- 
- Fabian S.

Open PGP:
0xE6826058E6ED7726DAA4C78303190CC0D1800E36


      parent reply	other threads:[~2018-11-15 23:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 15:28 [mlmmj] Mlmmj webarchiver fsantiago
2018-11-15 18:35 ` A. Schulze
2018-11-15 18:47 ` Fabian Aldo Santiago
2018-11-15 23:14 ` Fabian Aldo Santiago [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71cb4b6b2e0ba1ba78d3e77a098fe714@gardenlan.com \
    --to=fsantiago@gardenlan.com \
    --cc=mlmmj@mlmmj.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.