{name2}
''' This is a library for formatting GPT-4chan and chat outputs as nice HTML. ''' import os import re import markdown from pathlib import Path from PIL import Image # This is to store the paths to the thumbnails of the profile pictures image_cache = {} def generate_basic_html(s): css = """ .container { max-width: 600px; margin-left: auto; margin-right: auto; background-color: rgb(31, 41, 55); padding:3em; } .container p { font-size: 16px !important; color: white !important; margin-bottom: 22px; line-height: 1.4 !important; } """ s = '\n'.join([f'
{line}
' for line in s.split('\n')]) s = f'