static void ProcessTest(string[] args)
        {
            switch (args[0])
            {
            case "1":
                DCInsideArchive.Instance.Load(@"툴갤 아카이브-index.json");
                break;

            case "2":
                //DCInsideArchive.Instance.Query.QueryContentHardContainsBody("로리").Save();
                DCInsideArchive.Instance.Query.QueryCommentByIp("182.224").Save();
                break;

            case "3":
            {
                var cc    = DCInsideArchive.Instance.Query.QueryCommentByIp("182.224");
                var query = DCInsideArchiveQueryHelper.to_linear(DCInsideArchiveQueryHelper.make_tree("CommentAuthorIp[182.224]"));
                var mm    = cc.Results.Select(x => DCInsideArchiveQueryHelper.match_comment(query, x)).ToList();
            }
            break;

            case "4":
            {
                var query = DCInsideArchiveQueryHelper.to_linear(DCInsideArchiveQueryHelper.make_tree("CommentAuthorIp[182.224, 14.37]"));
                DCInsideArchive.Instance.Query.Query(query).Save();
            }
            break;

            case "5":
            {
                var    stackSize = 100000000;
                Thread thread    = new Thread(new ThreadStart(DCInsideArchiveIndex.Instance.Build), stackSize);
                thread.Start();
                thread.Join();
                //DCInsideArchiveIndex.Instance.Build();
            }
            break;

            case "6":
                DCInsideArchiveIndex.Instance.Load("툴갤 아카이브");
                break;

            case "7":
            {
                DCInsideArchiveIndexDatabase.Instance.Build();
            }
            break;

            case "8":
            {
                var mm = new DCInsideGalleryModel();
                mm.articles         = DCInsideArchive.Instance.Model.Select(x => x.info).ToList();
                mm.gallery_id       = "tullius";
                mm.gallery_name     = "툴리우스";
                mm.is_minor_gallery = true;

                var bbb = MessagePackSerializer.Serialize(mm);
                using (FileStream fsStream = new FileStream("툴리우스 갤러리 인덱싱 데이터.txt", FileMode.Create))
                    using (BinaryWriter sw = new BinaryWriter(fsStream))
                    {
                        sw.Write(bbb);
                    }
            }
            break;
            }
        }
        static void ProcessCollectArticles(string[] args)
        {
            var rstarts = Convert.ToInt32(args[1]);
            var starts  = Convert.ToInt32(args[1]);
            var ends    = Convert.ToInt32(args[2]);

            bool is_minorg = !DCGalleryList.Instance.GalleryIds.Contains(args[0]);

            var result   = new DCInsideGalleryModel();
            var articles = new List <DCInsidePageArticle>();

            using (var progressBar = new Console.ConsoleProgressBar())
            {
                for (; starts <= ends; starts++)
                {
                    var url = "";
                    if (is_minorg)
                    {
                        url = $"https://gall.dcinside.com/mgallery/board/lists/?id={args[0]}&page={starts}";
                    }
                    else
                    {
                        url = $"https://gall.dcinside.com/board/lists/?id={args[0]}&page={starts}";
                    }

                    Console.Instance.WriteLine($"Download URL: {url}");

                    var             html = NetTools.DownloadString(url);
                    DCInsideGallery gall = null;

                    if (is_minorg)
                    {
                        gall = DCInsideUtils.ParseMinorGallery(html);
                    }
                    else
                    {
                        gall = DCInsideUtils.ParseGallery(html);
                    }

                    if (is_minorg && (gall.articles == null || gall.articles.Length == 0))
                    {
                        gall = DCInsideUtils.ParseGallery(html);
                    }

                    articles.AddRange(gall.articles);

                    progressBar.SetProgress((((ends - rstarts + 1) - (ends - starts)) / (float)(ends - rstarts + 1)) * 100);
                }

                var overlap       = new HashSet <string>();
                var articles_trim = new List <DCInsidePageArticle>();
                foreach (var article in articles)
                {
                    if (!overlap.Contains(article.no))
                    {
                        articles_trim.Add(article);
                        overlap.Add(article.no);
                    }
                }

                articles_trim.Sort((x, y) => y.no.ToInt().CompareTo(x.no.ToInt()));

                result.is_minor_gallery = is_minorg;
                result.gallery_id       = args[0];
                result.articles         = articles_trim;

                File.WriteAllText($"list-{args[0]}-{DateTime.Now.Ticks}.txt", JsonConvert.SerializeObject(result));

                var bbb = MessagePackSerializer.Serialize(result);
                using (FileStream fsStream = new FileStream($"list-{args[0]}-{DateTime.Now.Ticks}-index.txt", FileMode.Create))
                    using (BinaryWriter sw = new BinaryWriter(fsStream))
                    {
                        sw.Write(bbb);
                    }
            }
        }