153 a6dc1b52ba Minor bugfixes; increased comment length on page 1 | 5 年 前 | |
---|---|---|
admin | 7 年 前 | |
css | 6 年 前 | |
html | 6 年 前 | |
img | 8 年 前 | |
js | 7 年 前 | |
notes | 7 年 前 | |
threads | 7 年 前 | |
.gitignore | 7 年 前 | |
LICENSE | 9 年 前 | |
README.md | 6 年 前 | |
admin.py | 7 年 前 | |
backlink.py | 6 年 前 | |
bans.py | 6 年 前 | |
bans.txt | 6 年 前 | |
index.py3 | 5 年 前 | |
ips.txt | 7 年 前 | |
ips2.txt | 7 年 前 | |
list.txt | 7 年 前 | |
mod.py | 6 年 前 | |
settings.txt | 7 年 前 | |
spam.txt | 6 年 前 | |
tripcode.py3 | 7 年 前 | |
webtools.py | 6 年 前 |
Python web board system (textboard, CGI, flatfile)
Inspired by Kareha, Shiichan, Tablecat BBS, and others.
Requires python 3.6+, collections (for defaultdict)
The script iyagi (이야기, "chat") is approaching a nicer cleaner refactor with more features. But it works, and it can do some things that other boards can't.
It currently has the following features:
./settings.txt
Frontpage, in 0ch and 4x13 themes
A thread with no comments, showing off the reply window. "Bump" can
be unchecked, which preserves the thread's order in the index.
Ascii art, using [aa][/aa] tags (out for repairs)
Code, using [code][/code] tags
Locked, stickied, dead threads. Locked threads cannot be posted in, stickied threads always stay at the top of the board, dead threads cannot be bumped.
Installation couldn't be easier. Just download the repo and give the BBS directory and its contents read/write privileges with the web daemon. Then, open settings with your favorite text editor, and from there, confirm your settings.
Moderation is currently done by managing text files in a directory; the default directory is "./threads/". You need to have at least one valid thread on the board to enable posting; if you need to initialize the board, create a folder called "./threads/" that's readable/writable by the web daemon, and in there create a file called 0.txt. In your iyagi directory, create a file called "list.txt".
list.txt contents:
0 >< 0 >< 0 >< 0 >< 0
0.txt contents:
0
0 >< 0 >< 0 >< 0
Then, try posting another thread from the page to confirm that your board works. To get rid of that first thread, remove its entry from list.txt and remove 0.txt from the thread directory. To edit threads/posts, find a thread's filename in your web browser or list.txt, then just modify it in a text editor.
If you want to lock a thread, change the last number in its row, in list.txt, to "1". To sticky, "2". To stickylock, "3". To kill, "4". Then, open the thread (its_unix_time.txt in ./threads/) and add "><", followed by that same value to the title line.
Clunky, but it works for now :)
settings.txt
index.py
./settings.txt
["bad", "words", "go", "here"]
bans.py
bans = {"ip address":"reason"
"1.2.3.4":"spam",
"2.2.2":"a wildcard for 2.2.2"
".": "ban absolutely everyone from posting"
}
Your comments/contributions would be appreciated
Here's what I'd like to bring to future versions of IYAGI
Possible bonus features: