From c00e0f9f07827630ccba2cf4ac8bf0793d0ba930 Mon Sep 17 00:00:00 2001
From: Choom
Date: Mon, 23 Jan 2023 18:09:26 -0300
Subject: Separando .trip de .name
---
cgi/manage.py | 50 ++++++++++++++++++++++++++++--------
cgi/templates/board.0.html | 8 +++---
cgi/templates/board.html | 26 ++++++++++---------
cgi/templates/board.jp.html | 26 ++++++++++---------
cgi/templates/txt_archive.html | 8 +++---
cgi/templates/txt_board.en.html | 8 +++---
cgi/templates/txt_board.html | 8 +++---
cgi/templates/txt_thread.html | 11 ++++----
cgi/weabot.py | 7 ------
static/css/buri.css | 12 +++------
static/css/cyber.css | 19 +++++++-------
static/css/dickgirl.css | 30 ++++++++++++++++------
static/css/easymodo.css | 12 +++------
static/css/futaba.css | 14 ++++-------
static/css/guro.css | 14 ++++-------
static/css/hotdog.css | 29 +++++++++++++++------
static/css/ib.css | 56 ++++++++++++++++++++++-------------------
static/css/kraut.css | 5 ++--
static/css/lavanda.css | 5 ++--
static/css/night.css | 9 +++----
static/css/photon.css | 14 ++++-------
static/css/putaba.css | 28 ++++++++++-----------
static/css/red.css | 7 +++---
static/css/rene.css | 32 ++++++++++++++++++++---
static/css/txt/amber.css | 5 ++--
static/css/txt/ayashii.css | 2 --
static/css/txt/baisano.css | 16 +++---------
static/css/txt/bbs.css | 10 +++-----
static/css/txt/berries.css | 7 ++----
static/css/txt/bios.css | 7 ++----
static/css/txt/blue moon.css | 7 +++---
static/css/txt/ciber.css | 4 +--
static/css/txt/cuteanarchy.css | 6 ++---
static/css/txt/futanari.css | 25 ++++++++----------
static/css/txt/gamer.css | 7 +++---
static/css/txt/headline.css | 6 ++---
static/css/txt/mercury.css | 1 -
static/css/txt/postal.css | 5 ++--
static/css/txt/ventanas.css | 5 ++--
static/css/txt/void.css | 2 +-
static/css/vndb.css | 7 +++---
41 files changed, 293 insertions(+), 267 deletions(-)
diff --git a/cgi/manage.py b/cgi/manage.py
index e3d7704..cd1a215 100644
--- a/cgi/manage.py
+++ b/cgi/manage.py
@@ -1398,10 +1398,12 @@ def manage(self, path_split):
if not administrator:
return
+ return
+
board = setBoard(path_split[3])
- threads = FetchAll(
- 'SELECT * FROM archive WHERE boardid = %s ORDER BY timestamp DESC' % board['id'])
+ threads = FetchAll('SELECT * FROM archive WHERE boardid = %s ORDER BY timestamp DESC' % board['id'])
+
for item in threads:
t = time.time()
self.output += str(item['timestamp']) + '
'
@@ -1410,22 +1412,50 @@ def manage(self, path_split):
str(item["timestamp"]) + ".json"
if os.path.isfile(fname):
import json
+
with open(fname) as f:
thread = json.load(f)
- thread['posts'] = [
- dict(list(zip(thread['keys'], row))) for row in thread['posts']]
- template_fname = "txt_archive.html"
-
- post_preview = cut_home_msg(
- thread['posts'][0]['message'], 0)
- page = renderTemplate("txt_archive.html", {"threads": [
- thread], "preview": post_preview}, False)
+
+ #thread['posts'] = [dict(list(zip(thread['keys'], row))) for row in thread['posts']]
+
+ #if 'posterid' not in thread['keys']:
+ # for post in thread['posts']:
+ # half = post['timestamp_formatted'].split(' ID:')
+ # if len(half) > 1:
+ # post['timestamp_formatted'] = half[0]
+ # post['posterid'] = half[1]
+ # else:
+ # post['posterid'] = ''
+ #
+ # thread['keys'].append('posterid')
+
+ #if 'message' not in thread:
+ # thread['message'] = thread['posts'][0]['message']
+ # thread['keys'].append('message')
+
+ #thread['posts'] = [[row[key] for key in thread['keys']] for row in thread['posts']]
+
+ ##raise UserError(thread)
+
+ #try:
+ # with open(fname, "w") as f:
+ # json.dump(thread, f, indent=0)
+ #except:
+ # raise UserError("Can't edit")
+
+ thread['posts'] = [dict(list(zip(thread['keys'], row))) for row in thread['posts']]
+
+ post_preview = cut_msg(thread['message'], 0)
+
+ page = renderTemplate("txt_archive.html", {"threads": [thread], "preview": post_preview}, False)
+
with open(Settings.ROOT_DIR + board["dir"] + "/kako/" + str(thread['timestamp']) + ".html", "w") as f:
f.write(page)
self.output += 'done' + str(time.time() - t) + '
'
else:
self.output += 'El hilo no existe.
'
+
elif path_split[2] == 'fixexpires':
if not administrator:
return
diff --git a/cgi/templates/board.0.html b/cgi/templates/board.0.html
index 51bfe71..5be1e28 100644
--- a/cgi/templates/board.0.html
+++ b/cgi/templates/board.0.html
@@ -13,7 +13,7 @@