<commit_before>﻿
using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AwfulNET.Core.Common
{
    internal class ThreadPageConverter : HtmlConverter<ThreadPageMetadata>
    {
        public static readonly ThreadPageConverter Instance;
        public static bool ShowAvatars { get; set; }
        public static string MarkReadLabel { get; set; }
        public static string QuoteLabel { get; set; }
        public static string MarkUnreadLabel { get; set; }
        public static string EditLabel { get; set; }
        public static bool IsDarkTheme { get; set; }
        public static string DarkImagePrefix { get; set; }
        public static string LightImagePrefix { get; set; }

        static ThreadPageConverter()
        {
            Instance = new ThreadPageConverter();

            // set defaults
            ShowAvatars = true;
            MarkReadLabel = "seen";
            MarkUnreadLabel = "unseen";
            QuoteLabel = "quote";
            EditLabel = "edit";
            DarkImagePrefix = "img/dark";
            LightImagePrefix = "img/light";
        }

        private ThreadPageConverter() : base() { }

        public override string ConvertToHtml(ThreadPageMetadata page)
        {<commit_msg>Deprecated ThreadPageConverter.<commit_after>﻿
using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AwfulNET.Core.Common
{
    [Obsolete("This class is deprecated. Thread page metadata is no longer altered in app.", true)]
    internal class ThreadPageConverter : HtmlConverter<ThreadPageMetadata>
    {
        public static readonly ThreadPageConverter Instance;
        public static bool ShowAvatars { get; set; }
        public static string MarkReadLabel { get; set; }
        public static string QuoteLabel { get; set; }
        public static string MarkUnreadLabel { get; set; }
        public static string EditLabel { get; set; }
        public static bool IsDarkTheme { get; set; }
        public static string DarkImagePrefix { get; set; }
        public static string LightImagePrefix { get; set; }

        static ThreadPageConverter()
        {
            Instance = new ThreadPageConverter();

            // set defaults
            ShowAvatars = true;
            MarkReadLabel = "seen";
            MarkUnreadLabel = "unseen";
            QuoteLabel = "quote";
            EditLabel = "edit";
            DarkImagePrefix = "img/dark";
            LightImagePrefix = "img/light";
        }

        private ThreadPageConverter() : base() { }

        public override string ConvertToHtml(ThreadPageMetadata page)
        {
{'fraction_non_alphanumeric': 0.07851851851851852, 'fraction_numerical': 0.0, 'mean_word_length': 2.423320659062104, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4928306', 'n_tokens_mistral': 675, 'n_tokens_neox': 666, 'n_words': 213}