From ed1e2cbe77f93307f0f3bff736e14695a6c59163 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Thu, 4 May 2023 16:01:14 -0700 Subject: Fresh initial commit to remove large history --- html_gen/html_gen.py | 375 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 375 insertions(+) create mode 100644 html_gen/html_gen.py (limited to 'html_gen') diff --git a/html_gen/html_gen.py b/html_gen/html_gen.py new file mode 100644 index 0000000..10042d8 --- /dev/null +++ b/html_gen/html_gen.py @@ -0,0 +1,375 @@ + +def generate_html_divider(label_text): + divider = '
' + divider += '
' + divider += f'{label_text}' + divider += '
' + return divider + + +def generate_title_banner(title_text, color_theme="2a4b71"): + banner_html = f""" + + + + """ + return banner_html + + + + +def generate_meta_data(title: str, description: str, image_url: str): + return f""" + + + + + {title} + + + + + + + + + + + + + + + + + + + + + + + + """ + +def build_footer_info(info: str): + footer = f""" +
+
+ Information +
+
+

Data for this site is taken every hour. Due to limitation with YouTube's API only certain increments in subscriber counts will be reflected based on each liver's channel size

+

Each liver has their own page to track their own individual achievements and subscriber count. The full table of all recorded daily data for each channel is also viewable

+
+
+ A Note on Graduating Livers +
+
+

If a liver is determined to be graduating, retiring, or terminated, Nijitracker will stop tracking their subscriber count, and their page and entry will be removed

+

Historical data is still retrievable through the Nijitracker API api.nijitracker.com +

+
+
+

{info}

+
+
+ + License + +
+
+ """ + return footer + +def side_swipe_header(text: str, color_theme="007ACC", url: str="https://nijitracker.com"): + banner_html = f""" + + + + + """ + return banner_html + + + +def generate_info_card(name, youtube_channel_id, profile_pic, description): + # Build the HTML string + html = f""" +
+ +
+
+ {name} +
+
+

{name}

+

{description}

+ YouTube Channel +
+
+ """ + # Return the HTML string + return html + + +def generate_subscriber_info_card(subscriber_count): + formatted_sub_count = "{:,.0f}".format(int(subscriber_count)) + html_template = f''' +
+
+

{formatted_sub_count}

+

Subscribers

+
+
+ ''' + return html_template + +def generate_full_table_button(url): + button_html = """ + +
+ + """ + button_html += f"""View Full Table""" + return button_html + +def generate_doctype_footer(): + return """ + + + """ \ No newline at end of file -- cgit v1.2.3