<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
using SteamKit2;
using SteamKit2.Internal;

namespace SteamIrcBot
{
    class SteamAppInfo : ClientMsgHandler
    {
        class AppCacheEntry
        {
            public uint AppID { get; set; }
            public bool IsGame { get; set; }
        }

        uint lastChangelist = 0;

        Dictionary<string, AppCacheEntry> appNameCache = new Dictionary<string, AppCacheEntry>();


        public SteamAppInfo()
        {
            try
            {
                Directory.CreateDirectory( Path.Combine( "cache", "appinfo" ) );
                Directory.CreateDirectory( Path.Combine( "cache", "packageinfo" ) );
            }
            catch ( IOException ex )
            {
                Log.WriteError( "Unable to create appinfo/packageinfo cache directory: {0}", ex.Message );
            }
        }


        public bool GetAppInfo( uint appId, out KeyValue appInfo )
        {<commit_msg>Fix a bad usage of Log.WriteError<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
using SteamKit2;
using SteamKit2.Internal;

namespace SteamIrcBot
{
    class SteamAppInfo : ClientMsgHandler
    {
        class AppCacheEntry
        {
            public uint AppID { get; set; }
            public bool IsGame { get; set; }
        }

        uint lastChangelist = 0;

        Dictionary<string, AppCacheEntry> appNameCache = new Dictionary<string, AppCacheEntry>();


        public SteamAppInfo()
        {
            try
            {
                Directory.CreateDirectory( Path.Combine( "cache", "appinfo" ) );
                Directory.CreateDirectory( Path.Combine( "cache", "packageinfo" ) );
            }
            catch ( IOException ex )
            {
                Log.WriteError( "SteamAppInfo", "Unable to create appinfo/packageinfo cache directory: {0}", ex.Message );
            }
        }


        public bool GetAppInfo( uint appId, out KeyValue appInfo )
        {
{'fraction_non_alphanumeric': 0.09023255813953489, 'fraction_numerical': 0.0037209302325581397, 'mean_word_length': 2.021067415730337, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2358783', 'n_tokens_mistral': 589, 'n_tokens_neox': 566, 'n_words': 152}