Ejemplo n.º 1
0
        private static void Run(ToolOptions options)
        {
            Console.WriteLine($"Trying to read files/folders from {options.WikiDir.FullName}...");
            var finder = new ArticleFinder(options);

            Console.WriteLine($"Found {finder.Articles.Count} articles.");
            Console.WriteLine($"Creating GitHub-flavored Markdown from all articles...");

            string GFMText = new TextCreator(options).CreateGFM(finder.Articles.Where(a => a.ParentArticle == null));

            File.WriteAllText(options.OutputFile.FullName, GFMText);
            Console.WriteLine($"Wrote resulting article structure to {options.OutputFile.FullName}.");
        }
Ejemplo n.º 2
0
 public TextCreator(ToolOptions options)
 {
     _options = options;
     _locale  = options.Culture?.TwoLetterISOLanguageName ?? string.Empty;
 }
Ejemplo n.º 3
0
 public ArticleFinder(ToolOptions options)
 {
     _options = options;
     GetArticlesFromDir(options.WikiDir);
 }