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}."); }
public TextCreator(ToolOptions options) { _options = options; _locale = options.Culture?.TwoLetterISOLanguageName ?? string.Empty; }
public ArticleFinder(ToolOptions options) { _options = options; GetArticlesFromDir(options.WikiDir); }