public RenderRSS ( string output, IList entries, int start, int end ) : void | ||
output | string | |
entries | IList | |
start | int | |
end | int | |
Résultat | void |
static void Main(string[] args) { var basicConfig = new Config (); if (!basicConfig.Parse (args)) return; config = (Config) new XmlSerializer (typeof (Config)).Deserialize (new XmlTextReader (basicConfig.ConfigFile)); if (args.Length > 1) config.Prefix = args [1]; if (config.BlogImageBasedir == null || config.BlogImageBasedir == "") config.BlogImageBasedir = config.BlogWebDirectory; if (config.Prefix == null || config.Prefix == "") config.Prefix = Environment.CurrentDirectory; if (config.BlogTemplate == null || config.BlogTemplate == "") config.BlogTemplate = "template"; if (config.EntryTemplate == null || config.EntryTemplate == "") config.EntryTemplate = "entry"; if (!config.Parse (args)) return; string template = File.OpenText (config.BlogTemplate).ReadToEnd (); Blog b = new Blog (config, template); // // Renders the main page (index.html) and the various pageNN.html // for (int start = 0; start < b.Entries; start += Config.EntriesPerPage){ string output = GetOutputFileAtOffset (start); b.RenderHtml (Path.Combine (config.Prefix, output), start, start + Config.EntriesPerPage, "", true); } // // Renders the year/month dinguses // // // Legacy render: all.html // b.RenderHtml (Path.Combine (config.Prefix, "all.html"), 0, b.Entries, "", false); // // Renders each individual blog entry into the archive // b.RenderArchive (); // // The RSS feed // b.RenderRSS (Path.Combine (config.Prefix, config.RSSFileName), 0, 30); b.RenderArchiveRss (RssVersion.RSS20, config.RSSFileName + ".rss2", 30); if (File.Exists ("log-style.css")) { File.Copy ("log-style.css", "texts/log-style.css", true); File.Copy ("log-style.css", Path.Combine (config.Prefix, "log-style.css"), true); } }
static void Main(string[] args) { var basicConfig = new Config(); if (!basicConfig.Parse(args)) { return; } config = (Config) new XmlSerializer(typeof(Config)).Deserialize(new XmlTextReader(basicConfig.ConfigFile)); if (args.Length > 1) { config.Prefix = args [1]; } if (config.BlogImageBasedir == null || config.BlogImageBasedir == "") { config.BlogImageBasedir = config.BlogWebDirectory; } if (config.Prefix == null || config.Prefix == "") { config.Prefix = Environment.CurrentDirectory; } if (config.BlogTemplate == null || config.BlogTemplate == "") { config.BlogTemplate = "template"; } if (config.EntryTemplate == null || config.EntryTemplate == "") { config.EntryTemplate = "entry"; } if (!config.Parse(args)) { return; } string template = File.OpenText(config.BlogTemplate).ReadToEnd(); Blog b = new Blog(config, template); // // Renders the main page (index.html) and the various pageNN.html // for (int start = 0; start < b.Entries; start += Config.EntriesPerPage) { string output = GetOutputFileAtOffset(start); b.RenderHtml(Path.Combine(config.Prefix, output), start, start + Config.EntriesPerPage, "", true); } // // Renders the year/month dinguses // // // Legacy render: all.html // b.RenderHtml(Path.Combine(config.Prefix, "all.html"), 0, b.Entries, "", false); // // Renders each individual blog entry into the archive // b.RenderArchive(); // // The RSS feed // b.RenderRSS(Path.Combine(config.Prefix, config.RSSFileName), 0, 30); b.RenderArchiveRss(RssVersion.RSS20, config.RSSFileName + ".rss2", 30); if (File.Exists("log-style.css")) { File.Copy("log-style.css", "texts/log-style.css", true); File.Copy("log-style.css", Path.Combine(config.Prefix, "log-style.css"), true); } }