Large number of changes

- Changed menu structure to support Web Client
- Added Quick Commands
- Added Sync process for Channel Dir
This commit is contained in:
TC² 2024-07-04 23:46:22 -04:00
parent 783c434f3f
commit aa6f70831f
4 changed files with 338 additions and 22 deletions

View file

@ -10,7 +10,7 @@ from utils import (
send_bulletin_to_bbs_nodes,
send_delete_bulletin_to_bbs_nodes,
send_delete_mail_to_bbs_nodes,
send_mail_to_bbs_nodes, send_message
send_mail_to_bbs_nodes, send_message, send_channel_to_bbs_nodes
)
@ -51,12 +51,16 @@ def initialize_database():
conn.commit()
print("Database schema initialized.")
def add_channel(name, url):
def add_channel(name, url, bbs_nodes=None, interface=None):
conn = get_db_connection()
c = conn.cursor()
c.execute("INSERT INTO channels (name, url) VALUES (?, ?)", (name, url))
conn.commit()
if bbs_nodes and interface:
send_channel_to_bbs_nodes(name, url, bbs_nodes, interface)
def get_channels():
conn = get_db_connection()
c = conn.cursor()
@ -85,6 +89,7 @@ def add_bulletin(board, sender_short_name, subject, content, bbs_nodes, interfac
return unique_id
def get_bulletins(board):
conn = get_db_connection()
c = conn.cursor()