homediscussionstagsboardsrulesabout


How to rename a multich friend

source: local ♦ tags: #help #meta #multich ||

#1 )) Name: Anonymous @ 2021-05-23 17:13

pirate said, on 2021-05-23 at 08:26
> Speaking of which, horse fucker eels aside, I'm going to write a
> tool to make migrations easier. For now, here's the gist of how
> they happen. If a board changes URLs, our best practice for now
> is to assign the old URL / set of posts a new nickname, and then
> one can give the "proper" name to the new domain.
> Set the old board's URL to " " or similar in settings.py!
> The trick to "renaming" a board (e.g. from "old" to "new") is this :

First, replace every ./threads/*/*/old.txt with ./threads/*/*/new.txt
I did this by
> ls ./threads/*/*/old.txt > files.txt
and then I used an emacs macro to make every instance of (for example)
> ./threads/somewhere/12345/old.txt
become
> mv ./threads/somewhere/12345/old.txt ./threads/somewhere/12345/new.txt

Next, replace every instance of "old" in every threads/*/*/list.txt
with "new" -- generate a file list with
> ls ./threads/*/*/list.txt > files.txt
I again used emacs in this file to prefix every instance like
> ./threads/somewhere/12345/list.txt
with the rename command:
> sed -i "s/old/new/g" ./threads/somewhere/12345/list.txt

Finally,
> mv ./threads/old/ ./threads/new/
> sed -i "s/old/new/g" ./threads/list.txt
After you run python3 refresh.py, the board's name will have changed
properly, while >>replies stay intact.

#2 )) Name: Admin @ 2021-05-23 17:22

It's not as simple as just changing the URL of an old domain to a new one in the settings file, because if you do that, all of the old replies like >>http://sitename/reply will just stop working. If you ever want to change the URL of your site, likewise, it's better to simply start a new server and then re-download the old posts from the old site while it's still online with a name like "old", "archive", "x-site", or whatever you want its nickname to be.

A tool in the admin panel will handle this

#3 )) Name: Anonymous @ 2021-05-25 07:51

I have to update the scraper tool so that if it attempts to scrape an HTTP resource that's not a proper multich file, the scraper knows the site's dead and ignores it.

Or maybe add a dead url setting.



(new)

You need to solve the captcha before you can post.