summaryrefslogtreecommitdiff
path: root/example/plain_to_html.cpp
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-09-27 18:09:07 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-09-27 18:09:07 +0300
commit2eae362fd3f50325067fa3d7e13db6882df80e76 (patch)
treea6eff5f8f12b990e3d256d4b02fdb86d70d81eac /example/plain_to_html.cpp
downloadtexo-2eae362fd3f50325067fa3d7e13db6882df80e76.tar
texo-2eae362fd3f50325067fa3d7e13db6882df80e76.tar.xz
texo-2eae362fd3f50325067fa3d7e13db6882df80e76.zip
Texo initial.
Diffstat (limited to 'example/plain_to_html.cpp')
-rw-r--r--example/plain_to_html.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/example/plain_to_html.cpp b/example/plain_to_html.cpp
new file mode 100644
index 0000000..86171a6
--- /dev/null
+++ b/example/plain_to_html.cpp
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <html.hpp>
+#include <plain.hpp>
+#include <file.hpp>
+
+
+int main()
+{
+ TexoFileExporter exporter(stdout);
+ TexoHTMLProducer producer(exporter);
+ TexoPlainImporter importer(producer);
+ importer.PutStr(
+ "I am a little cute line. \n"
+ "I am another and that's fine. \n"
+ "But I am as long as a pine,\n"
+ "so lets drink a glass of wine.\n\n"
+ "Second paragraph was started here. \n"
+ "Take your bananas and go home, seer.\n"
+ );
+ return 0;
+}