public static void DetectCategoryFromTitleAndUpdateFullCatalog()
        {
            var countDetect  = 0;
            var correctCount = 0;
            var warncount    = 0;
            var fc           = FullCatalog2.LoadFullCatalogFromFtp();

            _logger.Info("FullCatalog items: " + fc.records.Count);
            _logger.Info("FullCatalog items without category: " + fc.records.FindAll(x => String.IsNullOrWhiteSpace(x.category)).Count);
            foreach (var record in fc.records)
            {
                if (String.IsNullOrWhiteSpace(record.category))
                {
                    record.title = record.title.Replace("Десткие", "").Trim();
                    var category = Validator.DetectCategoryFromTitle(record);
                    if (category != null)
                    {
                        _logger.Info(" \n " + record.sku + " " + record.title);
                        _logger.Info("\ndetect category: " + category + " sku: " + record.sku);
                        record.category = category;
                        countDetect++;
                    }
                }
                else
                {
                    //проверяем совпадает ли категория с той что уже есть в фулкаталоге
                    var category = Validator.DetectCategoryFromTitle(record);
                    if (category != null)
                    {
                        if (category != record.category)
                        {
                            _logger.Info(" \n " + record.sku + " " + record.title);
                            _logger.Info("\nchange category. old: " + record.category + "  new: " + category + " sku: " + record.sku);
                            record.category = category;
                            //record.category = category;
                            correctCount++;
                        }
                    }
                    else
                    {
                        if (record.category != "men")
                        {
                            _logger.Warn("\ntitle: " + record.title + "\n"
                                         + "category:" + record.category + "\n"
                                         + "sku:" + record.sku + "\n"
                                         + "link:" + record.link);
                            warncount++;
                        }
                    }
                }
            }
            _logger.Info("Определено категорий: " + countDetect);
            _logger.Info("Исправлено категорий: " + correctCount);
            _logger.Info("Подозрительных: " + warncount);
            _logger.Info("FullCatalog items without category: " + fc.records.FindAll(x => String.IsNullOrWhiteSpace(x.category)).Count);

            FullCatalog2.SaveFullCatalogToFtp(fc);
        }
        public static void AddNewSneakersFromAllStores()
        {
            Model.FullCatalog.FullCatalogRoot fullCatalogJson = FullCatalog2.LoadFullCatalogFromFtp();
            Program.Logger.Info("Items without category: " + CountItemsWithoutCategory(fullCatalogJson));
            Program.Logger.Info("Items without Image: " + CountItemsWithoutImages(fullCatalogJson));

            var shopCatalog = Model.ShopCatalogModel.ShopCatalogRoot.ReadFromFtp();

            Program.Logger.Info("Update FullCatalog...");
            Update(fullCatalogJson, shopCatalog);
            Program.Logger.Info("Items without category: " + CountItemsWithoutCategory(fullCatalogJson));
            Program.Logger.Info("Items without Image: " + CountItemsWithoutImages(fullCatalogJson));
            SaveFullCatalogToFtp(fullCatalogJson);
        }
        public static void PostNewTodayItems(FullCatalogRoot fullCatalog = null)
        {
            if (fullCatalog == null)
            {
                fullCatalog = FullCatalog2.LoadFullCatalogFromFtp();
            }
            var allstock = AllStockExporter2.LoadLocalFile();
            var items    = fullCatalog.records.FindAll(x => DateTime.Now - x.add_time < new TimeSpan(24, 0, 0));
            var chatId   = "-1001116441282"; //"@sneaker_icon_new_today"

            var message = "New items today: " + items.Count;

            _logger.Info(message);
            Helper.TelegramPost(message, chatId);
            System.Threading.Thread.Sleep(15000);

            var count = items.Count;

            for (int i = 0; i < count; i++)
            {
                var item = items[i];
                var ret  = "\n";
                var m    = "New model in our store:\n";
                m += item.title + ret;
                m += "SKU: " + item.sku + ret;
                m += "Category: " + item.category + "\n";
                m += "Add time: " + item.add_time + ret;
                //m += "Link: " + item.link + "\n\n";
                foreach (var image in item.images)
                {
                    m += image + "\n";
                }


                _logger.Info("NewToday post sku:" + item.sku);
                Helper.TelegramPost(m, chatId);
                System.Threading.Thread.Sleep(15000);
            }
        }