[ Question ]

SL4 in more legible format

by Richard_Ngo1 min read12th Aug 20214 comments


Personal Blog

Does anyone have a copy of the SL4 archives in a format that's easier to read - e.g. a single file?

If not, I'd be happy to pay someone to put this together; let me know if interested.

New Answer
Ask Related Question
New Comment

2 Answers

How much are you offering? I downloaded by the by-date archive page and wrote this Python code to download the individual message pages, with the thought of catting them together to get your "single file." (Which is an ugly hack and not even technically valid HTML, but it worked when I've done it in the past.) But it's only halfway through downloading and I need to turn the computer and its noisy fan off and go to sleep now; this should be easy to finish tomorrow.

import re
import requests

# http://sl4.org/archive/date.html
with open("sl4_archive_date.html", 'rb') as toc:
    archive_page = str(toc.read())
    results = re.findall(r"http://sl4.org/archive/\d+/\d+.html", archive_page)

for i, result in enumerate(results):
    message = requests.get(result)
    with open("messages/{:07}.html".format(i), 'w') as f:

Ugh, maybe this wasn't such a good strategy. After downloading all the message pages and catting them in a loop, I did "successfully" end up with a 128 MiB HTML file ...


But, first of all, it somehow ended up with a lot of escape characters (\n, \') displayed literally in the page. (Not sure how that happe—oh. The str(message.content) in my script should have been a message.content.decode().) Second of all, this enormous file is not actually smooth to read on my machine (it just crashes in Firefox, and Chromium is very laggy). On net, t... (read more)

I suggest looking at hypetombox.pl, which should convert the archive into a Unix mbox file. You probably want to use wget first.

I'd specifically suggest using something like

wget --mirror -np http://sl4.org/archive/date.html

to download everything into a local directory structure.  After that you can experiment with how to format the resulting stuff.