Exemplo n.º 1
0
        private void ConvertAllInternal()
        {
            var workspaceInfo  = new WorkspaceInfo(Paths);
            var workspaceFiles = workspaceInfo.GetContents();

            var contentsToParse = workspaceFiles.FilesToParse;

            FillCategoryPages(contentsToParse);

            Trace.TraceInformation("Parsing contents for {0} files", contentsToParse.Count);

            ParseContents(contentsToParse);

            Trace.TraceInformation("Generating template data");
            Trace.TraceInformation("Found {0} pages", contentsToParse.Count);

            foreach (var content in contentsToParse)
            {
                dynamic metadata = content.Page != null?ParseTemplateData(contentsToParse, content.Page) : ParseTemplateData(contentsToParse, content.Post);

                Export(content, metadata);
                Trace.TraceInformation("Exported {0}", content.FileName);
            }

            foreach (var file in workspaceFiles.FilesNotToParse)
            {
                Copy(file);
            }
        }