{name2}
''' This is a library for formatting GPT-4chan and chat outputs as nice HTML. ''' import os import re from pathlib import Path import markdown from PIL import Image # This is to store the paths to the thumbnails of the profile pictures image_cache = {} def generate_basic_html(s): with open(Path(__file__).resolve().parent / '../css/html_readable_style.css', 'r') as f: css = f.read() s = '\n'.join([f'
{line}
' for line in s.split('\n')]) s = f'