Exemple #1
0
		public static int Main(string[] args)
		{
			Document doc = new Document();
			doc.ReadFromFile(args[0], false, false);

			FileInfo info = new FileInfo(args[1]);
			if (info.Exists)
				info.Delete();

			info.Directory.Create();

			using (FileStream fs = info.OpenWrite())
				using (StreamWriter sw = new StreamWriter(fs, Encoding.UTF8))
					sw.Write(ToMultiMarkdown(doc));
			
			return 0;
		}
Exemple #2
0
		public static void WriteMultiMarkdown(Document doc, TextWriter writer,
									 int paragraphCount)
		{
			MultiMarkdownWriter.RenderDocument(doc, writer, paragraphCount);
		}
Exemple #3
0
		public static void WriteMultiMarkdown(Document doc, TextWriter writer) {
			WriteMultiMarkdown(doc, writer, 0);
		}
Exemple #4
0
		public static string ToMultiMarkdown(Document doc)
		{
			using (StringWriter sw = new StringWriter()) {
				WriteMultiMarkdown(doc, sw);
				return sw.GetStringBuilder().ToString();
			}
		}
Exemple #5
0
		public static void RenderDocument(Document doc, TextWriter w,
										  int paragraphCount)
		{
			Write(doc.Content, w, paragraphCount);
		}
Exemple #6
0
		public static void RenderDocument(Document doc, TextWriter w) {
			RenderDocument(doc, w, 0);
		}