public PrintBuilder(RuntimeSettings settings, ILog log, ShortCodeLoader loader, CsharpScriptHandler scriptHandler) : base(settings, log, loader, scriptHandler) { AddStep(new GeneratorSteps.CreateOutputDirectory()); AddStep(new GeneratorSteps.CopyAssets(settings.Configuration.TargetPrint)); AddStep(new GeneratorSteps.ImageProcessor()); AddStep(new GeneratorSteps.CreatePrintableHtml()); }
public WordpressBuilder(RuntimeSettings settings, ILog log, ShortCodeLoader loader, CsharpScriptHandler scriptHandler) : base(settings, log, loader, scriptHandler) { var session = new GeneratorSteps.Wordpress.Session(); AddStep(new GeneratorSteps.CreateOutputDirectory()); AddStep(new GeneratorSteps.ImageProcessor()); AddStep(new GeneratorSteps.Wordpress.CreateWpChannel(session)); AddStep(new GeneratorSteps.Wordpress.CreateWpPages(session)); AddStep(new GeneratorSteps.Wordpress.WriteExportXmlFile(session)); }
public EpubBuilder(RuntimeSettings settings, ILog log, ShortCodeLoader loader, CsharpScriptHandler scriptHandler) : base(settings, log, loader, scriptHandler) { var session = new GeneratorSteps.Epub.EpubSession(); AddStep(new GeneratorSteps.CreateOutputDirectory()); AddStep(new GeneratorSteps.CopyAssets(settings.Configuration.TargetEpub)); AddStep(new GeneratorSteps.ImageProcessor()); AddStep(new GeneratorSteps.Epub.CreateEpubStructure()); AddStep(new GeneratorSteps.Epub.CreateEpubPages(session)); AddStep(new GeneratorSteps.Epub.CreateEpubToc()); AddStep(new GeneratorSteps.Epub.CreatePackageOpf(session)); AddStep(new GeneratorSteps.Epub.CreateEpubPack()); }
public WebsiteBuilder(RuntimeSettings settings, ILog log, ShortCodeLoader loader, CsharpScriptHandler scriptHandler) : base(settings, log, loader, scriptHandler) { AddStep(new GeneratorSteps.CreateOutputDirectory()); AddStep(CreateAssets()); AddStep(new GeneratorSteps.CopyAssets(settings.Configuration.TargetWeb)); AddStep(new GeneratorSteps.ImageProcessor()); AddStep(new GeneratorSteps.CreateToCForWebsite()); AddStep(new GeneratorSteps.CreatePagesJS()); AddStep(new GeneratorSteps.CreateMetadata()); AddStep(new GeneratorSteps.CreateIndexHtml()); AddStep(new GeneratorSteps.CreatePages()); AddStep(new GeneratorSteps.CreateSubpageIndexes()); AddStep(new GeneratorSteps.GenerateSearchPage()); AddStep(new GeneratorSteps.CreateSitemap()); }
public void DoTest() { if (_configuration == null) { throw new InvalidOperationException("Configuration is null"); } if (_toc == null) { throw new InvalidOperationException("Table of contents is null"); } Log.Info("Building test configuration..."); _configuration.HostName = "http://localhost:8080/"; var settings = _projectLoader.CreateRuntimeSettings(_configuration, _toc, _configuration.TargetWeb); using (var loader = new ShortCodeLoader(Log, settings, Program.AppSetting)) { WebsiteBuilder builder = new WebsiteBuilder(settings, Log, loader, _scriptHandler); var runTime = builder.Run(); using (var server = HttpServerFactory.CreateServerForTest(ServerLog, Path.Combine(WorkDirectory, _configuration.TargetWeb.OutPutDirectory))) { server.Start(); Log.Info("-------------------------------------------------"); Log.Info("Runtime: {0:0.000} ms", runTime.TotalMilliseconds); Log.Info("Test server running on: http://localhost:8080/"); Log.Info("Serving from: {0}", _configuration.TargetWeb.OutPutDirectory); if (Program.AppSetting.AutoStartWebserver) { StartUrl(_configuration.HostName); } Console.WriteLine(ExitString); Console.ReadLine(); server.Stop(); } } }
public void DoWordpress() { if (_configuration == null) { throw new InvalidOperationException("Configuration is null"); } if (_toc == null) { throw new InvalidOperationException("Table of contents is null"); } var settings = _projectLoader.CreateRuntimeSettings(_configuration, _toc, _configuration.TargetWordpress); Log.Info("Building Wordpress configuration..."); using (var loader = new ShortCodeLoader(Log, settings, Program.AppSetting)) { WordpressBuilder builder = new WordpressBuilder(settings, Log, loader, _scriptHandler); var runTime = builder.Run(); Log.Info("Runtime: {0:0.000} ms", runTime.TotalMilliseconds); } }