You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by fr...@apache.org on 2015/04/29 14:43:42 UTC

[01/17] incubator-corinthia git commit: Initial commit for Python binding

Repository: incubator-corinthia
Updated Branches:
  refs/heads/master ccd08368b -> aa2938d31


Initial commit for Python binding


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/0cb481d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/0cb481d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/0cb481d9

Branch: refs/heads/master
Commit: 0cb481d9256acb0dc8111f5b70c982f25526765d
Parents: e382093
Author: franzdecopenhague <fr...@outlook.com>
Authored: Thu Mar 12 05:21:37 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Thu Mar 12 05:21:37 2015 +0000

----------------------------------------------------------------------
 CMakeLists.txt                        |   2 +-
 consumers/dfwebserver/input.docx      | Bin 0 -> 12833 bytes
 consumers/dfwebserver/makefile        |  33 +++++++++++++++++++
 consumers/dfwebserver/other.html      |   1 +
 consumers/dfwebserver/setup.py        |  51 +++++++++++++++++++++++++++++
 consumers/dfwebserver/src/dfconvert.c |  45 +++++++++++++++++++++++++
 consumers/dfwebserver/src/dfutil.c    |  47 ++++++++++++++++++++++++++
 consumers/dfwebserver/test.py         |   5 +++
 8 files changed, 183 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0cb481d9/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7eb3585..72082ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,7 +36,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-    set(CMAKE_C_FLAGS "-std=c99 -D_GNU_SOURCE -g")
+    set(CMAKE_C_FLAGS "-std=c99 -D_GNU_SOURCE -g -fPIC")
     set(LIBS ${LIBS} m pthread xml2 z SDL2 SDL2_image)
 endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0cb481d9/consumers/dfwebserver/input.docx
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/input.docx b/consumers/dfwebserver/input.docx
new file mode 100644
index 0000000..9de8bc3
Binary files /dev/null and b/consumers/dfwebserver/input.docx differ

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0cb481d9/consumers/dfwebserver/makefile
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/makefile b/consumers/dfwebserver/makefile
new file mode 100644
index 0000000..46cb1f2
--- /dev/null
+++ b/consumers/dfwebserver/makefile
@@ -0,0 +1,33 @@
+
+#build
+#  make
+
+#install
+#  sudo python setup.py install
+
+#unistall 
+#  sudo python setup.py install --record files.txt
+#  cat files.txt | sudo xargs rm -rf      
+
+#develoment build
+#  make dev
+#  python test.py
+
+LDFLAGS ?= ""
+CFLAGS ?= ""
+
+.PHONY: default build_ext clean
+
+default: build_ext
+
+dev:
+	CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) python setup.py build_ext --inplace --debug
+
+build_ext:
+	CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) python setup.py build_ext --debug
+
+clean:
+	- rm -rf build
+	- rm -rf consumers
+	- rm -f output.html
+	- find ./ -name '*.so' -delete

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0cb481d9/consumers/dfwebserver/other.html
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/other.html b/consumers/dfwebserver/other.html
new file mode 100644
index 0000000..14778ef
--- /dev/null
+++ b/consumers/dfwebserver/other.html
@@ -0,0 +1 @@
+<begin>text</begin>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0cb481d9/consumers/dfwebserver/setup.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/setup.py b/consumers/dfwebserver/setup.py
new file mode 100644
index 0000000..d3cdf47
--- /dev/null
+++ b/consumers/dfwebserver/setup.py
@@ -0,0 +1,51 @@
+from distutils.core import setup, Extension
+
+# define the extension module
+dfutil_module = Extension('dfutil', 
+    sources=['src/dfutil.c', '../../consumers/dfutil/src/Commands.c'],
+    libraries = ['DocFormats', 'xml2'],
+    extra_compile_args = ['-std=c99'],
+    library_dirs = ['../../build/lib'],
+    include_dirs = [
+        '../../DocFormats/api/headers', 
+        '../../DocFormats/core/src/common',
+        '../../DocFormats/core/src/css', 
+        '../../DocFormats/core/src/html', 
+        '../../DocFormats/core/src/lib', 
+        '../../DocFormats/core/src/names', 
+        '../../DocFormats/core/src/xml', 
+        '../../DocFormats/core/tests/common', 
+        '../../DocFormats/core/tests/html',
+        '../../DocFormats/filters/latex/src',
+        '../../DocFormats/filters/ooxml/src/common', 
+        '../../DocFormats/filters/ooxml/src/word', 
+        '../../DocFormats/filters/ooxml/tests/word',
+        '../../DocFormats/headers',
+    ]
+)
+
+dfconvert_module = Extension('dfconvert', 
+    sources=['src/dfconvert.c'],
+    libraries = ['DocFormats', 'xml2', 'SDL2', 'SDL_image'],
+    extra_compile_args = ['-std=c99'],
+    library_dirs = ['../../build/lib'],
+    include_dirs = [
+        '../../DocFormats/api/headers', 
+        '../../DocFormats/core/src/common',
+        '../../DocFormats/core/src/css', 
+        '../../DocFormats/core/src/html', 
+        '../../DocFormats/core/src/lib', 
+        '../../DocFormats/core/src/names', 
+        '../../DocFormats/core/src/xml', 
+        '../../DocFormats/core/tests/common', 
+        '../../DocFormats/core/tests/html',
+        '../../DocFormats/filters/latex/src',
+        '../../DocFormats/filters/ooxml/src/common', 
+        '../../DocFormats/filters/ooxml/src/word', 
+        '../../DocFormats/filters/ooxml/tests/word',
+        '../../DocFormats/headers',
+    ]
+)
+
+# run the setup
+setup(ext_modules=[dfutil_module, dfconvert_module])  

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0cb481d9/consumers/dfwebserver/src/dfconvert.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/src/dfconvert.c b/consumers/dfwebserver/src/dfconvert.c
new file mode 100644
index 0000000..b4d88f2
--- /dev/null
+++ b/consumers/dfwebserver/src/dfconvert.c
@@ -0,0 +1,45 @@
+#include <Python.h>
+
+typedef struct DFError DFError;
+void DFErrorRelease(DFError *error);
+const char *DFErrorMessage(DFError **error);
+
+int DFGetFile(const char *concreteFilename,
+              const char *abstractFilename,
+              DFError **error);
+
+static PyObject* get_func(PyObject* self, PyObject* args)
+{
+    DFError *error = NULL;
+    
+    char * concrete = NULL;
+    char * abstract = NULL;
+    
+    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
+        return NULL;
+    }    
+    
+    if (DFGetFile(concrete, abstract, &error)) {
+        Py_RETURN_TRUE;
+    }
+
+    fprintf(stderr,"%s\n",DFErrorMessage(&error));
+    DFErrorRelease(error);
+    Py_RETURN_FALSE;
+}
+
+/*  define functions in module */
+static PyMethodDef dfconvertMethods[] =
+{
+     {"get", get_func, METH_VARARGS, "Create a new HTML file from input document"},
+     {NULL, NULL, 0, NULL}
+};
+
+
+/* module initialization */
+PyMODINIT_FUNC
+
+initdfconvert(void)
+{
+     (void) Py_InitModule("dfconvert", dfconvertMethods);
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0cb481d9/consumers/dfwebserver/src/dfutil.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/src/dfutil.c b/consumers/dfwebserver/src/dfutil.c
new file mode 100644
index 0000000..8c50aa9
--- /dev/null
+++ b/consumers/dfwebserver/src/dfutil.c
@@ -0,0 +1,47 @@
+#include <Python.h>
+
+typedef struct DFError DFError;
+void DFErrorRelease(DFError *error);
+const char *DFErrorMessage(DFError **error);
+
+int normalizeFile(const char *filename, DFError **error);
+
+static PyObject* normalize_func(PyObject* self, PyObject* args)
+{
+    DFError *dferr = NULL;
+    
+    char * filename = NULL;
+    
+    if (!PyArg_ParseTuple(args, "s", &filename)) {
+        return NULL;
+        /* if the above function returns -1, an appropriate Python exception will
+        * have been set, and the function simply returns NULL
+        */
+    }
+    
+    if (filename!=NULL) {
+        if (1 == normalizeFile(filename, &dferr)) {
+            Py_RETURN_TRUE;
+        }
+        fprintf(stderr,"%s\n",DFErrorMessage(&dferr));
+        DFErrorRelease(dferr);
+    }
+    
+    Py_RETURN_FALSE;
+}
+
+
+/*  define functions in module */
+static PyMethodDef dfutilMethods[] =
+{
+     {"normalize", normalize_func, METH_VARARGS, "evaluate the sine"},
+     {NULL, NULL, 0, NULL}
+};
+
+/* module initialization */
+PyMODINIT_FUNC
+
+initdfutil(void)
+{
+     (void) Py_InitModule("dfutil", dfutilMethods);
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0cb481d9/consumers/dfwebserver/test.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/test.py b/consumers/dfwebserver/test.py
new file mode 100644
index 0000000..936042b
--- /dev/null
+++ b/consumers/dfwebserver/test.py
@@ -0,0 +1,5 @@
+import dfutil
+import dfconvert
+
+print dfutil.normalize("other.html")
+print dfconvert.get("input.docx", "output.html");
\ No newline at end of file


[02/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/88051ae8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/88051ae8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/88051ae8

Branch: refs/heads/master
Commit: 88051ae8f67040b8951bb77fd83e905d15fc627d
Parents: 0cb481d ebe52ba
Author: franzdecopenhague <fr...@outlook.com>
Authored: Fri Mar 13 02:07:57 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Fri Mar 13 02:07:57 2015 +0000

----------------------------------------------------------------------
 CMakeLists.txt                                 |    9 +-
 DocFormats/CMakeLists.txt                      |    1 -
 DocFormats/core/src/lib/DFString.c             |    2 +-
 DocFormats/core/src/xml/DFXML.c                |    2 +-
 DocFormats/filters/ooxml/src/word/WordStyles.c |    2 +-
 DocFormats/headers/DFPlatform.h                |    4 +-
 DocFormats/platform/src/Linux.c                |    2 +-
 DocFormats/platform/src/Unix.c                 |    2 +-
 consumers/corinthia/src/CMakeLists.txt         |   68 ++
 consumers/corinthia/src/desktop.cpp            |   53 +
 consumers/corinthia/src/desktop.ui             |   72 ++
 consumers/corinthia/src/editWindows.h          |   36 +
 consumers/corinthia/src/main.cpp               |   30 +
 consumers/dfconvert/src/CMakeLists.txt         |    1 -
 consumers/dftest/src/CMakeLists.txt            |    1 -
 consumers/dfutil/src/CMakeLists.txt            |    1 -
 consumers/web/client/builtin.css               |   36 +
 consumers/web/client/images/bold-on.png        |  Bin 0 -> 2288 bytes
 consumers/web/client/images/bold.png           |  Bin 0 -> 4847 bytes
 consumers/web/client/images/indent.png         |  Bin 0 -> 4257 bytes
 consumers/web/client/images/italic-on.png      |  Bin 0 -> 1909 bytes
 consumers/web/client/images/italic.png         |  Bin 0 -> 4485 bytes
 consumers/web/client/images/list-none-on.png   |  Bin 0 -> 1805 bytes
 consumers/web/client/images/list-none.png      |  Bin 0 -> 4364 bytes
 consumers/web/client/images/list-ol-on.png     |  Bin 0 -> 1977 bytes
 consumers/web/client/images/list-ol.png        |  Bin 0 -> 4509 bytes
 consumers/web/client/images/list-ul-on.png     |  Bin 0 -> 1807 bytes
 consumers/web/client/images/list-ul.png        |  Bin 0 -> 4385 bytes
 consumers/web/client/images/outdent.png        |  Bin 0 -> 4292 bytes
 consumers/web/client/images/underline-on.png   |  Bin 0 -> 2082 bytes
 consumers/web/client/images/underline.png      |  Bin 0 -> 4671 bytes
 consumers/web/client/index.html                |   88 ++
 consumers/web/client/interface.js              |  371 ++++++
 consumers/web/client/sample.html               | 1130 +++++++++++++++++++
 consumers/web/client/ui.js                     |   75 ++
 consumers/web/client/uxeditor.js               |  344 ++++++
 36 files changed, 2317 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/88051ae8/CMakeLists.txt
----------------------------------------------------------------------


[16/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/46ae266f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/46ae266f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/46ae266f

Branch: refs/heads/master
Commit: 46ae266f9045e9ade16a55dd0b9bcc47113b321e
Parents: 5033c0f ccd0836
Author: franzdecopenhague <fr...@outlook.com>
Authored: Mon Apr 27 13:02:33 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Mon Apr 27 13:02:33 2015 +0000

----------------------------------------------------------------------
 CorinthiaDirectoryTree.html                     |  4 +-
 DocFormats/api/src/Operations.c                 |  9 +--
 DocFormats/filters/odf/CMakeLists.txt           |  4 +-
 DocFormats/filters/odf/src/text/ODFText.c       | 59 +++++++++++++++++++-
 .../filters/odf/src/text/ODFTextConverter.c     | 53 ++++++++++++++++++
 .../filters/odf/src/text/ODFTextConverter.h     | 42 ++++++++++++++
 6 files changed, 163 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[05/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/81b51771
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/81b51771
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/81b51771

Branch: refs/heads/master
Commit: 81b5177165af19d5fbd393d9372d28be6da4ad0a
Parents: 748d707 9350a33
Author: franzdecopenhague <fr...@outlook.com>
Authored: Mon Mar 16 19:24:35 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Mon Mar 16 19:24:35 2015 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[10/17] incubator-corinthia git commit: Added missing doDummyGet in index.html. And folder refactory

Posted by fr...@apache.org.
Added missing doDummyGet in index.html. And folder refactory


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/0c004143
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/0c004143
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/0c004143

Branch: refs/heads/master
Commit: 0c004143832d468517760d5d388efe86ccaef99d
Parents: 9b84249
Author: franzdecopenhague <fr...@outlook.com>
Authored: Thu Mar 26 06:31:24 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Thu Mar 26 06:31:24 2015 +0000

----------------------------------------------------------------------
 consumers/dfwebserver/python/input.docx        | Bin 0 -> 12833 bytes
 consumers/dfwebserver/python/makefile          |  48 +++++++++
 consumers/dfwebserver/python/other.html        |   1 +
 consumers/dfwebserver/python/setup.py          |  64 ++++++++++++
 consumers/dfwebserver/python/src/dfconvert.c   | 108 ++++++++++++++++++++
 consumers/dfwebserver/python/src/dfutil.c      |  64 ++++++++++++
 consumers/dfwebserver/python/test.py           |  42 ++++++++
 consumers/dfwebserver/python/testSubprocess.py |  52 ++++++++++
 consumers/dfwebserver/web/client/index.html    |  10 +-
 9 files changed, 388 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/python/input.docx
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/python/input.docx b/consumers/dfwebserver/python/input.docx
new file mode 100644
index 0000000..9de8bc3
Binary files /dev/null and b/consumers/dfwebserver/python/input.docx differ

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/python/makefile
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/python/makefile b/consumers/dfwebserver/python/makefile
new file mode 100644
index 0000000..b3546c3
--- /dev/null
+++ b/consumers/dfwebserver/python/makefile
@@ -0,0 +1,48 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+#build
+#  make
+
+#install
+#  sudo python setup.py install
+
+#unistall 
+#  sudo python setup.py install --record files.txt
+#  cat files.txt | sudo xargs rm -rf      
+
+#develoment build
+#  make clean dev
+#  python test.py
+
+LDFLAGS ?= ""
+CFLAGS ?= ""
+
+.PHONY: default build_ext clean
+
+default: build_ext
+
+dev:
+	CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) python setup.py build_ext --inplace --debug
+
+build_ext:
+	CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) python setup.py build_ext --debug
+
+clean:
+	- rm -rf build
+	- rm -rf consumers
+	- rm -f output*.html
+	- rm -f output*.docx
+	- rm -f dummy*.docx
+	- find ./ -name '*.so' -delete

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/python/other.html
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/python/other.html b/consumers/dfwebserver/python/other.html
new file mode 100644
index 0000000..14778ef
--- /dev/null
+++ b/consumers/dfwebserver/python/other.html
@@ -0,0 +1 @@
+<begin>text</begin>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/python/setup.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/python/setup.py b/consumers/dfwebserver/python/setup.py
new file mode 100644
index 0000000..8675b22
--- /dev/null
+++ b/consumers/dfwebserver/python/setup.py
@@ -0,0 +1,64 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from distutils.core import setup, Extension
+
+# define the extension module
+dfutil_module = Extension('dfutil', 
+    sources=['src/dfutil.c', '../../consumers/dfutil/src/Commands.c'],
+    libraries = ['DocFormats', 'xml2'],
+    extra_compile_args = ['-std=c99'],
+    library_dirs = ['../../build/lib'],
+    include_dirs = [
+        '../../DocFormats/api/headers', 
+        '../../DocFormats/core/src/common',
+        '../../DocFormats/core/src/css', 
+        '../../DocFormats/core/src/html', 
+        '../../DocFormats/core/src/lib', 
+        '../../DocFormats/core/src/names', 
+        '../../DocFormats/core/src/xml', 
+        '../../DocFormats/core/tests/common', 
+        '../../DocFormats/core/tests/html',
+        '../../DocFormats/filters/latex/src',
+        '../../DocFormats/filters/ooxml/src/common', 
+        '../../DocFormats/filters/ooxml/src/word', 
+        '../../DocFormats/filters/ooxml/tests/word',
+        '../../DocFormats/headers',
+    ]
+)
+
+dfconvert_module = Extension('dfconvert', 
+    sources=['src/dfconvert.c'],
+    libraries = ['DocFormats', 'xml2', 'SDL2', 'SDL_image'],
+    extra_compile_args = ['-std=c99'],
+    library_dirs = ['../../build/lib'],
+    include_dirs = [
+        '../../DocFormats/api/headers', 
+        '../../DocFormats/core/src/common',
+        '../../DocFormats/core/src/css', 
+        '../../DocFormats/core/src/html', 
+        '../../DocFormats/core/src/lib', 
+        '../../DocFormats/core/src/names', 
+        '../../DocFormats/core/src/xml', 
+        '../../DocFormats/core/tests/common', 
+        '../../DocFormats/core/tests/html',
+        '../../DocFormats/filters/latex/src',
+        '../../DocFormats/filters/ooxml/src/common', 
+        '../../DocFormats/filters/ooxml/src/word', 
+        '../../DocFormats/filters/ooxml/tests/word',
+        '../../DocFormats/headers',
+    ]
+)
+
+# run the setup
+setup(ext_modules=[dfutil_module, dfconvert_module])  

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/python/src/dfconvert.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/python/src/dfconvert.c b/consumers/dfwebserver/python/src/dfconvert.c
new file mode 100644
index 0000000..b284222
--- /dev/null
+++ b/consumers/dfwebserver/python/src/dfconvert.c
@@ -0,0 +1,108 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include <Python.h>
+
+typedef struct DFError DFError;
+void DFErrorRelease(DFError *error);
+const char *DFErrorMessage(DFError **error);
+
+// Abstraction level 1
+
+int DFGetFile(const char *concrete, const char *abstract, DFError **error);
+int DFPutFile(const char *concrete, const char *abstract, DFError **error);
+int DFCreateFile(const char *concrete, const char *abstract, DFError **error);
+              
+
+static PyObject* get_func(PyObject* self, PyObject* args)
+{
+    DFError *error = NULL;
+    
+    char * concrete = NULL;
+    char * abstract = NULL;
+    
+    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
+        return NULL;
+    }    
+    
+    if (DFGetFile(concrete, abstract, &error)) {
+        Py_RETURN_TRUE;
+    }
+
+    fprintf(stderr,"%s\n",DFErrorMessage(&error));
+    DFErrorRelease(error);
+    Py_RETURN_FALSE;
+}
+
+static PyObject* put_func(PyObject* self, PyObject* args)
+{
+    DFError *error = NULL;
+    
+    char * concrete = NULL;
+    char * abstract = NULL;
+    
+    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
+        return NULL;
+    }    
+    
+    if (DFPutFile(concrete, abstract, &error)) {
+        Py_RETURN_TRUE;
+    }
+
+    fprintf(stderr,"%s\n",DFErrorMessage(&error));
+    DFErrorRelease(error);
+    Py_RETURN_FALSE;
+}
+
+static PyObject* create_func(PyObject* self, PyObject* args)
+{
+    DFError *error = NULL;
+    
+    char * concrete = NULL;
+    char * abstract = NULL;
+    
+    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
+        return NULL;
+    }    
+    
+    if (DFCreateFile(concrete, abstract, &error)) {
+        Py_RETURN_TRUE;
+    }
+
+    fprintf(stderr,"%s\n",DFErrorMessage(&error));
+    DFErrorRelease(error);
+    Py_RETURN_FALSE;
+}
+
+
+/*  define functions in module */
+static PyMethodDef dfconvertMethods[] =
+{
+     {"get", get_func, METH_VARARGS, "Create a new HTML file from input document"},
+     {"put", put_func, METH_VARARGS, "Update an existing Word document based on a modified HTML file."},
+     {"create", create_func, METH_VARARGS, "Create a new Word document from a HTML file. The Word document must not already exist."},
+     {NULL, NULL, 0, NULL}
+};
+
+
+/* module initialization */
+PyMODINIT_FUNC
+
+initdfconvert(void)
+{
+     (void) Py_InitModule("dfconvert", dfconvertMethods);
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/python/src/dfutil.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/python/src/dfutil.c b/consumers/dfwebserver/python/src/dfutil.c
new file mode 100644
index 0000000..9e7b689
--- /dev/null
+++ b/consumers/dfwebserver/python/src/dfutil.c
@@ -0,0 +1,64 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include <Python.h>
+
+typedef struct DFError DFError;
+void DFErrorRelease(DFError *error);
+const char *DFErrorMessage(DFError **error);
+
+int normalizeFile(const char *filename, DFError **error);
+
+static PyObject* normalize_func(PyObject* self, PyObject* args)
+{
+    DFError *dferr = NULL;
+    
+    char * filename = NULL;
+    
+    if (!PyArg_ParseTuple(args, "s", &filename)) {
+        return NULL;
+        /* if the above function returns -1, an appropriate Python exception will
+        * have been set, and the function simply returns NULL
+        */
+    }
+    
+    if (filename!=NULL) {
+        if (1 == normalizeFile(filename, &dferr)) {
+            Py_RETURN_TRUE;
+        }
+        fprintf(stderr,"%s\n",DFErrorMessage(&dferr));
+        DFErrorRelease(dferr);
+    }
+    
+    Py_RETURN_FALSE;
+}
+
+
+/*  define functions in module */
+static PyMethodDef dfutilMethods[] =
+{
+     {"normalize", normalize_func, METH_VARARGS, "evaluate the sine"},
+     {NULL, NULL, 0, NULL}
+};
+
+/* module initialization */
+PyMODINIT_FUNC
+
+initdfutil(void)
+{
+     (void) Py_InitModule("dfutil", dfutilMethods);
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/python/test.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/python/test.py b/consumers/dfwebserver/python/test.py
new file mode 100644
index 0000000..213ee2b
--- /dev/null
+++ b/consumers/dfwebserver/python/test.py
@@ -0,0 +1,42 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# To test:
+#
+# make clean dev
+# python test.py
+
+import unittest
+
+import dfutil
+import dfconvert
+import shutil
+
+
+class MyTest(unittest.TestCase):
+    def test(self):
+        
+        self.assertTrue(dfutil.normalize("other.html"))
+
+        self.assertTrue(dfconvert.get("input.docx", "output.html"))
+        
+        shutil.copyfile("input.docx", "dummy.docx");
+        
+        self.assertTrue(dfconvert.put("dummy.docx", "output.html"))
+        
+        self.assertTrue(dfconvert.create("output.docx", "output.html"))
+        
+        
+if __name__ == '__main__':
+    unittest.main()        
+

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/python/testSubprocess.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/python/testSubprocess.py b/consumers/dfwebserver/python/testSubprocess.py
new file mode 100644
index 0000000..e3bcfa6
--- /dev/null
+++ b/consumers/dfwebserver/python/testSubprocess.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import threading
+import time
+
+import dfconvert
+
+exitFlag = 0
+
+class dfconvertThread (threading.Thread):
+    def __init__(self, threadID, name, input, abstract):
+        threading.Thread.__init__(self)
+        self.threadID = threadID
+        self.name = name
+        self.input = input
+        self.abstract = abstract
+    def run(self):
+        print "Starting " + self.name
+        if exitFlag:
+            thread.exit()
+        status = dfconvert.get(self.input, self.abstract);
+        print "%s: %s status:%s" % (self.name, time.ctime(time.time()), status)
+        print "Exiting " + self.name
+
+# Create new threads
+thread1 = dfconvertThread(1, "Thread-1", "input.docx", "output1.html")
+thread2 = dfconvertThread(2, "Thread-2", "input.docx", "output2.html")
+thread3 = dfconvertThread(3, "Thread-3", "input.docx", "output3.html")
+thread4 = dfconvertThread(4, "Thread-4", "input.docx", "output4.html")
+thread5 = dfconvertThread(5, "Thread-5", "input.docx", "output5.html")
+
+# Start new Threads
+thread1.start()
+thread2.start()
+thread3.start()
+thread4.start()
+thread5.start()
+
+print "Exiting Main Thread"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/0c004143/consumers/dfwebserver/web/client/index.html
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/web/client/index.html b/consumers/dfwebserver/web/client/index.html
index 47e5220..4b983f6 100644
--- a/consumers/dfwebserver/web/client/index.html
+++ b/consumers/dfwebserver/web/client/index.html
@@ -18,9 +18,14 @@
         iface.setup(function() {
             console.log("iface setup complete");
         }, 
-        "/consumers/web/client/sample.html", 
+        "", 
         "/Editor/src", "/consumers/web/client");
     }
+    
+    function doDummyGet() {
+        document.getElementById("_content").src = "/consumers/dfwebserver/pool/sample.docx/sample.html";
+        
+    }
 </script>
 <style>
     html,
@@ -35,6 +40,7 @@
         padding-top: 64px;
     }
     div.toolbar {
+        padding: 0;
         border: none;
         position: absolute;
         top: 0px;
@@ -53,6 +59,7 @@
         height: 14px;
         background-color: #ddd;
         xvisibility: hidden;
+        text-align: center;
     }
     
     iframe.contentframe {
@@ -68,6 +75,7 @@
     <div class="toolbar" id="_toolbar">
     </div>
     <div class="toolbar2" id="_toolbar2">
+        <a href="javascript:doDummyGet();">GET</a> 
     </div>
     <div style="border: 1px solid black; display: none">
         Formatting


[17/17] incubator-corinthia git commit: Added doc example with duplicate style name and inner span in span

Posted by fr...@apache.org.
Added doc example with duplicate style name and inner span in span


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/aa2938d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/aa2938d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/aa2938d3

Branch: refs/heads/master
Commit: aa2938d31db37313924c685f0f08819a42d04abd
Parents: 46ae266
Author: franzdecopenhague <fr...@outlook.com>
Authored: Wed Apr 29 12:40:17 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Wed Apr 29 12:40:17 2015 +0000

----------------------------------------------------------------------
 sample/documents/odf/DupStyleName.odt | Bin 0 -> 9475 bytes
 sample/documents/odf/README.txt       |   3 +++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2938d3/sample/documents/odf/DupStyleName.odt
----------------------------------------------------------------------
diff --git a/sample/documents/odf/DupStyleName.odt b/sample/documents/odf/DupStyleName.odt
new file mode 100644
index 0000000..c307532
Binary files /dev/null and b/sample/documents/odf/DupStyleName.odt differ

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2938d3/sample/documents/odf/README.txt
----------------------------------------------------------------------
diff --git a/sample/documents/odf/README.txt b/sample/documents/odf/README.txt
new file mode 100644
index 0000000..5f9b66f
--- /dev/null
+++ b/sample/documents/odf/README.txt
@@ -0,0 +1,3 @@
+DupStyleName.odt
+    Contains a paragraph and character style with the same name, DupStyleName.
+    Contains span tag inside other span tag.
\ No newline at end of file


[03/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/2a53613e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/2a53613e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/2a53613e

Branch: refs/heads/master
Commit: 2a53613eeb4c33725ffe439818869e5976d3a408
Parents: 88051ae b8c4399
Author: franzdecopenhague <fr...@outlook.com>
Authored: Sat Mar 14 10:55:53 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Sat Mar 14 10:55:53 2015 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[12/17] incubator-corinthia git commit: Added uncommited change for server example

Posted by fr...@apache.org.
Added uncommited change for server example


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/01c924db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/01c924db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/01c924db

Branch: refs/heads/master
Commit: 01c924db0a6254e50c7081ebeeebc9280da6497c
Parents: ee179e3
Author: franzdecopenhague <fr...@outlook.com>
Authored: Thu Mar 26 23:33:12 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Thu Mar 26 23:33:12 2015 +0000

----------------------------------------------------------------------
 consumers/dfwebserver/.gitignore                |  3 +-
 .../dfwebserver/examples/node/server/server.js  | 98 +++++++++++++++++++-
 2 files changed, 99 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/01c924db/consumers/dfwebserver/.gitignore
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/.gitignore b/consumers/dfwebserver/.gitignore
index e783591..3cd6f04 100644
--- a/consumers/dfwebserver/.gitignore
+++ b/consumers/dfwebserver/.gitignore
@@ -1 +1,2 @@
-pool
\ No newline at end of file
+pool
+uploads
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/01c924db/consumers/dfwebserver/examples/node/server/server.js
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/examples/node/server/server.js b/consumers/dfwebserver/examples/node/server/server.js
index 516bf26..ec79dfc 100644
--- a/consumers/dfwebserver/examples/node/server/server.js
+++ b/consumers/dfwebserver/examples/node/server/server.js
@@ -4,6 +4,102 @@ var express = require('express'),
 var path = require('path');
 var fs = require('fs');
 
-//var mime = require('mime');
+var docformats = require('../../../node/src/docformats');
+docformats.options.binaryPath = path.resolve('../../../../../build/bin');
+
+
+var app = express();
+
+var dfwebserver = path.resolve(__dirname, '../../..');
+var web = path.resolve(__dirname, '../../../../web');
+
+app.get('/upload', function(req, res){
+  res.send('<html><head></head><body>\
+               <form method="POST" enctype="multipart/form-data">\
+                <input type="file" name="filefield"><br />\
+                <input type="submit">\
+              </form>\
+            </body></html>');
+});
+
+var multerOptions = { 
+    dest: path.resolve(dfwebserver, 'uploads/'),
+    rename: function (fieldname, filename) {
+        return filename;
+    }
+};
+
+app.post('/upload',[ multer(multerOptions), function(req, res){
+    console.log(req.body) // form fields
+    console.log(req.files) // form files
+    //res.json(req.files).status(204).end()
+    
+  res.send('<html><head></head><body>\
+               <a href="/get/' + req.files.filefield.name + '/">Navigate to this link to run dfconvert GET in the server\
+                </a>\
+            </body></html>');
+}]);
+
+
+function getInput(id) {
+    return path.resolve(dfwebserver, 'uploads', id);
+}
+
+function getOutput(id) {
+    var folder = path.resolve(dfwebserver, 'pool', id)
+    var parsed = path.parse(folder);
+    
+    return path.resolve(folder, parsed.name + '.html');
+}
+
+function getDynamicResource(id, resource) {
+    var folder = path.resolve(dfwebserver, 'pool', id)
+
+    return path.resolve(folder, resource);
+}
+
+function getStaticResource(resource) {
+    return path.resolve(web, 'client', resource);
+}
+
+function sendFile(res, filename) {
+    if (fs.existsSync(filename)) {
+        res.sendFile(filename);
+    } else {
+        res.status(404).end(); // Not Found
+    }
+}
+
+
+app.get('/get/:id', function(req, res){
+    var input = getInput(req.params.id);
+    var abstract = getOutput(req.params.id);
+    
+    try {
+        // This is required because DocFormat API throw an error
+        // when abstract is present in the filesystem
+        fs.unlinkSync(abstract); 
+    } catch (ex) {
+        // do nothing
+    }
+    docformats.get(input, abstract);
+    sendFile(res, abstract);
+});
+
+app.get('/get/:id/*', function(req, res){
+    var staticResource = getStaticResource(req.params[0]);
+    var dynamicResource = getDynamicResource(req.params.id, req.params[0]);
+    
+    if (fs.existsSync(staticResource)) {
+        res.sendFile(staticResource);
+    } else {
+        sendFile(res, dynamicResource);
+    }
+});
+
+
+
+app.listen(process.env.PORT || 8080);
+
 
 


[14/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/411171e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/411171e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/411171e8

Branch: refs/heads/master
Commit: 411171e8cc9da55e5d92d4299eb8cb7b8d56b1ba
Parents: 957f173 7015ab0
Author: franzdecopenhague <fr...@outlook.com>
Authored: Wed Apr 15 11:00:19 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Wed Apr 15 11:00:19 2015 +0000

----------------------------------------------------------------------
 DocFormats/api/src/Operations.c                 |   99 +-
 DocFormats/core/src/html/DFHTML.c               |   50 +
 DocFormats/core/src/html/DFHTML.h               |    4 +
 DocFormats/core/src/lib/DFFilesystem.c          |    1 -
 DocFormats/filters/odf/src/text/ODFText.c       |    4 +-
 DocFormats/filters/odf/src/text/ODFText.h       |    4 +-
 DocFormats/filters/ooxml/src/word/Word.c        |   10 +-
 DocFormats/filters/ooxml/src/word/Word.h        |    4 +-
 .../filters/ooxml/src/word/WordConverter.c      |   13 +-
 .../filters/ooxml/src/word/WordConverter.h      |    4 +-
 DocFormats/filters/ooxml/tests/word/WordTests.c |    4 +
 DocFormats/platform/tests/OStests.c             |   11 +-
 consumers/corinthia/.gitignore                  |    1 +
 consumers/corinthia/Doxyfile                    | 2331 ++++++++++++++++++
 consumers/corinthia/res/sample.html             |  395 +++
 consumers/corinthia/src/CMakeLists.txt          |   35 +-
 consumers/corinthia/src/Editor.cpp              |  296 +++
 consumers/corinthia/src/Editor.h                |   35 +
 consumers/corinthia/src/JSInterface.cpp         | 1307 ++++++++++
 consumers/corinthia/src/JSInterface.h           |  478 ++++
 consumers/corinthia/src/MainWindow.cpp          |  101 +
 consumers/corinthia/src/MainWindow.h            |   42 +
 consumers/corinthia/src/Toolbar.cpp             |   50 +
 consumers/corinthia/src/Toolbar.h               |   49 +
 consumers/corinthia/src/desktop.cpp             |   53 -
 consumers/corinthia/src/desktop.ui              |   72 -
 consumers/corinthia/src/editWindows.h           |   36 -
 consumers/corinthia/src/main.cpp                |   15 +-
 consumers/dfconvert/src/main.c                  |    2 +-
 consumers/dfutil/src/Commands.c                 |   30 +
 sample_documents/INDEX                          |   29 +
 sample_documents/docx/we-need-more-samples      |    0
 sample_documents/html/h1-6_center_p.html        |   27 +
 sample_documents/html/lists.html                |   18 +
 sample_documents/html/simple_1.html             |   18 +
 sample_documents/html/table.html                |   33 +
 sample_documents/odf/we-need-more-samples       |    0
 sample_documents/tex/we-need-more-samples       |    0
 sample_documents/we-need-more-samples           |    0
 39 files changed, 5458 insertions(+), 203 deletions(-)
----------------------------------------------------------------------



[08/17] incubator-corinthia git commit: Simulate a GET call to dfwebserver

Posted by fr...@apache.org.
Simulate a GET call to dfwebserver


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/8565b796
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/8565b796
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/8565b796

Branch: refs/heads/master
Commit: 8565b79660cb02f0694cc5939c31203c67bdad8a
Parents: 2e9d2e2
Author: franzdecopenhague <fr...@outlook.com>
Authored: Tue Mar 24 23:22:48 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Tue Mar 24 23:22:48 2015 +0000

----------------------------------------------------------------------
 .../dfwebserver/pool/sample.docx/sample.html    | 1130 ++++++++++++++++++
 consumers/dfwebserver/web/WARNING_EXPERIMENTAL  |    7 +
 consumers/dfwebserver/web/client/index.html     |   83 ++
 consumers/web/client/index.html                 |    2 +-
 consumers/web/client/interface.js               |   18 +-
 consumers/web/client/uxeditor.js                |   36 +-
 6 files changed, 1236 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8565b796/consumers/dfwebserver/pool/sample.docx/sample.html
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/pool/sample.docx/sample.html b/consumers/dfwebserver/pool/sample.docx/sample.html
new file mode 100644
index 0000000..c7a584a
--- /dev/null
+++ b/consumers/dfwebserver/pool/sample.docx/sample.html
@@ -0,0 +1,1130 @@
+<!DOCTYPE html>
+
+<html lang="en-AU">
+<head>
+  <meta charset="utf-8">
+  <meta name="generator" content="UX Write 2.0.2 (build 4b4faea); iOS 7.1">
+
+  <title></title>
+  <style>
+blockquote {
+    font-style: italic;
+  }
+
+  body {
+    counter-reset: h1 h2 h3 h4 h5 h6 figure table;
+    font-family: Palatino;
+    xmargin: 10%;
+    text-align: justify;
+  }
+
+  caption {
+    caption-side: bottom;
+    counter-increment: table;
+  }
+
+  caption.Unnumbered {
+    counter-increment: table 0;
+  }
+
+  caption.Unnumbered::before, figcaption.Unnumbered::before {
+    content: "";
+  }
+
+  caption::before {
+    content: "Table " counter(table) ": ";
+  }
+
+  figcaption {
+    counter-increment: figure;
+  }
+
+  figcaption.Unnumbered {
+    counter-increment: figure 0;
+  }
+
+  figcaption::before {
+    content: "Figure " counter(figure) ": ";
+  }
+
+  figure {
+    margin-bottom: 12pt;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 12pt;
+    text-align: center;
+  }
+
+  h1 {
+    counter-increment: h1;
+    counter-reset: h2 h3 h4 h5 h6;
+  }
+
+  h1.Unnumbered, h2.Unnumbered, h3.Unnumbered, h4.Unnumbered, h5.Unnumbered, h6.Unnumbered {
+  }
+
+  h1::before {
+    content: counter(h1) " ";
+  }
+
+  h2 {
+    color: #585958;
+    counter-increment: h2;
+    counter-reset: h3 h4 h5 h6;
+  }
+
+  h2::before {
+    content: counter(h1) "." counter(h2) " ";
+  }
+
+  h3 {
+    counter-increment: h3;
+    counter-reset: h4 h5 h6;
+  }
+
+  h3::before {
+    content: counter(h1) "." counter(h2) "." counter(h3) " ";
+  }
+
+  h4 {
+    counter-increment: h4;
+    counter-reset: h5 h6;
+  }
+
+  h4::before {
+    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) " ";
+  }
+
+  h5 {
+    counter-increment: h5;
+    counter-reset: h6;
+  }
+
+  h5::before {
+    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " ";
+  }
+
+  h6 {
+    counter-increment: h6;
+  }
+
+  h6::before {
+    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " ";
+  }
+
+  nav.listoffigures::before {
+    content: "List of Figures";
+    display: block;
+    font-size: 2em;
+    font-weight: bold;
+    margin-bottom: .67em;
+    margin-top: .67em;
+  }
+
+  nav.listoftables::before {
+    content: "List of Tables";
+    display: block;
+    font-size: 2em;
+    font-weight: bold;
+    margin-bottom: .67em;
+    margin-top: .67em;
+  }
+
+  nav.tableofcontents::before {
+    content: "Contents";
+    display: block;
+    font-size: 2em;
+    font-weight: bold;
+    margin-bottom: .67em;
+    margin-top: .67em;
+  }
+
+  p {
+    line-height: 166%;
+  }
+
+  p.abstract {
+    font-style: italic;
+    margin-left: 20%;
+    margin-right: 20%;
+  }
+
+  p.author {
+    font-size: 18pt;
+    text-align: center;
+  }
+
+  p.NoSpacing {
+    margin: 0%;
+  }
+
+  p.SpecialNote {
+    color: red;
+    font-weight: bold;
+    text-align: center;
+  }
+
+  p.Tip {
+    background-color: #eeeeee;
+    border: hidden;
+    border-radius: 10px;
+    margin-left: 5%;
+    margin-right: 5%;
+    padding: 10pt;
+  }
+
+  p.Title {
+    font-size: 36pt;
+    font-weight: bold;
+    margin-bottom: 24pt;
+    text-align: center;
+    text-decoration: underline;
+  }
+
+  p.toc1 {
+    margin-bottom: 6pt;
+    margin-left: 0pt;
+    margin-top: 12pt;
+  }
+
+  p.toc2 {
+    margin-bottom: 6pt;
+    margin-left: 24pt;
+    margin-top: 6pt;
+  }
+
+  p.toc3 {
+    margin-bottom: 6pt;
+    margin-left: 48pt;
+    margin-top: 6pt;
+  }
+
+  table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+  }
+
+  td > :first-child, th > :first-child {
+    margin-top: 0;
+  }
+
+  td > :last-child, th > :last-child {
+    margin-bottom: 0;
+  }
+
+  td, th {
+    border: 1px solid black;
+  }
+  </style>
+</head>
+
+<body>
+
+  <h1 id="item9">Introduction</h1>
+
+  <p>UX Write is designed for long-form, professional writing tasks such as
+  reports, research papers, theses, and books. With an emphasis on technical
+  and academic writing, it provides tools to work with the <i>content</i> and
+  <i>structure</i> of your document separately from its <i>presentation</i>.
+  The latter is controlled by <i>styles</i>, such as headings, normal
+  paragraphs, and the document title.</p>
+
+  <h2 id="item19">What you see is what you mean</h2>
+
+  <p>The design philosophy of UX Write is “what you see is what you mean”, or
+  WYSIWYM. By separating content from presentation, and making the logical
+  structure of documents explicit, it is possible for the layout and rendering
+  of text to adapt to the output medium. This means your documents look just as
+  good on a 30“ desktop monitor as they do on a 7” tablet or the printed
+  page.</p>
+
+  <p>The structure of your document — such as the hierarchy of section headings
+  — also enables other useful features. A table of contents is generated
+  automatically, without you having to manually update text or page numbers.
+  Cross-references can be added and kept up-to-date as section numbers change.
+  The outline view, accessible from the toolbar, displays all the sections,
+  figures, and tables in your document, allowing you to navigate around
+  easily.</p>
+
+  <p>A contrasting approach is “what you see is what you get”, or WYSIWYG,
+  supported by programs like Microsoft Word and Pages. This attempts to
+  replicate the precise layout of a printed page on screen during editing,
+  regardless of whether you're using a desktop computer or a mobile phone.
+  While useful for some purposes, we believe it's the wrong approach for a
+  mobile word processor. UX Write is unapologetically WYSIWYM, and is optimised
+  for readability and ease-of-use across both iPhone and iPad.</p>
+
+  <p class="Tip">If you've got this document open for editing, take a moment
+  now to explore the document outline (third toolbar button from right). Try
+  adjusting the text size in the “Look &amp; feel” section of the settings menu
+  (second from right) to suit your reading preferences. Rotate your screen and
+  watch as the text reflows.</p>
+
+  <h2 id="item17">File formats</h2>
+
+  <p>The native file format of UX Write is HTML — the language of the web. You
+  can view HTML documents on any device or operating system out there, and
+  publish online without any need for file conversion. If you open a Microsoft
+  Word document, it is temporarily converted to HTML for editing, and then
+  saved back again afterwards. Any parts of the document that could not be
+  converted, such as embedded spreadsheets, are preserved in the original Word
+  document.</p>
+
+  <h1 id="item8">Basic features</h1>
+
+  <h2 id="item11">Accessing your Documents</h2>
+
+  <p>You can store your documents on your device only — under
+  “My iPad” or “My iPhone” — or sync them with a cloud service such as Dropbox.
+  In the former case, you can transfer files to your computer using <a href=
+  "http://support.apple.com/kb/HT4094">iTunes file sharing</a>, and in the
+  latter case you can either access your files through the respective service's
+  website, or by installing the service's software on your computer. Box,
+  Dropbox, Google Drive, and Microsoft OneDrive all have clients available for
+  Windows and Mac which you can install for free.</p>
+
+  <p>File synchronisation happens automatically. Whenever a
+  document is saved, it is uploaded&nbsp; in the background, while you continue
+  working. If you have your computer set up for syncing, you will usually see
+  these changes appear within a few seconds. Within UX Write, you can check for
+  updates to existing documents using the refresh button.</p>
+
+  <p>If you're working offline, you can still add and change documents in any
+  of the Box, Dropbox, Google Drive, OneDrive or WebDAV locations you have set
+  up. When you have an Internet connection available again, just launch UX
+  Write, and it will attempt to upload the documents. To move, copy, or delete
+  documents, simply tap the “Edit” button in the file browser.</p>
+
+  <p class="Tip"><b>Tip:</b> We recommend creating and storing all your
+  documents on Dropbox, because it keeps backup copies of every version
+  uploaded for 30 days. You can view and recover old versions of your document
+  if the need arises — see Section <a href="#item10">4.1</a>.</p>
+
+  <h2 id="item4">Editing</h2>
+
+  <p>Text editing works in much the same way as in any other iOS app, but with
+  a few enhancements:</p>
+
+  <ul>
+    <li>
+      <p>An extra row of keys above the keyboard provides access to common
+      punctuation symbols</p>
+    </li>
+
+    <li>
+      <p>The two leftmost keys let you move the cursor or select text by
+      holding them down to bring up a virtual trackpad. Swipe with one finger
+      to move slowly, and two fingers to move faster.</p>
+    </li>
+
+    <li>
+      <p>The formatting key, when held down, replaces the other top-row keys
+      with keys for basic formatting options like bold, italic, and lists</p>
+    </li>
+
+    <li>
+      <p>The autocorrect key allows you to confirm or revert the latest
+      autocorrect replacement (see Section <a href="#item2">2.5</a> for more
+      details)</p>
+    </li>
+
+    <li>
+      <p>You can triple-tap anywhere in the text to select the whole
+      paragraph</p>
+    </li>
+  </ul>
+
+  <p>Note: The keyboard extensions are only available on the iPad.</p>
+
+  <p>UX Write also includes full support for external bluetooth keyboards, and
+  supports all of the standard keyboard shortcuts:</p>
+
+  <table style="width: 100%;" id="item7">
+    <caption>
+      Keyboard shortcuts
+    </caption>
+
+    <colgroup>
+      <col width="50%">
+      <col width="50%">
+    </colgroup>
+
+    <tbody>
+      <tr>
+        <td>
+          <p>Cmd-B</p>
+        </td>
+
+        <td>
+          <p>Bold</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Cmd-I</p>
+        </td>
+
+        <td>
+          <p>Italic</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Cmd-U</p>
+        </td>
+
+        <td>
+          <p>Underline</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Cmd-X</p>
+        </td>
+
+        <td>
+          <p>Cut</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Cmd-C</p>
+        </td>
+
+        <td>
+          <p>Copy</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Cmd-V</p>
+        </td>
+
+        <td>
+          <p>Paste</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Cmd-A</p>
+        </td>
+
+        <td>
+          <p>Select all</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Option-Left/Right</p>
+        </td>
+
+        <td>
+          <p>Move back or forward one word</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Option-Up/Down</p>
+        </td>
+
+        <td>
+          <p>Move up or down one paragraph</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Cmd-Left/Right</p>
+        </td>
+
+        <td>
+          <p>Move to start or end of line</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Cmd-Up/Down</p>
+        </td>
+
+        <td>
+          <p>Move to start of end of document</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td>
+          <p>Shift-Arrow key (+ Cmd or Option)</p>
+        </td>
+
+        <td>
+          <p>Any of the above, but for selection</p>
+        </td>
+      </tr>
+    </tbody>
+  </table>
+
+  <h2 id="item5">Styles</h2>
+
+  <p>All formatting in UX Write, with the exception of
+  bold,&nbsp;italic, underline and lists, is controlled using <i>styles</i> —
+  such as headings and normal paragraphs. A style serves two purposes:</p>
+
+  <ol>
+    <li>
+      <p>It determines the <i>formatting</i> of the text, such
+      as the font, colour, and paragraph alignment. When a style is modified,
+      all text associated with that style automatically adopts the new
+      formatting, making it easy to ensure consistent presentation throughout
+      your document.</p>
+    </li>
+
+    <li>
+      <p>It indicates the <i>purpose</i> of a piece of text,
+      such as a heading or title. UX Write uses this information for various
+      purposes, such as building a table of contents, displaying the outline
+      view, and determining the possible targets for cross-references.</p>
+    </li>
+  </ol>
+
+  <p>UX Write Basic Edition provides a plain set of built-in styles for
+  headings, block quotes, a document title, and normal text. UX Write
+  Professional Edition allows you to modify the appearance of these built-in
+  styles, as well as create your own; see Section&nbsp;<a href=
+  "#item29">3.1</a> for details.</p>
+
+  <h2 id="item6">Auto correct</h2>
+
+  <p>Automatic correction of typing mistakes can sometimes lead to unexpected
+  results, since no piece of software can accurately guess what you meant to
+  type in every case. When UX Write makes a correction, it highlights it in
+  green, and gives you the opportunity to confirm whether or not it has made
+  the right replacement.</p>
+
+  <p>Tapping on a highlighted word brings up a menu that allows you to accept
+  the correction, revert to the original, or bring up a list of more
+  suggestions, with the option to add the word to the custom dictionary. Any
+  substitutions you explicitly accept are remembered by UX Write, and will
+  occur automatically the next time you make the same typing mistake. You can
+  access the custom dictionary and list of automatic substitutions via the
+  settings menu.</p>
+
+  <h2 id="item2">Outline Navigation</h2>
+
+  <p>You can use the outline view — the third toolbar button
+  from the right — to view the structure of your document and quickly jump
+  between sections. This is particularly useful for large documents, where
+  scrolling would be a hassle.</p>
+
+  <p>The outline view is based on the headings, figures, and
+  tables in your document. For headings to be included, you must mark them as
+  such using the formatting menu. Tables and figures are always included. As
+  you modify your document by adding, removing, or changing content, the
+  outline is automatically kept up-to-date. UX Write Professional Edition also
+  allows you to edit the outline — see Section <a href="#item30">3.4</a> for
+  details.</p>
+
+  <p>In landscape mode on the iPad, you can “pin” the outline to
+  the left of your screen, and it will be displayed alongside your document. To
+  pin or unpin it, use the button at the top of the outline. To hide the
+  outline when it is pinned, press the 'X' button.</p>
+
+  <p>The outline view corresponds directly to what in the table
+  of contents, list of figures, and list of tables, if you have added any of
+  these to your document. See Section&nbsp;<a href="#item32">3.9</a> for
+  details.</p>
+
+  <h1 id="item27">Professional features</h1>
+
+  <p>This section describes features that are only available in
+  UX Write Professional Edition. You can upgrade to this by either purchasing
+  it outright, or by subscribing on a monthly basis. Go to the settings menu
+  and select “View upgrade options” to see details.</p>
+
+  <h2 id="item29">Styles</h2>
+
+  <p>Styles, introduced in Section&nbsp;<a href=
+  "#item5">2.3</a>, define both the formatting and purpose of text in your
+  document. Heading styles, for instance, denote the document outline, and are
+  used for constructing the table of contents. Each style can have different
+  formatting properties, such as fonts, colours, margins, paragraph alignment,
+  borders, and more.</p>
+
+  <p>Using styles enables you to achieve consistent formatting
+  throughout your entire document. Instead of manually changing formatting on a
+  case-by-case basis — as many other word processors encourage you to do — you
+  adjust a style once and it applies to all text in the document associated
+  with the style. This is useful for ensuring your document complies with
+  requirements from your organisation or publisher.</p>
+
+  <p>UX Write provides a number of built-in styles, based on
+  those present in HTML. There are six levels of headings, in addition
+  to&nbsp;normal paragraphs and block quotes. You can change the way any of
+  these are formatted, and also add your own custom styles for specific
+  purposes. For example, this document contains a “Tip” style, which appears as
+  a light-grey box with rounded corners, and left and right margins that place
+  it in the center of the page.</p>
+
+  <p>To manage styles, go to the formatting menu, and select
+  “Edit Styles”. This will bring up the style manager, with a list of styles on
+  the left, and formatting properties on either the top or right of the screen
+  (depending on your screen orientation).</p>
+
+  <p>To edit an existing style, simply select it in the list, and change any of
+  the formatting properties. You will see a preview displayed below the
+  controls that shows an example piece of text as it would be displayed in the
+  document.</p>
+
+  <p>To add a new style, scroll down to the bottom of the list and tap next to
+  the green '+' button. Type in your style name and press enter. You can now
+  set up the formatting for this style, and subsequently select it from the
+  formatting menu in the editor.</p>
+
+  <p>Direct formatting is still available if you want it, via
+  the item near the bottom of the formatting menu. This gives you the same
+  properties as are available in the style editor, but the changes only apply
+  to the current selection.</p>
+
+  <p>Styles you create in UX Write are compatible with Word, and
+  you can also edit and use the styles in Word itself.</p>
+
+  <p class="Tip"><b>Tip:</b> If you want to re-use your styles with multiple
+  documents, you can set up a template for creating new documents. See Section
+  <a href="#item15">3.13</a> for details.</p>
+
+  <h2 id="item39">Formatting</h2>
+
+  <p>There are two ways to adjust formatting:</p>
+
+  <ul>
+    <li>
+      <p><b>Styles.</b> You can select these from the formatting
+      menu; they apply at the paragraph level. Generally, you should use styles
+      to control formatting, as this provides structural information about the
+      document (in the case of headings), and allows you to easily change
+      formatting throughout the whole document for any given style.</p>
+    </li>
+
+    <li>
+      <p><b>Direct formatting.</b> You can also select this from
+      the formatting menu; this is intended for “one-off” cases where you wish
+      to format a particular piece of text without defining a style, such as
+      highlighting something important. You have access to all the same
+      formatting options as you do for styles. Direct formatting corresponds to
+      what you would see in the toolbar of Microsoft Word; we've deliberately
+      de-emphasised it in the user interface to encourage the use of
+      styles.</p>
+    </li>
+  </ul>
+
+  <p>All of the formatting properties directly correspond to
+  those of CSS (Cascading Style Sheets), the web standard used in conjunction
+  with HTML. In most cases, the CSS formatting properties UX Write supports can
+  also be translated directly to those of Microsoft Word; the main exception is
+  that Word has a slightly different way of handling paragraph borders and
+  margins.</p>
+
+  <p>Formatting properties are divided into two categories:
+  <i>text</i> and <i>paragraph</i>. Text properties, in the case of direct
+  formatting, can be applied to only a portion of a paragraph. The rest apply
+  to the paragraph as a whole.</p>
+
+  <h2 id="item26">Document structure</h2>
+
+  <p>Most formal documents like reports and books are divided
+  into multiple levels of <b>sections</b>, with <b>cross-references</b> between
+  them, and a <b>table of contents</b> at the front. Styles are key to
+  achieving this, because the program needs to be told which pieces of text are
+  headings — it can't simply guess that “18 point bold” means a second-level
+  heading. By using styles to mark all your headings, you can take advantage of
+  the following features:</p>
+
+  <ul>
+    <li>
+      <p>Table of contents (Insert menu)</p>
+    </li>
+
+    <li>
+      <p>Cross-references (Insert menu)</p>
+    </li>
+
+    <li>
+      <p>Automatic numbering</p>
+    </li>
+
+    <li>
+      <p>Outline editor (Outline button on toolbar)</p>
+    </li>
+  </ul>
+
+  <p>Whenever a section number changes as a result of changes
+  earlier in the document, its number is automatically updated, as are those of
+  all references that point to it, and the table of contents. The same is true
+  of figures and tables. When you print or generate a PDF, page numbers are
+  automatically calculated for you and included in the table of contents.</p>
+
+  <h2 id="item30">Outline editing</h2>
+
+  <p>You can rearrange and delete sections in the outline by
+  pressing the “Edit button”. To change the order of sections, tap and drag the
+  section name to your desired position. To delete an item, just press the red
+  button on the left, and confirm by pressing the “Delete” button that appears.
+  All changes you make in the outline editor are immediately reflected in the
+  document, including updates to numbering.</p>
+
+  <h2 id="item35">Find and replace</h2>
+
+  <p>On iPad, a search bar is visible at the top of the screen,
+  and you can just type in your search term and hit enter. Tap the down arrow
+  to view options, including replacement text. On iPhone, the search bar and
+  options are accessible via the settings menu.</p>
+
+  <p>By default, searching will look for the exact text you have
+  entered, with case sensitivity determined by whether you have selected that
+  option. Alternatively, you can search and replace text using <i>regular
+  expressions</i>, which allow you to enter patterns that can match multiple
+  snippets of text. Regular expression support is mainly intended for advanced
+  users, such as programmers, who are already familiar with the concept. If you
+  would like to learn more, we recommend the tutorial at at&nbsp;<a href=
+  "http://regexone.com">regexone.com</a>.</p>
+
+  <h2 id="item36">Spell checking</h2>
+
+  <p>The spell checking option will search through your document
+  and highlight any instances of words it finds which are not in the system or
+  custom dictionaries.</p>
+
+  <p>The language&nbsp;used is determined by the following three
+  settings, in order:</p>
+
+  <ul>
+    <li>
+      <p>Language for the current document (Settings &gt; This
+      Document &gt; Language)</p>
+    </li>
+
+    <li>
+      <p>Default language for UX Write (Settings &gt;
+      Application &gt; Language)</p>
+    </li>
+
+    <li>
+      <p>System language (set in the Settings app of your iPad
+      or iPhone)</p>
+    </li>
+  </ul>
+
+  <p>There is currently no support for handling multiple
+  languages in a single document. The set of languages available for spell
+  checking is determined by the built-in dictionaries provided by the operating
+  system, which as of 7.1 are:</p>
+
+  <ul>
+    <li>
+      <p class="NoSpacing">Danish</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">Dutch</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">English (Australia)</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">English (Canada)</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">English (United Kingdom)</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">English (United States)</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">French</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">German</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">Italian</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">Portuguese (Brazil)</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">Portuguese (Portugal)</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">Russian</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">Spanish</p>
+    </li>
+
+    <li>
+      <p class="NoSpacing">Swedish</p>
+    </li>
+  </ul>
+
+  <h2 id="item37">Word count</h2>
+
+  <p>You can view the word count for your document from the
+  settings menu. This also includes the total number of characters and
+  paragraphs.</p>
+
+  <h2 id="item31">Automatic numbering</h2>
+
+  <p>UX Write can assign numbers to all headings, figures, and
+  tables automatically. For headings, you can turn this on using the “Heading
+  numbering” option in the settings menu. For figures and tables, you can set
+  this on an individual basis either at insertion time, or by tapping on the
+  item and selecting “Figure” or “Table” in the popup menu.</p>
+
+  <p>Numbering is updated automatically as the document changes.
+  If you add or remove a heading, change it's nesting level (e.g.
+  from&nbsp;Heading 2 to Heading 1), or move sections around using the outline
+  editor, the numbers will be updated to reflect the changes. The same is also
+  true for figures and tables.</p>
+
+  <p>All cross-references, plus the table of contents, list of
+  figures, and list of tables (if present) are also kept up to date whenever
+  the numbers change. This ensures that you never have out-of-date references
+  and you don't have to remember to manually update other parts of the
+  document.&nbsp;</p>
+
+  <h2 id="item32">Table of contents</h2>
+
+  <p>While it's possible to manually create a table of contents
+  in any word processor, doing so is tedious, particularly when keeping all the
+  section titles and page numbers up to date. In UX Write, inserting a table of
+  contents causes it to be constructed automatically based on the headings,
+  just like the outline view described in Section&nbsp;<a href=
+  "#item30">3.4</a>. And like automatic numbering and the outline view, every
+  time you add or remove a section, or change its title, the table of contents
+  automatically updates to reflect the change.</p>
+
+  <p>Page numbers are <i>not</i> displayed in the table of
+  contents during editing or when saving as a HTML file, as neither has any
+  concept of distinct pages. When you print or export to PDF, the correct page
+  numbers will be filled in for you. There's no need to do this manually.</p>
+
+  <p>You can also insert a list of figures or list of tables,
+  which work similarly to the table of contents. The text shown in these comes
+  from the captions, with the numbers shown in the same way as section numbers.
+  As with the table of contents, these are always kept in sync with the rest of
+  document.</p>
+
+  <p>If your document is in HTML format, the table of contents,
+  list of figures, and list of tables will appear as links that can be clicked
+  to jump to the appropriate section when viewed in a web browser.</p>
+
+  <h2 id="item1">Cross-references</h2>
+
+  <p>You can insert a cross-reference to any section heading,
+  figure, or table in your document. When you select this option from the
+  insert menu, you'll see a document outline (the same as in the outline view),
+  and can select a target of the cross-reference.</p>
+
+  <p>References appear as hyperlinks in the document. When you
+  tap on one, you'll have the option to either go to the target of the
+  reference, or change it to point to a different section, figure, or
+  table.</p>
+
+  <p>If your reference is to a numbered heading, figure, or
+  table, the number will be updated whenever that of its target changes. If the
+  target is not numbered, the reference will contain the text instead, and will
+  also update whenever the text changes.</p>
+
+  <h2 id="item3">Footnotes and endnotes</h2>
+
+  <p>Because UX Write uses a continuous layout for editing, in
+  which the document is not divided into separate pages, footnotes are
+  displayed inline with the text<span class="footnote">A footnote looks like
+  this</span>. For consistency, and to avoid the need to jump back and forth
+  between the content and the end of the document, endnotes are handled in the
+  same way<span class="endnote">An endnote looks like this</span>.</p>
+
+  <p>HTML does not have any explicit support for either
+  footnotes or endnotes, in the sense that there is no &lt;footnote&gt; element
+  that can clearly indicate its purpose. UX Write uses &lt;span&gt; elements
+  with a class of “footnote” or “endnote” to represent these.</p>
+
+  <p>Microsoft Word documents <i>do</i> have explicit support
+  for both, so when editing a .docx file, UX Write will save them in the
+  appropriate format. When you open the document in Word, you'll see footnotes
+  at the bottom of the page, and endnotes at the end of the document.</p>
+
+  <p>To have footnotes and endnotes appear in their correct
+  positions in a print or PDF output, you must use the LaTeX typesetting option
+  (see Section&nbsp;<a href="#item23">3.12</a>). WebKit does not have the
+  capabilities to support pagination features.</p>
+
+  <h2 id="item23">Printing and PDF export</h2>
+
+  <p>Two different typesetting systems are supported for
+  producing print and PDF output. You can choose between these using the
+  “Typesetting” option under the settings menu:</p>
+
+  <ul>
+    <li>
+      <p><b>WebKit</b> (recommended). Safari's layout engine,
+      optimised for on-screen rendering of HTML content.</p>
+
+      <p>This is the layout engine used for displaying your
+      documents during editing, and the PDF files it generates match exactly
+      the formatting you see on screen; though line breaks will be different
+      for the printed page.</p>
+    </li>
+
+    <li>
+      <p><b>LaTeX</b> (new). The de-facto standard in many
+      scientific disciplines, optimised for high-quality typography and
+      paginated output.</p>
+
+      <p>Support for LaTeX is new in 2.0. Currently, only
+      limited formatting options are supported, and English is the only
+      supported language. We'll be improving this throughout the 2.x release
+      cycle, with support for other languages and many other features, such as
+      equations, bibliographies, and headers/footers.</p>
+    </li>
+  </ul>
+
+  <p>Of these two, only LaTeX is capable of correctly
+  typesetting footnotes and endnotes, as well as other pagination-dependent
+  features we'll be adding in the future. If you print or export to PDF using
+  WebKit, footnotes and endnotes will appear inline with the text, as they do
+  during editing.</p>
+
+  <h2 id="item15">Creating Templates</h2>
+
+  <p>Often you'll want to create a series of documents which all have a
+  consistent look and feel, based on styles that you have set up, as described
+  in Section <a href="#item29">3.1</a>. While UX Write does not have a “proper”
+  template feature (yet), you can get the same effect by creating a normal
+  document with your desired settings, and treating that as a starting point
+  for new documents.</p>
+
+  <p>To create a template:</p>
+
+  <ol>
+    <li>
+      <p>Create a new document, calling it “My template” (or whatever you
+      like)</p>
+    </li>
+
+    <li>
+      <p>Open the document and use the style manager to change the default
+      fonts, colours, and other formatting properties that you want</p>
+    </li>
+
+    <li>
+      <p>Create any custom styles that you will use regularly — e.g. “Title” or
+      “Abstract”</p>
+    </li>
+  </ol>
+
+  <p>To create a new document based on a template:</p>
+
+  <ol>
+    <li>
+      <p>Tap and hold on the template document in the file manager</p>
+    </li>
+
+    <li>
+      <p>Select “Duplicate”</p>
+    </li>
+
+    <li>
+      <p>Type in the name for your new document</p>
+    </li>
+
+    <li>
+      <p>Open the new document and start writing</p>
+    </li>
+  </ol>
+
+  <p>We'll be adding a more sophisticated mechanism for browsing and previewing
+  template files, along with a few nice samples, in a future update.</p>
+
+  <h1 id="item13">Common Tasks</h1>
+
+  <h2 id="item10">Dropbox Versioning</h2>
+
+  <p>One of the best features of Dropbox is that it automatically keeps old
+  versions of every file that's uploaded to it. It's always been possible to
+  log into the Dropbox website and access these old versions via their web
+  interface, but now you can do it directly from within UX Write itself.</p>
+
+  <p>If you ever need to recover an older version of a document, simply tap and
+  hold on it in the file browser, and select “Versions” in the popup menu. You
+  can then browse through all the versions that Dropbox has kept, and restore
+  the one you want. UX Write autosaves every three minutes, so if you're
+  connected to the Internet while you're working, you'll have regular snapshots
+  of your documents.<b></b></p>
+
+  <h2 id="item12">Converting from HTML to docx</h2>
+
+  <p>If you've upgraded from a previous version of UX Write and wish to convert
+  your HTML documents to .docx so they can be used with Microsoft Word, you can
+  do so as follows:</p>
+
+  <ul>
+    <li>
+      <p>Tap and hold on the document in the file browser</p>
+    </li>
+
+    <li>
+      <p>Select <b>Convert to</b> <b>docx</b></p>
+    </li>
+  </ul>
+
+  <p>Note that due to differences between the two file formats, there may be
+  some loss of formatting during the transition — for example, the rounded
+  borders used in the “Tip” style in this document can't be represented in
+  docx. For this reason, the original HTML file will be kept as a backup.</p>
+
+  <h1 id="item16">Troubleshooting</h1>
+
+  <h2 id="item18">Reporting Bugs</h2>
+
+  <p>If you encounter a crash in UX Write, you will be asked if you would like
+  to submit a bug report. This report includes a crash log indicating exactly
+  where in the program the problem occurred, as well as a redacted copy of your
+  document in which all text and images have been removed. An email window will
+  appear where you can add comments about what happened, and the bug report
+  will be sent to us when you hit “Send”. You can CC yourself a copy for
+  reference if you like.</p>
+
+  <p><b>If we can't reproduce it, we can't fix it.</b> Many people send in bug
+  reports containing just the crash log. Often, we can to determine from this
+  what went wrong, but this isn't always the case. To increase the chances of
+  us being able to fix the problem, try to provide a detailed description of
+  what you were doing right before the crash occurred.</p>
+
+  <p>The best bug reports provide a clear set of steps that explain how to
+  reproduce the problem. During beta testing of 2.0, one particularly helpful
+  person even used iPad screen recording software to make a video demonstrating
+  how to trigger a bug, edited the video in iMovie, and added an audio track
+  with narration to explain what was going on. You certainly don't have to go
+  to this much effort, but a few simple instructions in your email which
+  explain how to reliably reproduce a problem will help a lot.</p>
+
+  <p>If you encounter any other issues that do not involve a crash, such as
+  formatting inconsistencies or strange user interface behaviour, just select
+  the <b>Submit bug report</b>&nbsp;option from the settings menu and send us a
+  note. Remember, the more information, the better.</p>
+
+  <p>The app store does not provide developers with any way to directly respond
+  to bug reports included in reviews. You can say whatever you want, but
+  <b>please also let us know about your problem</b> in case we need to ask you
+  for more information in order to fix it.</p>
+
+  <h2 id="item14">Purchase and Subscription</h2>
+
+  <p>Every time you install something from the app store, iOS
+  includes a <i>receipt file</i> which is accessible to the app. This file
+  includes information about the version number of the app that you originally
+  downloaded, as well as any in-app payments you have made. UX Write looks at
+  this file to determine whether or not to enable the features in the
+  professional edition.</p>
+
+  <p>If you buy a new iPad or iPhone and install UX Write on it
+  via iTunes, this receipt file might not be present. If you have purchased or
+  subscribed to the app, it's necessary for UX Write to request a copy of the
+  receipt file from the app store so it can verify your upgrade status. You can
+  do this either from the intro screen shown at first launch, or by selecting
+  “Reactivate existing upgrade” from the settings menu.</p>
+
+  <p>If you originally purchased UX Write prior to the release
+  of version 2.0 (when it was a paid-only app), you should automatically have
+  access to the professional edition. The way UX Write determines this is by
+  looking at the receipt file and checking what the version number of the app
+  was at the time of your purchase. So if you see the app running as basic
+  edition, select “Reactivate existing upgrade” from the settings menu.</p>
+
+  <p>If you have any problems with upgrades or payments,
+  <a href="http://www.uxproductivity.com/support">please contact us</a>.</p>
+
+  <h2 id="item20">The Field Update Problem</h2>
+
+  <p>If you open a .docx file in Word after editing it in UX Write, you'll see
+  the following message:</p>
+
+  <blockquote>
+    “This document contains fields that may refer to other files. Do you want
+    to update the fields in this document?”
+  </blockquote>
+
+  <p>When you see this message, just click <b>Yes</b> (or press the <b>Y</b>
+  key).</p>
+
+  <p>Sadly, this is a symptom of a design flaw in Word, and is something only
+  Microsoft can fix. Unlike UX Write, Word does not keep the table of contents,
+  cross references, or figure/table numbers (all collectively known as
+  <b>Fields</b>) up to date automatically. Instead, it forces you to manually
+  tell it when it to update the fields after you have made changes to your
+  document.</p>
+
+  <p>Despite the fact that UX Write never actually produces fields that refer
+  to other files, this message is still displayed in every version of Word that
+  we have tested with, including Word 2013. The only way we could prevent such
+  a dialog from appearing is to store a setting in the document that tells Word
+  that there is no need to update the fields — but this would simply leave you
+  with an invalid table of contents and incorrect cross-references. While we've
+  done our best to ensure that UX Write provides the best user experience
+  within the app itself, we're not able to fix Word.</p>
+
+  <h2 id="item22">Opening .doc files</h2>
+
+  <p>Microsoft Word has used a number of different file formats over the years,
+  and UX Write only supports the most recent version, .docx, which is a modern,
+  XML-based, well-documented open standard. The older .doc format is a
+  proprietary and very complex binary file format that would take a minimum of
+  six months to support. We've decided that time is better spent on other
+  useful features instead.</p>
+
+  <p>If you have a .doc file that you wish to edit in UX Write, you can convert
+  it to .docx by opening it in any recent version of Word (2007 and later), and
+  using “Save as” to convert it to docx. Doing so will maintain all of the
+  content and formatting, and provide exactly the same experience when working
+  with the document in Word itself. You will then have your document in a much
+  more portable format, and be able to edit it in Word, UX Write, and other
+  word processors such as LibreOffice.</p>
+
+  <h1 id="item28">More information</h1>
+
+  <p>If you have a question that isn't answered here, check out
+  our <a href="http://www.uxproductivity.com/support">support website</a> for
+  more info. We also maintain a <a href=
+  "http://blog.uxproductivity.com">blog</a> discussing the development of the
+  app and new features that are in the works. Many of our posts discuss various
+  questions people have had about UX Write and may provide you with a deeper
+  understanding of why certain aspects of the app are the way they are.</p>
+
+  <p>We value any feedback you have about the app, and you can
+  send it to us any time via the option on the settings menu. We receive a
+  <i>lot</i> of email, and can't guarantee to respond individually or add every
+  requested feature, but we certainly take into account your feedback when
+  deciding on priorities for future updates.</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8565b796/consumers/dfwebserver/web/WARNING_EXPERIMENTAL
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/web/WARNING_EXPERIMENTAL b/consumers/dfwebserver/web/WARNING_EXPERIMENTAL
new file mode 100644
index 0000000..ea6861f
--- /dev/null
+++ b/consumers/dfwebserver/web/WARNING_EXPERIMENTAL
@@ -0,0 +1,7 @@
+The code in this directory is just meant to give proof of concept, and do NOT adhere to the normal apache Policy.
+
+Remark we use third party software here, that are not and will not be part of a corinthia release.
+
+This directory is not being build with the standard corinthia build.
+
+

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8565b796/consumers/dfwebserver/web/client/index.html
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/web/client/index.html b/consumers/dfwebserver/web/client/index.html
new file mode 100644
index 0000000..47e5220
--- /dev/null
+++ b/consumers/dfwebserver/web/client/index.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <script src="../../../web/client/ui.js"></script>
+    <script src="../../../web/client/uxeditor.js"></script>
+    <script src="../../../web/client/interface.js"></script>
+</head>
+<script>
+    var core = null;
+    var iface = null;
+
+    function init() {
+        var element = document.getElementById("_editor");
+        core = new UXEditor(element);
+        iface = new UXInterface(core);
+        iface.setup(function() {
+            console.log("iface setup complete");
+        }, 
+        "/consumers/web/client/sample.html", 
+        "/Editor/src", "/consumers/web/client");
+    }
+</script>
+<style>
+    html,
+    body {
+        width: 100%;
+        height: 100%;
+    }
+    body {
+        margin: 0;
+        padding: 0;
+        overflow: hidden;
+        padding-top: 64px;
+    }
+    div.toolbar {
+        border: none;
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        width: 100%;
+        height: 50px;
+        background-color: #eee;
+        xvisibility: hidden;
+    }
+    div.toolbar2 {
+        border: none;
+        position: absolute;
+        top: 50px;
+        left: 0px;
+        width: 100%;
+        height: 14px;
+        background-color: #ddd;
+        xvisibility: hidden;
+    }
+    
+    iframe.contentframe {
+        border: none;
+    }
+    div#_contentWrapper {
+        border: none;
+    }
+</style>
+
+<body onload="init()">
+
+    <div class="toolbar" id="_toolbar">
+    </div>
+    <div class="toolbar2" id="_toolbar2">
+    </div>
+    <div style="border: 1px solid black; display: none">
+        Formatting
+        <pre id="_formatting" style="background-color: #eee">
+</pre>
+    </div>
+
+    <div id="_editor"></div>
+
+
+</body>
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8565b796/consumers/web/client/index.html
----------------------------------------------------------------------
diff --git a/consumers/web/client/index.html b/consumers/web/client/index.html
index 9a28b67..175cec7 100644
--- a/consumers/web/client/index.html
+++ b/consumers/web/client/index.html
@@ -17,7 +17,7 @@ function init()
     iface = new UXInterface(core);
     iface.setup(function() {
         console.log("iface setup complete");
-    });
+    }, "sample.html", "../../../Editor/src", ".");
 //    core.callbacks = iface.callbacks;
 //    core.setup(function() {
 //        core.op.cursor.test(3,4,5);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8565b796/consumers/web/client/interface.js
----------------------------------------------------------------------
diff --git a/consumers/web/client/interface.js b/consumers/web/client/interface.js
index 073d590..ec2deb2 100644
--- a/consumers/web/client/interface.js
+++ b/consumers/web/client/interface.js
@@ -255,17 +255,17 @@ function UXInterface(core)
         buttons.listOL.setValue(inOL);
     }
 
-    function setup(completion)
+    function setup(completion, iframeSrc, editorSrc, resources)
     {
         var toolbar = document.getElementById("_toolbar");
 
-        buttons.bold = new Button("images/bold");
-        buttons.italic = new Button("images/italic");
-        buttons.underline = new Button("images/underline");
-        buttons.listUL = new Button("images/list-ul");
-        buttons.listOL = new Button("images/list-ol");
-        buttons.listOutdent = new Button("images/outdent");
-        buttons.listIndent = new Button("images/indent");
+        buttons.bold = new Button(resources + "/images/bold");
+        buttons.italic = new Button(resources + "/images/italic");
+        buttons.underline = new Button(resources + "/images/underline");
+        buttons.listUL = new Button(resources + "/images/list-ul");
+        buttons.listOL = new Button(resources + "/images/list-ol");
+        buttons.listOutdent = new Button(resources + "/images/outdent");
+        buttons.listIndent = new Button(resources + "/images/indent");
 
         toolbar.appendChild(buttons.bold.element);
         toolbar.appendChild(buttons.italic.element);
@@ -301,7 +301,7 @@ function UXInterface(core)
 
             if (completion != null)
                 completion();
-        });
+        }, iframeSrc, editorSrc, resources);
     }
 
     callbacks = {

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8565b796/consumers/web/client/uxeditor.js
----------------------------------------------------------------------
diff --git a/consumers/web/client/uxeditor.js b/consumers/web/client/uxeditor.js
index b071297..45fe5e4 100644
--- a/consumers/web/client/uxeditor.js
+++ b/consumers/web/client/uxeditor.js
@@ -16,6 +16,7 @@
 // under the License.
 
 var IMPL_DIR = "../../../Editor/src";
+var RESOURCES_DIR = ".";
 
 function UXEditor(element)
 {
@@ -30,9 +31,11 @@ function UXEditor(element)
     console.log("UXEditor: element = "+element);
     console.log("UXEditor: doc = "+doc);
 
-    function setup(completion)
+    function setup(completion, iframeSrc, editorSrc, resources)
     {
         setupCompletion = completion;
+        IMPL_DIR = editorSrc;
+        RESOURCES_DIR = resources;
         iframeWrapper = doc.createElement("div");
 //        iframeWrapper.setAttribute("id","_contentWrapper");
         iframeWrapper.setAttribute("tabindex","0");
@@ -41,7 +44,7 @@ function UXEditor(element)
         iframe = doc.createElement("iframe");
         iframe.setAttribute("id","_content");
         iframe.addEventListener("load",iframeLoaded);
-        iframe.setAttribute("src","sample.html");
+        iframe.setAttribute("src", iframeSrc); //"sample.html";
         iframe.style.border = "none";
 //        iframe.setAttribute("class","contentframe");
 
@@ -135,35 +138,8 @@ function UXEditor(element)
         if (!doneScriptInit) {
             doneScriptInit = true;
             console.log("Now we should init");
-/*
-            self.cwin.Editor_debug = Editor_debug;
-            self.cwin.Editor_error = Editor_error;
-            self.cwin.Editor_addOutlineItem = Editor_addOutlineItem;
-            self.cwin.Editor_updateOutlineItem = Editor_updateOutlineItem;
-            self.cwin.Editor_removeOutlineItem = Editor_removeOutlineItem;
-            self.cwin.Editor_outlineUpdated = Editor_outlineUpdated;
-            self.cwin.Editor_setCursor = Editor_setCursor;
-            self.cwin.Editor_setSelectionHandles = Editor_setSelectionHandles;
-            self.cwin.Editor_setTableSelection = Editor_setTableSelection;
-            self.cwin.Editor_setSelectionBounds = Editor_setSelectionBounds;
-            self.cwin.Editor_clearSelectionHandlesAndCursor = Editor_clearSelectionHandlesAndCursor;
-            self.cwin.Editor_updateAutoCorrect = Editor_updateAutoCorrect;
-            self.cwin.debug = Editor_debug;
-*/
-//            self.cwin.debug("loadedScript: before calling Main_init");
-//            self.cwin.eval("Main_init(800,150,'../uxwrite/resources/builtin.css',false)");
-            self.cwin.Main_init(800,150,"builtin.css",false);
-//            self.cwin.debug("loadedScript: after calling Main_init");
 
-//            self.cdoc.documentElement.addEventListener("mousedown",mouseDown,true);
-//            self.cdoc.documentElement.addEventListener("mouseup",mouseUp,true);
-//            self.cdoc.documentElement.addEventListener("mousemove",mouseMove,true);
-
-//            ifwrapper.addEventListener("keydown",keyDown,true);
-//            ifwrapper.addEventListener("keyup",keyUp,true);
-//            ifwrapper.addEventListener("keypress",keyPress,true);
-//            ifwrapper.focus();
-//            document.body.focus();
+            self.cwin.Main_init(800,150, RESOURCES_DIR + "/builtin.css",false);
 
             if (setupCompletion != null)
                 setupCompletion();


[07/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/2e9d2e2f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/2e9d2e2f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/2e9d2e2f

Branch: refs/heads/master
Commit: 2e9d2e2f984f78bb63754b7e1273af7a055fbbdf
Parents: 1e932ac 1a48f7c
Author: franzdecopenhague <fr...@outlook.com>
Authored: Tue Mar 24 01:43:47 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Tue Mar 24 01:43:47 2015 +0000

----------------------------------------------------------------------
 consumers/web/WARNING_EXPERIMENTAL        |    7 +
 sample_code/objc_bindings/EDJSInterface.h |  367 +++++
 sample_code/objc_bindings/EDJSInterface.m | 1788 ++++++++++++++++++++++++
 sample_code/objc_bindings/WARNING         |   12 +
 4 files changed, 2174 insertions(+)
----------------------------------------------------------------------



[04/17] incubator-corinthia git commit: Added put convert to dfwebserver python binding

Posted by fr...@apache.org.
Added put convert to dfwebserver python binding


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/748d7078
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/748d7078
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/748d7078

Branch: refs/heads/master
Commit: 748d707808170795dd82caae4d4dd5c89cf1eb1b
Parents: 2a53613
Author: franzdecopenhague <fr...@outlook.com>
Authored: Mon Mar 16 12:35:01 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Mon Mar 16 12:35:01 2015 +0000

----------------------------------------------------------------------
 consumers/dfwebserver/makefile          |  6 ++--
 consumers/dfwebserver/src/dfconvert.c   | 52 ++++++++++++++++++++++++++--
 consumers/dfwebserver/test.py           | 28 +++++++++++++--
 consumers/dfwebserver/testSubprocess.py | 39 +++++++++++++++++++++
 4 files changed, 118 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/748d7078/consumers/dfwebserver/makefile
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/makefile b/consumers/dfwebserver/makefile
index 46cb1f2..a4e3661 100644
--- a/consumers/dfwebserver/makefile
+++ b/consumers/dfwebserver/makefile
@@ -10,7 +10,7 @@
 #  cat files.txt | sudo xargs rm -rf      
 
 #develoment build
-#  make dev
+#  make clean dev
 #  python test.py
 
 LDFLAGS ?= ""
@@ -29,5 +29,7 @@ build_ext:
 clean:
 	- rm -rf build
 	- rm -rf consumers
-	- rm -f output.html
+	- rm -f output*.html
+	- rm -f output*.docx
+	- rm -f dummy*.docx
 	- find ./ -name '*.so' -delete

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/748d7078/consumers/dfwebserver/src/dfconvert.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/src/dfconvert.c b/consumers/dfwebserver/src/dfconvert.c
index b4d88f2..99698fc 100644
--- a/consumers/dfwebserver/src/dfconvert.c
+++ b/consumers/dfwebserver/src/dfconvert.c
@@ -4,9 +4,12 @@ typedef struct DFError DFError;
 void DFErrorRelease(DFError *error);
 const char *DFErrorMessage(DFError **error);
 
-int DFGetFile(const char *concreteFilename,
-              const char *abstractFilename,
-              DFError **error);
+// Abstraction level 1
+
+int DFGetFile(const char *concrete, const char *abstract, DFError **error);
+int DFPutFile(const char *concrete, const char *abstract, DFError **error);
+int DFCreateFile(const char *concrete, const char *abstract, DFError **error);
+              
 
 static PyObject* get_func(PyObject* self, PyObject* args)
 {
@@ -28,10 +31,53 @@ static PyObject* get_func(PyObject* self, PyObject* args)
     Py_RETURN_FALSE;
 }
 
+static PyObject* put_func(PyObject* self, PyObject* args)
+{
+    DFError *error = NULL;
+    
+    char * concrete = NULL;
+    char * abstract = NULL;
+    
+    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
+        return NULL;
+    }    
+    
+    if (DFPutFile(concrete, abstract, &error)) {
+        Py_RETURN_TRUE;
+    }
+
+    fprintf(stderr,"%s\n",DFErrorMessage(&error));
+    DFErrorRelease(error);
+    Py_RETURN_FALSE;
+}
+
+static PyObject* create_func(PyObject* self, PyObject* args)
+{
+    DFError *error = NULL;
+    
+    char * concrete = NULL;
+    char * abstract = NULL;
+    
+    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
+        return NULL;
+    }    
+    
+    if (DFCreateFile(concrete, abstract, &error)) {
+        Py_RETURN_TRUE;
+    }
+
+    fprintf(stderr,"%s\n",DFErrorMessage(&error));
+    DFErrorRelease(error);
+    Py_RETURN_FALSE;
+}
+
+
 /*  define functions in module */
 static PyMethodDef dfconvertMethods[] =
 {
      {"get", get_func, METH_VARARGS, "Create a new HTML file from input document"},
+     {"put", put_func, METH_VARARGS, "Update an existing Word document based on a modified HTML file."},
+     {"create", create_func, METH_VARARGS, "Create a new Word document from a HTML file. The Word document must not already exist."},
      {NULL, NULL, 0, NULL}
 };
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/748d7078/consumers/dfwebserver/test.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/test.py b/consumers/dfwebserver/test.py
index 936042b..13ee982 100644
--- a/consumers/dfwebserver/test.py
+++ b/consumers/dfwebserver/test.py
@@ -1,5 +1,29 @@
+# To test:
+#
+# make clean dev
+# python test.py
+
+import unittest
+
 import dfutil
 import dfconvert
+import shutil
+
+
+class MyTest(unittest.TestCase):
+    def test(self):
+        
+        self.assertTrue(dfutil.normalize("other.html"))
+
+        self.assertTrue(dfconvert.get("input.docx", "output.html"))
+        
+        shutil.copyfile("input.docx", "dummy.docx");
+        
+        self.assertTrue(dfconvert.put("dummy.docx", "output.html"))
+        
+        self.assertTrue(dfconvert.create("output.docx", "output.html"))
+        
+        
+if __name__ == '__main__':
+    unittest.main()        
 
-print dfutil.normalize("other.html")
-print dfconvert.get("input.docx", "output.html");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/748d7078/consumers/dfwebserver/testSubprocess.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/testSubprocess.py b/consumers/dfwebserver/testSubprocess.py
new file mode 100644
index 0000000..7a67b1b
--- /dev/null
+++ b/consumers/dfwebserver/testSubprocess.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+
+import threading
+import time
+
+import dfconvert
+
+exitFlag = 0
+
+class dfconvertThread (threading.Thread):
+    def __init__(self, threadID, name, input, abstract):
+        threading.Thread.__init__(self)
+        self.threadID = threadID
+        self.name = name
+        self.input = input
+        self.abstract = abstract
+    def run(self):
+        print "Starting " + self.name
+        if exitFlag:
+            thread.exit()
+        status = dfconvert.get(self.input, self.abstract);
+        print "%s: %s status:%s" % (self.name, time.ctime(time.time()), status)
+        print "Exiting " + self.name
+
+# Create new threads
+thread1 = dfconvertThread(1, "Thread-1", "input.docx", "output1.html")
+thread2 = dfconvertThread(2, "Thread-2", "input.docx", "output2.html")
+thread3 = dfconvertThread(3, "Thread-3", "input.docx", "output3.html")
+thread4 = dfconvertThread(4, "Thread-4", "input.docx", "output4.html")
+thread5 = dfconvertThread(5, "Thread-5", "input.docx", "output5.html")
+
+# Start new Threads
+thread1.start()
+thread2.start()
+thread3.start()
+thread4.start()
+thread5.start()
+
+print "Exiting Main Thread"
\ No newline at end of file


[09/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/9b84249e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/9b84249e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/9b84249e

Branch: refs/heads/master
Commit: 9b84249e49e6dc68ae9de25db414483262953db9
Parents: 8565b79 1b12e2e
Author: franzdecopenhague <fr...@outlook.com>
Authored: Wed Mar 25 17:40:29 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Wed Mar 25 17:40:29 2015 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[15/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/5033c0fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/5033c0fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/5033c0fe

Branch: refs/heads/master
Commit: 5033c0fe8253bfab5afef2d0186f5911304a65b8
Parents: 411171e 80abb72
Author: franzdecopenhague <fr...@outlook.com>
Authored: Mon Apr 20 14:16:06 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Mon Apr 20 14:16:06 2015 +0000

----------------------------------------------------------------------
 CorinthiaDirectoryTree.html                |  222 +++
 consumers/dfconvert/src/main.c             |    2 +
 sample/README.txt                          |    3 +
 sample/code/objc_bindings/EDJSInterface.h  |  367 +++++
 sample/code/objc_bindings/EDJSInterface.m  | 1788 +++++++++++++++++++++++
 sample/code/objc_bindings/WARNING          |   12 +
 sample/documents/INDEX                     |   29 +
 sample/documents/docx/we-need-more-samples |    0
 sample/documents/html/h1-6_center_p.html   |   27 +
 sample/documents/html/lists.html           |   18 +
 sample/documents/html/simple_1.html        |   18 +
 sample/documents/html/table.html           |   33 +
 sample/documents/odf/we-need-more-samples  |    0
 sample/documents/tex/we-need-more-samples  |    0
 sample/documents/we-need-more-samples      |    0
 sample_code/objc_bindings/EDJSInterface.h  |  367 -----
 sample_code/objc_bindings/EDJSInterface.m  | 1788 -----------------------
 sample_code/objc_bindings/WARNING          |   12 -
 sample_documents/INDEX                     |   29 -
 sample_documents/docx/we-need-more-samples |    0
 sample_documents/html/h1-6_center_p.html   |   27 -
 sample_documents/html/lists.html           |   18 -
 sample_documents/html/simple_1.html        |   18 -
 sample_documents/html/table.html           |   33 -
 sample_documents/odf/we-need-more-samples  |    0
 sample_documents/tex/we-need-more-samples  |    0
 sample_documents/we-need-more-samples      |    0
 27 files changed, 2519 insertions(+), 2292 deletions(-)
----------------------------------------------------------------------



[13/17] incubator-corinthia git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia

Posted by fr...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-corinthia


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/957f173c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/957f173c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/957f173c

Branch: refs/heads/master
Commit: 957f173ca8717263b8e34679ec926ec67ae3a45a
Parents: 01c924d ee6e817
Author: franzdecopenhague <fr...@outlook.com>
Authored: Sat Apr 4 01:47:55 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Sat Apr 4 01:47:55 2015 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[06/17] incubator-corinthia git commit: Added apache license

Posted by fr...@apache.org.
Added apache license


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/1e932acd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/1e932acd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/1e932acd

Branch: refs/heads/master
Commit: 1e932acd81c91f94b2df9789e78d4bcafe74e756
Parents: 81b5177
Author: franzdecopenhague <fr...@outlook.com>
Authored: Tue Mar 24 01:43:35 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Tue Mar 24 01:43:35 2015 +0000

----------------------------------------------------------------------
 consumers/dfwebserver/makefile          | 13 +++++++++++++
 consumers/dfwebserver/setup.py          | 13 +++++++++++++
 consumers/dfwebserver/src/dfconvert.c   | 17 +++++++++++++++++
 consumers/dfwebserver/src/dfutil.c      | 17 +++++++++++++++++
 consumers/dfwebserver/test.py           | 13 +++++++++++++
 consumers/dfwebserver/testSubprocess.py | 13 +++++++++++++
 6 files changed, 86 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1e932acd/consumers/dfwebserver/makefile
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/makefile b/consumers/dfwebserver/makefile
index a4e3661..b3546c3 100644
--- a/consumers/dfwebserver/makefile
+++ b/consumers/dfwebserver/makefile
@@ -1,3 +1,16 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 #build
 #  make

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1e932acd/consumers/dfwebserver/setup.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/setup.py b/consumers/dfwebserver/setup.py
index d3cdf47..8675b22 100644
--- a/consumers/dfwebserver/setup.py
+++ b/consumers/dfwebserver/setup.py
@@ -1,3 +1,16 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 from distutils.core import setup, Extension
 
 # define the extension module

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1e932acd/consumers/dfwebserver/src/dfconvert.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/src/dfconvert.c b/consumers/dfwebserver/src/dfconvert.c
index 99698fc..b284222 100644
--- a/consumers/dfwebserver/src/dfconvert.c
+++ b/consumers/dfwebserver/src/dfconvert.c
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
 #include <Python.h>
 
 typedef struct DFError DFError;

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1e932acd/consumers/dfwebserver/src/dfutil.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/src/dfutil.c b/consumers/dfwebserver/src/dfutil.c
index 8c50aa9..9e7b689 100644
--- a/consumers/dfwebserver/src/dfutil.c
+++ b/consumers/dfwebserver/src/dfutil.c
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
 #include <Python.h>
 
 typedef struct DFError DFError;

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1e932acd/consumers/dfwebserver/test.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/test.py b/consumers/dfwebserver/test.py
index 13ee982..213ee2b 100644
--- a/consumers/dfwebserver/test.py
+++ b/consumers/dfwebserver/test.py
@@ -1,3 +1,16 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 # To test:
 #
 # make clean dev

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1e932acd/consumers/dfwebserver/testSubprocess.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/testSubprocess.py b/consumers/dfwebserver/testSubprocess.py
index 7a67b1b..e3bcfa6 100644
--- a/consumers/dfwebserver/testSubprocess.py
+++ b/consumers/dfwebserver/testSubprocess.py
@@ -1,5 +1,18 @@
 #!/usr/bin/python
 
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 import threading
 import time
 


[11/17] incubator-corinthia git commit: Added node support and server example

Posted by fr...@apache.org.
Added node support and server example


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/ee179e37
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/ee179e37
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/ee179e37

Branch: refs/heads/master
Commit: ee179e37d800be19f260c8c04682b880528ccbbb
Parents: 0c00414
Author: franzdecopenhague <fr...@outlook.com>
Authored: Thu Mar 26 12:41:48 2015 +0000
Committer: franzdecopenhague <fr...@outlook.com>
Committed: Thu Mar 26 12:41:48 2015 +0000

----------------------------------------------------------------------
 consumers/dfwebserver/.gitignore                |    1 +
 consumers/dfwebserver/assets/input.docx         |  Bin 0 -> 12833 bytes
 .../dfwebserver/examples/node/server/.gitignore |    1 +
 .../examples/node/server/package.json           |   17 +
 .../dfwebserver/examples/node/server/server.js  |    9 +
 consumers/dfwebserver/examples/node/simple.js   |   10 +
 consumers/dfwebserver/input.docx                |  Bin 12833 -> 0 bytes
 consumers/dfwebserver/makefile                  |   48 -
 consumers/dfwebserver/node/.gitignore           |    3 +
 consumers/dfwebserver/node/.npmignore           |    0
 consumers/dfwebserver/node/LICENSE              |   16 +
 consumers/dfwebserver/node/package.json         |   16 +
 consumers/dfwebserver/node/src/docformats.js    |   27 +
 consumers/dfwebserver/other.html                |    1 -
 .../dfwebserver/pool/sample.docx/sample.html    | 1130 ------------------
 consumers/dfwebserver/setup.py                  |   64 -
 consumers/dfwebserver/src/dfconvert.c           |  108 --
 consumers/dfwebserver/src/dfutil.c              |   64 -
 consumers/dfwebserver/test.py                   |   42 -
 consumers/dfwebserver/testSubprocess.py         |   52 -
 consumers/web/client/reset.css                  |  209 ++++
 21 files changed, 309 insertions(+), 1509 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/.gitignore
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/.gitignore b/consumers/dfwebserver/.gitignore
new file mode 100644
index 0000000..e783591
--- /dev/null
+++ b/consumers/dfwebserver/.gitignore
@@ -0,0 +1 @@
+pool
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/assets/input.docx
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/assets/input.docx b/consumers/dfwebserver/assets/input.docx
new file mode 100644
index 0000000..9de8bc3
Binary files /dev/null and b/consumers/dfwebserver/assets/input.docx differ

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/examples/node/server/.gitignore
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/examples/node/server/.gitignore b/consumers/dfwebserver/examples/node/server/.gitignore
new file mode 100644
index 0000000..b512c09
--- /dev/null
+++ b/consumers/dfwebserver/examples/node/server/.gitignore
@@ -0,0 +1 @@
+node_modules
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/examples/node/server/package.json
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/examples/node/server/package.json b/consumers/dfwebserver/examples/node/server/package.json
new file mode 100644
index 0000000..215730a
--- /dev/null
+++ b/consumers/dfwebserver/examples/node/server/package.json
@@ -0,0 +1,17 @@
+{
+  "name": "server_example",
+  "version": "1.0.0",
+  "description": "",
+  "main": "server.js",
+  "dependencies": {
+    "express": "^4.12.3",
+    "multer": "^0.1.8"
+  },
+  "devDependencies": {},
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1",
+    "start": "node server.js"
+  },
+  "author": "",
+  "license": "apache2"
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/examples/node/server/server.js
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/examples/node/server/server.js b/consumers/dfwebserver/examples/node/server/server.js
new file mode 100644
index 0000000..516bf26
--- /dev/null
+++ b/consumers/dfwebserver/examples/node/server/server.js
@@ -0,0 +1,9 @@
+var express = require('express'),
+    multer  = require('multer')
+
+var path = require('path');
+var fs = require('fs');
+
+//var mime = require('mime');
+
+

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/examples/node/simple.js
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/examples/node/simple.js b/consumers/dfwebserver/examples/node/simple.js
new file mode 100644
index 0000000..4b2b0cf
--- /dev/null
+++ b/consumers/dfwebserver/examples/node/simple.js
@@ -0,0 +1,10 @@
+var docformats = require('../../node/src/docformats');
+var path = require("path");
+
+docformats.options.binaryPath = path.resolve('../../../../build/bin');
+
+var input = path.resolve('../../assets/input.docx');
+var abstract = path.resolve('../../pool/input.docx/input.html');
+
+var status = docformats.get(input, abstract);
+console.log(status);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/input.docx
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/input.docx b/consumers/dfwebserver/input.docx
deleted file mode 100644
index 9de8bc3..0000000
Binary files a/consumers/dfwebserver/input.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/makefile
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/makefile b/consumers/dfwebserver/makefile
deleted file mode 100644
index b3546c3..0000000
--- a/consumers/dfwebserver/makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-#build
-#  make
-
-#install
-#  sudo python setup.py install
-
-#unistall 
-#  sudo python setup.py install --record files.txt
-#  cat files.txt | sudo xargs rm -rf      
-
-#develoment build
-#  make clean dev
-#  python test.py
-
-LDFLAGS ?= ""
-CFLAGS ?= ""
-
-.PHONY: default build_ext clean
-
-default: build_ext
-
-dev:
-	CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) python setup.py build_ext --inplace --debug
-
-build_ext:
-	CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) python setup.py build_ext --debug
-
-clean:
-	- rm -rf build
-	- rm -rf consumers
-	- rm -f output*.html
-	- rm -f output*.docx
-	- rm -f dummy*.docx
-	- find ./ -name '*.so' -delete

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/node/.gitignore
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/node/.gitignore b/consumers/dfwebserver/node/.gitignore
new file mode 100644
index 0000000..2f6141d
--- /dev/null
+++ b/consumers/dfwebserver/node/.gitignore
@@ -0,0 +1,3 @@
+node_modules
+npm-debug.log
+.DS_Store
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/node/.npmignore
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/node/.npmignore b/consumers/dfwebserver/node/.npmignore
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/node/LICENSE
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/node/LICENSE b/consumers/dfwebserver/node/LICENSE
new file mode 100644
index 0000000..90705e0
--- /dev/null
+++ b/consumers/dfwebserver/node/LICENSE
@@ -0,0 +1,16 @@
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/node/package.json
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/node/package.json b/consumers/dfwebserver/node/package.json
new file mode 100644
index 0000000..5a3746b
--- /dev/null
+++ b/consumers/dfwebserver/node/package.json
@@ -0,0 +1,16 @@
+{
+  "name": "docformats",
+  "version": "0.0.2",
+  "description": "Wrapper for DocFormats API",
+  "main": "src/docformats.js",
+  "dependencies": {
+    "mkdirp": "^0.5.0"
+  },
+  "devDependencies": {},
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "franzdecopenhague",
+  "license": "apache2"
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/node/src/docformats.js
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/node/src/docformats.js b/consumers/dfwebserver/node/src/docformats.js
new file mode 100644
index 0000000..f94a751
--- /dev/null
+++ b/consumers/dfwebserver/node/src/docformats.js
@@ -0,0 +1,27 @@
+'use strict';
+
+var path = require('path');
+var exec = require('child_process').execFileSync;
+var mkdirp = require("mkdirp").sync;
+
+var df = exports;
+
+df.options = {binaryPath : null};
+
+df.get = function (input, abstract) {
+    try {
+        var cmd = null;
+        if (df.options.binaryPath === undefined || df.options.binaryPath === null) {
+            cmd = 'dfconvert';
+        } else {
+            cmd = path.join(df.options.binaryPath, 'dfconvert');
+        }
+        console.log(cmd + " get " + input + " " + abstract + "");
+        mkdirp(path.dirname(abstract));
+        exec(cmd, ['get', input, abstract]);
+    } catch (ex) {
+        console.log(ex);
+        return false;
+    }
+    return true;
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/other.html
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/other.html b/consumers/dfwebserver/other.html
deleted file mode 100644
index 14778ef..0000000
--- a/consumers/dfwebserver/other.html
+++ /dev/null
@@ -1 +0,0 @@
-<begin>text</begin>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/pool/sample.docx/sample.html
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/pool/sample.docx/sample.html b/consumers/dfwebserver/pool/sample.docx/sample.html
deleted file mode 100644
index c7a584a..0000000
--- a/consumers/dfwebserver/pool/sample.docx/sample.html
+++ /dev/null
@@ -1,1130 +0,0 @@
-<!DOCTYPE html>
-
-<html lang="en-AU">
-<head>
-  <meta charset="utf-8">
-  <meta name="generator" content="UX Write 2.0.2 (build 4b4faea); iOS 7.1">
-
-  <title></title>
-  <style>
-blockquote {
-    font-style: italic;
-  }
-
-  body {
-    counter-reset: h1 h2 h3 h4 h5 h6 figure table;
-    font-family: Palatino;
-    xmargin: 10%;
-    text-align: justify;
-  }
-
-  caption {
-    caption-side: bottom;
-    counter-increment: table;
-  }
-
-  caption.Unnumbered {
-    counter-increment: table 0;
-  }
-
-  caption.Unnumbered::before, figcaption.Unnumbered::before {
-    content: "";
-  }
-
-  caption::before {
-    content: "Table " counter(table) ": ";
-  }
-
-  figcaption {
-    counter-increment: figure;
-  }
-
-  figcaption.Unnumbered {
-    counter-increment: figure 0;
-  }
-
-  figcaption::before {
-    content: "Figure " counter(figure) ": ";
-  }
-
-  figure {
-    margin-bottom: 12pt;
-    margin-left: auto;
-    margin-right: auto;
-    margin-top: 12pt;
-    text-align: center;
-  }
-
-  h1 {
-    counter-increment: h1;
-    counter-reset: h2 h3 h4 h5 h6;
-  }
-
-  h1.Unnumbered, h2.Unnumbered, h3.Unnumbered, h4.Unnumbered, h5.Unnumbered, h6.Unnumbered {
-  }
-
-  h1::before {
-    content: counter(h1) " ";
-  }
-
-  h2 {
-    color: #585958;
-    counter-increment: h2;
-    counter-reset: h3 h4 h5 h6;
-  }
-
-  h2::before {
-    content: counter(h1) "." counter(h2) " ";
-  }
-
-  h3 {
-    counter-increment: h3;
-    counter-reset: h4 h5 h6;
-  }
-
-  h3::before {
-    content: counter(h1) "." counter(h2) "." counter(h3) " ";
-  }
-
-  h4 {
-    counter-increment: h4;
-    counter-reset: h5 h6;
-  }
-
-  h4::before {
-    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) " ";
-  }
-
-  h5 {
-    counter-increment: h5;
-    counter-reset: h6;
-  }
-
-  h5::before {
-    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " ";
-  }
-
-  h6 {
-    counter-increment: h6;
-  }
-
-  h6::before {
-    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " ";
-  }
-
-  nav.listoffigures::before {
-    content: "List of Figures";
-    display: block;
-    font-size: 2em;
-    font-weight: bold;
-    margin-bottom: .67em;
-    margin-top: .67em;
-  }
-
-  nav.listoftables::before {
-    content: "List of Tables";
-    display: block;
-    font-size: 2em;
-    font-weight: bold;
-    margin-bottom: .67em;
-    margin-top: .67em;
-  }
-
-  nav.tableofcontents::before {
-    content: "Contents";
-    display: block;
-    font-size: 2em;
-    font-weight: bold;
-    margin-bottom: .67em;
-    margin-top: .67em;
-  }
-
-  p {
-    line-height: 166%;
-  }
-
-  p.abstract {
-    font-style: italic;
-    margin-left: 20%;
-    margin-right: 20%;
-  }
-
-  p.author {
-    font-size: 18pt;
-    text-align: center;
-  }
-
-  p.NoSpacing {
-    margin: 0%;
-  }
-
-  p.SpecialNote {
-    color: red;
-    font-weight: bold;
-    text-align: center;
-  }
-
-  p.Tip {
-    background-color: #eeeeee;
-    border: hidden;
-    border-radius: 10px;
-    margin-left: 5%;
-    margin-right: 5%;
-    padding: 10pt;
-  }
-
-  p.Title {
-    font-size: 36pt;
-    font-weight: bold;
-    margin-bottom: 24pt;
-    text-align: center;
-    text-decoration: underline;
-  }
-
-  p.toc1 {
-    margin-bottom: 6pt;
-    margin-left: 0pt;
-    margin-top: 12pt;
-  }
-
-  p.toc2 {
-    margin-bottom: 6pt;
-    margin-left: 24pt;
-    margin-top: 6pt;
-  }
-
-  p.toc3 {
-    margin-bottom: 6pt;
-    margin-left: 48pt;
-    margin-top: 6pt;
-  }
-
-  table {
-    border-collapse: collapse;
-    margin-left: auto;
-    margin-right: auto;
-  }
-
-  td > :first-child, th > :first-child {
-    margin-top: 0;
-  }
-
-  td > :last-child, th > :last-child {
-    margin-bottom: 0;
-  }
-
-  td, th {
-    border: 1px solid black;
-  }
-  </style>
-</head>
-
-<body>
-
-  <h1 id="item9">Introduction</h1>
-
-  <p>UX Write is designed for long-form, professional writing tasks such as
-  reports, research papers, theses, and books. With an emphasis on technical
-  and academic writing, it provides tools to work with the <i>content</i> and
-  <i>structure</i> of your document separately from its <i>presentation</i>.
-  The latter is controlled by <i>styles</i>, such as headings, normal
-  paragraphs, and the document title.</p>
-
-  <h2 id="item19">What you see is what you mean</h2>
-
-  <p>The design philosophy of UX Write is “what you see is what you mean”, or
-  WYSIWYM. By separating content from presentation, and making the logical
-  structure of documents explicit, it is possible for the layout and rendering
-  of text to adapt to the output medium. This means your documents look just as
-  good on a 30“ desktop monitor as they do on a 7” tablet or the printed
-  page.</p>
-
-  <p>The structure of your document — such as the hierarchy of section headings
-  — also enables other useful features. A table of contents is generated
-  automatically, without you having to manually update text or page numbers.
-  Cross-references can be added and kept up-to-date as section numbers change.
-  The outline view, accessible from the toolbar, displays all the sections,
-  figures, and tables in your document, allowing you to navigate around
-  easily.</p>
-
-  <p>A contrasting approach is “what you see is what you get”, or WYSIWYG,
-  supported by programs like Microsoft Word and Pages. This attempts to
-  replicate the precise layout of a printed page on screen during editing,
-  regardless of whether you're using a desktop computer or a mobile phone.
-  While useful for some purposes, we believe it's the wrong approach for a
-  mobile word processor. UX Write is unapologetically WYSIWYM, and is optimised
-  for readability and ease-of-use across both iPhone and iPad.</p>
-
-  <p class="Tip">If you've got this document open for editing, take a moment
-  now to explore the document outline (third toolbar button from right). Try
-  adjusting the text size in the “Look &amp; feel” section of the settings menu
-  (second from right) to suit your reading preferences. Rotate your screen and
-  watch as the text reflows.</p>
-
-  <h2 id="item17">File formats</h2>
-
-  <p>The native file format of UX Write is HTML — the language of the web. You
-  can view HTML documents on any device or operating system out there, and
-  publish online without any need for file conversion. If you open a Microsoft
-  Word document, it is temporarily converted to HTML for editing, and then
-  saved back again afterwards. Any parts of the document that could not be
-  converted, such as embedded spreadsheets, are preserved in the original Word
-  document.</p>
-
-  <h1 id="item8">Basic features</h1>
-
-  <h2 id="item11">Accessing your Documents</h2>
-
-  <p>You can store your documents on your device only — under
-  “My iPad” or “My iPhone” — or sync them with a cloud service such as Dropbox.
-  In the former case, you can transfer files to your computer using <a href=
-  "http://support.apple.com/kb/HT4094">iTunes file sharing</a>, and in the
-  latter case you can either access your files through the respective service's
-  website, or by installing the service's software on your computer. Box,
-  Dropbox, Google Drive, and Microsoft OneDrive all have clients available for
-  Windows and Mac which you can install for free.</p>
-
-  <p>File synchronisation happens automatically. Whenever a
-  document is saved, it is uploaded&nbsp; in the background, while you continue
-  working. If you have your computer set up for syncing, you will usually see
-  these changes appear within a few seconds. Within UX Write, you can check for
-  updates to existing documents using the refresh button.</p>
-
-  <p>If you're working offline, you can still add and change documents in any
-  of the Box, Dropbox, Google Drive, OneDrive or WebDAV locations you have set
-  up. When you have an Internet connection available again, just launch UX
-  Write, and it will attempt to upload the documents. To move, copy, or delete
-  documents, simply tap the “Edit” button in the file browser.</p>
-
-  <p class="Tip"><b>Tip:</b> We recommend creating and storing all your
-  documents on Dropbox, because it keeps backup copies of every version
-  uploaded for 30 days. You can view and recover old versions of your document
-  if the need arises — see Section <a href="#item10">4.1</a>.</p>
-
-  <h2 id="item4">Editing</h2>
-
-  <p>Text editing works in much the same way as in any other iOS app, but with
-  a few enhancements:</p>
-
-  <ul>
-    <li>
-      <p>An extra row of keys above the keyboard provides access to common
-      punctuation symbols</p>
-    </li>
-
-    <li>
-      <p>The two leftmost keys let you move the cursor or select text by
-      holding them down to bring up a virtual trackpad. Swipe with one finger
-      to move slowly, and two fingers to move faster.</p>
-    </li>
-
-    <li>
-      <p>The formatting key, when held down, replaces the other top-row keys
-      with keys for basic formatting options like bold, italic, and lists</p>
-    </li>
-
-    <li>
-      <p>The autocorrect key allows you to confirm or revert the latest
-      autocorrect replacement (see Section <a href="#item2">2.5</a> for more
-      details)</p>
-    </li>
-
-    <li>
-      <p>You can triple-tap anywhere in the text to select the whole
-      paragraph</p>
-    </li>
-  </ul>
-
-  <p>Note: The keyboard extensions are only available on the iPad.</p>
-
-  <p>UX Write also includes full support for external bluetooth keyboards, and
-  supports all of the standard keyboard shortcuts:</p>
-
-  <table style="width: 100%;" id="item7">
-    <caption>
-      Keyboard shortcuts
-    </caption>
-
-    <colgroup>
-      <col width="50%">
-      <col width="50%">
-    </colgroup>
-
-    <tbody>
-      <tr>
-        <td>
-          <p>Cmd-B</p>
-        </td>
-
-        <td>
-          <p>Bold</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Cmd-I</p>
-        </td>
-
-        <td>
-          <p>Italic</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Cmd-U</p>
-        </td>
-
-        <td>
-          <p>Underline</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Cmd-X</p>
-        </td>
-
-        <td>
-          <p>Cut</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Cmd-C</p>
-        </td>
-
-        <td>
-          <p>Copy</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Cmd-V</p>
-        </td>
-
-        <td>
-          <p>Paste</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Cmd-A</p>
-        </td>
-
-        <td>
-          <p>Select all</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Option-Left/Right</p>
-        </td>
-
-        <td>
-          <p>Move back or forward one word</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Option-Up/Down</p>
-        </td>
-
-        <td>
-          <p>Move up or down one paragraph</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Cmd-Left/Right</p>
-        </td>
-
-        <td>
-          <p>Move to start or end of line</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Cmd-Up/Down</p>
-        </td>
-
-        <td>
-          <p>Move to start of end of document</p>
-        </td>
-      </tr>
-
-      <tr>
-        <td>
-          <p>Shift-Arrow key (+ Cmd or Option)</p>
-        </td>
-
-        <td>
-          <p>Any of the above, but for selection</p>
-        </td>
-      </tr>
-    </tbody>
-  </table>
-
-  <h2 id="item5">Styles</h2>
-
-  <p>All formatting in UX Write, with the exception of
-  bold,&nbsp;italic, underline and lists, is controlled using <i>styles</i> —
-  such as headings and normal paragraphs. A style serves two purposes:</p>
-
-  <ol>
-    <li>
-      <p>It determines the <i>formatting</i> of the text, such
-      as the font, colour, and paragraph alignment. When a style is modified,
-      all text associated with that style automatically adopts the new
-      formatting, making it easy to ensure consistent presentation throughout
-      your document.</p>
-    </li>
-
-    <li>
-      <p>It indicates the <i>purpose</i> of a piece of text,
-      such as a heading or title. UX Write uses this information for various
-      purposes, such as building a table of contents, displaying the outline
-      view, and determining the possible targets for cross-references.</p>
-    </li>
-  </ol>
-
-  <p>UX Write Basic Edition provides a plain set of built-in styles for
-  headings, block quotes, a document title, and normal text. UX Write
-  Professional Edition allows you to modify the appearance of these built-in
-  styles, as well as create your own; see Section&nbsp;<a href=
-  "#item29">3.1</a> for details.</p>
-
-  <h2 id="item6">Auto correct</h2>
-
-  <p>Automatic correction of typing mistakes can sometimes lead to unexpected
-  results, since no piece of software can accurately guess what you meant to
-  type in every case. When UX Write makes a correction, it highlights it in
-  green, and gives you the opportunity to confirm whether or not it has made
-  the right replacement.</p>
-
-  <p>Tapping on a highlighted word brings up a menu that allows you to accept
-  the correction, revert to the original, or bring up a list of more
-  suggestions, with the option to add the word to the custom dictionary. Any
-  substitutions you explicitly accept are remembered by UX Write, and will
-  occur automatically the next time you make the same typing mistake. You can
-  access the custom dictionary and list of automatic substitutions via the
-  settings menu.</p>
-
-  <h2 id="item2">Outline Navigation</h2>
-
-  <p>You can use the outline view — the third toolbar button
-  from the right — to view the structure of your document and quickly jump
-  between sections. This is particularly useful for large documents, where
-  scrolling would be a hassle.</p>
-
-  <p>The outline view is based on the headings, figures, and
-  tables in your document. For headings to be included, you must mark them as
-  such using the formatting menu. Tables and figures are always included. As
-  you modify your document by adding, removing, or changing content, the
-  outline is automatically kept up-to-date. UX Write Professional Edition also
-  allows you to edit the outline — see Section <a href="#item30">3.4</a> for
-  details.</p>
-
-  <p>In landscape mode on the iPad, you can “pin” the outline to
-  the left of your screen, and it will be displayed alongside your document. To
-  pin or unpin it, use the button at the top of the outline. To hide the
-  outline when it is pinned, press the 'X' button.</p>
-
-  <p>The outline view corresponds directly to what in the table
-  of contents, list of figures, and list of tables, if you have added any of
-  these to your document. See Section&nbsp;<a href="#item32">3.9</a> for
-  details.</p>
-
-  <h1 id="item27">Professional features</h1>
-
-  <p>This section describes features that are only available in
-  UX Write Professional Edition. You can upgrade to this by either purchasing
-  it outright, or by subscribing on a monthly basis. Go to the settings menu
-  and select “View upgrade options” to see details.</p>
-
-  <h2 id="item29">Styles</h2>
-
-  <p>Styles, introduced in Section&nbsp;<a href=
-  "#item5">2.3</a>, define both the formatting and purpose of text in your
-  document. Heading styles, for instance, denote the document outline, and are
-  used for constructing the table of contents. Each style can have different
-  formatting properties, such as fonts, colours, margins, paragraph alignment,
-  borders, and more.</p>
-
-  <p>Using styles enables you to achieve consistent formatting
-  throughout your entire document. Instead of manually changing formatting on a
-  case-by-case basis — as many other word processors encourage you to do — you
-  adjust a style once and it applies to all text in the document associated
-  with the style. This is useful for ensuring your document complies with
-  requirements from your organisation or publisher.</p>
-
-  <p>UX Write provides a number of built-in styles, based on
-  those present in HTML. There are six levels of headings, in addition
-  to&nbsp;normal paragraphs and block quotes. You can change the way any of
-  these are formatted, and also add your own custom styles for specific
-  purposes. For example, this document contains a “Tip” style, which appears as
-  a light-grey box with rounded corners, and left and right margins that place
-  it in the center of the page.</p>
-
-  <p>To manage styles, go to the formatting menu, and select
-  “Edit Styles”. This will bring up the style manager, with a list of styles on
-  the left, and formatting properties on either the top or right of the screen
-  (depending on your screen orientation).</p>
-
-  <p>To edit an existing style, simply select it in the list, and change any of
-  the formatting properties. You will see a preview displayed below the
-  controls that shows an example piece of text as it would be displayed in the
-  document.</p>
-
-  <p>To add a new style, scroll down to the bottom of the list and tap next to
-  the green '+' button. Type in your style name and press enter. You can now
-  set up the formatting for this style, and subsequently select it from the
-  formatting menu in the editor.</p>
-
-  <p>Direct formatting is still available if you want it, via
-  the item near the bottom of the formatting menu. This gives you the same
-  properties as are available in the style editor, but the changes only apply
-  to the current selection.</p>
-
-  <p>Styles you create in UX Write are compatible with Word, and
-  you can also edit and use the styles in Word itself.</p>
-
-  <p class="Tip"><b>Tip:</b> If you want to re-use your styles with multiple
-  documents, you can set up a template for creating new documents. See Section
-  <a href="#item15">3.13</a> for details.</p>
-
-  <h2 id="item39">Formatting</h2>
-
-  <p>There are two ways to adjust formatting:</p>
-
-  <ul>
-    <li>
-      <p><b>Styles.</b> You can select these from the formatting
-      menu; they apply at the paragraph level. Generally, you should use styles
-      to control formatting, as this provides structural information about the
-      document (in the case of headings), and allows you to easily change
-      formatting throughout the whole document for any given style.</p>
-    </li>
-
-    <li>
-      <p><b>Direct formatting.</b> You can also select this from
-      the formatting menu; this is intended for “one-off” cases where you wish
-      to format a particular piece of text without defining a style, such as
-      highlighting something important. You have access to all the same
-      formatting options as you do for styles. Direct formatting corresponds to
-      what you would see in the toolbar of Microsoft Word; we've deliberately
-      de-emphasised it in the user interface to encourage the use of
-      styles.</p>
-    </li>
-  </ul>
-
-  <p>All of the formatting properties directly correspond to
-  those of CSS (Cascading Style Sheets), the web standard used in conjunction
-  with HTML. In most cases, the CSS formatting properties UX Write supports can
-  also be translated directly to those of Microsoft Word; the main exception is
-  that Word has a slightly different way of handling paragraph borders and
-  margins.</p>
-
-  <p>Formatting properties are divided into two categories:
-  <i>text</i> and <i>paragraph</i>. Text properties, in the case of direct
-  formatting, can be applied to only a portion of a paragraph. The rest apply
-  to the paragraph as a whole.</p>
-
-  <h2 id="item26">Document structure</h2>
-
-  <p>Most formal documents like reports and books are divided
-  into multiple levels of <b>sections</b>, with <b>cross-references</b> between
-  them, and a <b>table of contents</b> at the front. Styles are key to
-  achieving this, because the program needs to be told which pieces of text are
-  headings — it can't simply guess that “18 point bold” means a second-level
-  heading. By using styles to mark all your headings, you can take advantage of
-  the following features:</p>
-
-  <ul>
-    <li>
-      <p>Table of contents (Insert menu)</p>
-    </li>
-
-    <li>
-      <p>Cross-references (Insert menu)</p>
-    </li>
-
-    <li>
-      <p>Automatic numbering</p>
-    </li>
-
-    <li>
-      <p>Outline editor (Outline button on toolbar)</p>
-    </li>
-  </ul>
-
-  <p>Whenever a section number changes as a result of changes
-  earlier in the document, its number is automatically updated, as are those of
-  all references that point to it, and the table of contents. The same is true
-  of figures and tables. When you print or generate a PDF, page numbers are
-  automatically calculated for you and included in the table of contents.</p>
-
-  <h2 id="item30">Outline editing</h2>
-
-  <p>You can rearrange and delete sections in the outline by
-  pressing the “Edit button”. To change the order of sections, tap and drag the
-  section name to your desired position. To delete an item, just press the red
-  button on the left, and confirm by pressing the “Delete” button that appears.
-  All changes you make in the outline editor are immediately reflected in the
-  document, including updates to numbering.</p>
-
-  <h2 id="item35">Find and replace</h2>
-
-  <p>On iPad, a search bar is visible at the top of the screen,
-  and you can just type in your search term and hit enter. Tap the down arrow
-  to view options, including replacement text. On iPhone, the search bar and
-  options are accessible via the settings menu.</p>
-
-  <p>By default, searching will look for the exact text you have
-  entered, with case sensitivity determined by whether you have selected that
-  option. Alternatively, you can search and replace text using <i>regular
-  expressions</i>, which allow you to enter patterns that can match multiple
-  snippets of text. Regular expression support is mainly intended for advanced
-  users, such as programmers, who are already familiar with the concept. If you
-  would like to learn more, we recommend the tutorial at at&nbsp;<a href=
-  "http://regexone.com">regexone.com</a>.</p>
-
-  <h2 id="item36">Spell checking</h2>
-
-  <p>The spell checking option will search through your document
-  and highlight any instances of words it finds which are not in the system or
-  custom dictionaries.</p>
-
-  <p>The language&nbsp;used is determined by the following three
-  settings, in order:</p>
-
-  <ul>
-    <li>
-      <p>Language for the current document (Settings &gt; This
-      Document &gt; Language)</p>
-    </li>
-
-    <li>
-      <p>Default language for UX Write (Settings &gt;
-      Application &gt; Language)</p>
-    </li>
-
-    <li>
-      <p>System language (set in the Settings app of your iPad
-      or iPhone)</p>
-    </li>
-  </ul>
-
-  <p>There is currently no support for handling multiple
-  languages in a single document. The set of languages available for spell
-  checking is determined by the built-in dictionaries provided by the operating
-  system, which as of 7.1 are:</p>
-
-  <ul>
-    <li>
-      <p class="NoSpacing">Danish</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">Dutch</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">English (Australia)</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">English (Canada)</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">English (United Kingdom)</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">English (United States)</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">French</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">German</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">Italian</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">Portuguese (Brazil)</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">Portuguese (Portugal)</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">Russian</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">Spanish</p>
-    </li>
-
-    <li>
-      <p class="NoSpacing">Swedish</p>
-    </li>
-  </ul>
-
-  <h2 id="item37">Word count</h2>
-
-  <p>You can view the word count for your document from the
-  settings menu. This also includes the total number of characters and
-  paragraphs.</p>
-
-  <h2 id="item31">Automatic numbering</h2>
-
-  <p>UX Write can assign numbers to all headings, figures, and
-  tables automatically. For headings, you can turn this on using the “Heading
-  numbering” option in the settings menu. For figures and tables, you can set
-  this on an individual basis either at insertion time, or by tapping on the
-  item and selecting “Figure” or “Table” in the popup menu.</p>
-
-  <p>Numbering is updated automatically as the document changes.
-  If you add or remove a heading, change it's nesting level (e.g.
-  from&nbsp;Heading 2 to Heading 1), or move sections around using the outline
-  editor, the numbers will be updated to reflect the changes. The same is also
-  true for figures and tables.</p>
-
-  <p>All cross-references, plus the table of contents, list of
-  figures, and list of tables (if present) are also kept up to date whenever
-  the numbers change. This ensures that you never have out-of-date references
-  and you don't have to remember to manually update other parts of the
-  document.&nbsp;</p>
-
-  <h2 id="item32">Table of contents</h2>
-
-  <p>While it's possible to manually create a table of contents
-  in any word processor, doing so is tedious, particularly when keeping all the
-  section titles and page numbers up to date. In UX Write, inserting a table of
-  contents causes it to be constructed automatically based on the headings,
-  just like the outline view described in Section&nbsp;<a href=
-  "#item30">3.4</a>. And like automatic numbering and the outline view, every
-  time you add or remove a section, or change its title, the table of contents
-  automatically updates to reflect the change.</p>
-
-  <p>Page numbers are <i>not</i> displayed in the table of
-  contents during editing or when saving as a HTML file, as neither has any
-  concept of distinct pages. When you print or export to PDF, the correct page
-  numbers will be filled in for you. There's no need to do this manually.</p>
-
-  <p>You can also insert a list of figures or list of tables,
-  which work similarly to the table of contents. The text shown in these comes
-  from the captions, with the numbers shown in the same way as section numbers.
-  As with the table of contents, these are always kept in sync with the rest of
-  document.</p>
-
-  <p>If your document is in HTML format, the table of contents,
-  list of figures, and list of tables will appear as links that can be clicked
-  to jump to the appropriate section when viewed in a web browser.</p>
-
-  <h2 id="item1">Cross-references</h2>
-
-  <p>You can insert a cross-reference to any section heading,
-  figure, or table in your document. When you select this option from the
-  insert menu, you'll see a document outline (the same as in the outline view),
-  and can select a target of the cross-reference.</p>
-
-  <p>References appear as hyperlinks in the document. When you
-  tap on one, you'll have the option to either go to the target of the
-  reference, or change it to point to a different section, figure, or
-  table.</p>
-
-  <p>If your reference is to a numbered heading, figure, or
-  table, the number will be updated whenever that of its target changes. If the
-  target is not numbered, the reference will contain the text instead, and will
-  also update whenever the text changes.</p>
-
-  <h2 id="item3">Footnotes and endnotes</h2>
-
-  <p>Because UX Write uses a continuous layout for editing, in
-  which the document is not divided into separate pages, footnotes are
-  displayed inline with the text<span class="footnote">A footnote looks like
-  this</span>. For consistency, and to avoid the need to jump back and forth
-  between the content and the end of the document, endnotes are handled in the
-  same way<span class="endnote">An endnote looks like this</span>.</p>
-
-  <p>HTML does not have any explicit support for either
-  footnotes or endnotes, in the sense that there is no &lt;footnote&gt; element
-  that can clearly indicate its purpose. UX Write uses &lt;span&gt; elements
-  with a class of “footnote” or “endnote” to represent these.</p>
-
-  <p>Microsoft Word documents <i>do</i> have explicit support
-  for both, so when editing a .docx file, UX Write will save them in the
-  appropriate format. When you open the document in Word, you'll see footnotes
-  at the bottom of the page, and endnotes at the end of the document.</p>
-
-  <p>To have footnotes and endnotes appear in their correct
-  positions in a print or PDF output, you must use the LaTeX typesetting option
-  (see Section&nbsp;<a href="#item23">3.12</a>). WebKit does not have the
-  capabilities to support pagination features.</p>
-
-  <h2 id="item23">Printing and PDF export</h2>
-
-  <p>Two different typesetting systems are supported for
-  producing print and PDF output. You can choose between these using the
-  “Typesetting” option under the settings menu:</p>
-
-  <ul>
-    <li>
-      <p><b>WebKit</b> (recommended). Safari's layout engine,
-      optimised for on-screen rendering of HTML content.</p>
-
-      <p>This is the layout engine used for displaying your
-      documents during editing, and the PDF files it generates match exactly
-      the formatting you see on screen; though line breaks will be different
-      for the printed page.</p>
-    </li>
-
-    <li>
-      <p><b>LaTeX</b> (new). The de-facto standard in many
-      scientific disciplines, optimised for high-quality typography and
-      paginated output.</p>
-
-      <p>Support for LaTeX is new in 2.0. Currently, only
-      limited formatting options are supported, and English is the only
-      supported language. We'll be improving this throughout the 2.x release
-      cycle, with support for other languages and many other features, such as
-      equations, bibliographies, and headers/footers.</p>
-    </li>
-  </ul>
-
-  <p>Of these two, only LaTeX is capable of correctly
-  typesetting footnotes and endnotes, as well as other pagination-dependent
-  features we'll be adding in the future. If you print or export to PDF using
-  WebKit, footnotes and endnotes will appear inline with the text, as they do
-  during editing.</p>
-
-  <h2 id="item15">Creating Templates</h2>
-
-  <p>Often you'll want to create a series of documents which all have a
-  consistent look and feel, based on styles that you have set up, as described
-  in Section <a href="#item29">3.1</a>. While UX Write does not have a “proper”
-  template feature (yet), you can get the same effect by creating a normal
-  document with your desired settings, and treating that as a starting point
-  for new documents.</p>
-
-  <p>To create a template:</p>
-
-  <ol>
-    <li>
-      <p>Create a new document, calling it “My template” (or whatever you
-      like)</p>
-    </li>
-
-    <li>
-      <p>Open the document and use the style manager to change the default
-      fonts, colours, and other formatting properties that you want</p>
-    </li>
-
-    <li>
-      <p>Create any custom styles that you will use regularly — e.g. “Title” or
-      “Abstract”</p>
-    </li>
-  </ol>
-
-  <p>To create a new document based on a template:</p>
-
-  <ol>
-    <li>
-      <p>Tap and hold on the template document in the file manager</p>
-    </li>
-
-    <li>
-      <p>Select “Duplicate”</p>
-    </li>
-
-    <li>
-      <p>Type in the name for your new document</p>
-    </li>
-
-    <li>
-      <p>Open the new document and start writing</p>
-    </li>
-  </ol>
-
-  <p>We'll be adding a more sophisticated mechanism for browsing and previewing
-  template files, along with a few nice samples, in a future update.</p>
-
-  <h1 id="item13">Common Tasks</h1>
-
-  <h2 id="item10">Dropbox Versioning</h2>
-
-  <p>One of the best features of Dropbox is that it automatically keeps old
-  versions of every file that's uploaded to it. It's always been possible to
-  log into the Dropbox website and access these old versions via their web
-  interface, but now you can do it directly from within UX Write itself.</p>
-
-  <p>If you ever need to recover an older version of a document, simply tap and
-  hold on it in the file browser, and select “Versions” in the popup menu. You
-  can then browse through all the versions that Dropbox has kept, and restore
-  the one you want. UX Write autosaves every three minutes, so if you're
-  connected to the Internet while you're working, you'll have regular snapshots
-  of your documents.<b></b></p>
-
-  <h2 id="item12">Converting from HTML to docx</h2>
-
-  <p>If you've upgraded from a previous version of UX Write and wish to convert
-  your HTML documents to .docx so they can be used with Microsoft Word, you can
-  do so as follows:</p>
-
-  <ul>
-    <li>
-      <p>Tap and hold on the document in the file browser</p>
-    </li>
-
-    <li>
-      <p>Select <b>Convert to</b> <b>docx</b></p>
-    </li>
-  </ul>
-
-  <p>Note that due to differences between the two file formats, there may be
-  some loss of formatting during the transition — for example, the rounded
-  borders used in the “Tip” style in this document can't be represented in
-  docx. For this reason, the original HTML file will be kept as a backup.</p>
-
-  <h1 id="item16">Troubleshooting</h1>
-
-  <h2 id="item18">Reporting Bugs</h2>
-
-  <p>If you encounter a crash in UX Write, you will be asked if you would like
-  to submit a bug report. This report includes a crash log indicating exactly
-  where in the program the problem occurred, as well as a redacted copy of your
-  document in which all text and images have been removed. An email window will
-  appear where you can add comments about what happened, and the bug report
-  will be sent to us when you hit “Send”. You can CC yourself a copy for
-  reference if you like.</p>
-
-  <p><b>If we can't reproduce it, we can't fix it.</b> Many people send in bug
-  reports containing just the crash log. Often, we can to determine from this
-  what went wrong, but this isn't always the case. To increase the chances of
-  us being able to fix the problem, try to provide a detailed description of
-  what you were doing right before the crash occurred.</p>
-
-  <p>The best bug reports provide a clear set of steps that explain how to
-  reproduce the problem. During beta testing of 2.0, one particularly helpful
-  person even used iPad screen recording software to make a video demonstrating
-  how to trigger a bug, edited the video in iMovie, and added an audio track
-  with narration to explain what was going on. You certainly don't have to go
-  to this much effort, but a few simple instructions in your email which
-  explain how to reliably reproduce a problem will help a lot.</p>
-
-  <p>If you encounter any other issues that do not involve a crash, such as
-  formatting inconsistencies or strange user interface behaviour, just select
-  the <b>Submit bug report</b>&nbsp;option from the settings menu and send us a
-  note. Remember, the more information, the better.</p>
-
-  <p>The app store does not provide developers with any way to directly respond
-  to bug reports included in reviews. You can say whatever you want, but
-  <b>please also let us know about your problem</b> in case we need to ask you
-  for more information in order to fix it.</p>
-
-  <h2 id="item14">Purchase and Subscription</h2>
-
-  <p>Every time you install something from the app store, iOS
-  includes a <i>receipt file</i> which is accessible to the app. This file
-  includes information about the version number of the app that you originally
-  downloaded, as well as any in-app payments you have made. UX Write looks at
-  this file to determine whether or not to enable the features in the
-  professional edition.</p>
-
-  <p>If you buy a new iPad or iPhone and install UX Write on it
-  via iTunes, this receipt file might not be present. If you have purchased or
-  subscribed to the app, it's necessary for UX Write to request a copy of the
-  receipt file from the app store so it can verify your upgrade status. You can
-  do this either from the intro screen shown at first launch, or by selecting
-  “Reactivate existing upgrade” from the settings menu.</p>
-
-  <p>If you originally purchased UX Write prior to the release
-  of version 2.0 (when it was a paid-only app), you should automatically have
-  access to the professional edition. The way UX Write determines this is by
-  looking at the receipt file and checking what the version number of the app
-  was at the time of your purchase. So if you see the app running as basic
-  edition, select “Reactivate existing upgrade” from the settings menu.</p>
-
-  <p>If you have any problems with upgrades or payments,
-  <a href="http://www.uxproductivity.com/support">please contact us</a>.</p>
-
-  <h2 id="item20">The Field Update Problem</h2>
-
-  <p>If you open a .docx file in Word after editing it in UX Write, you'll see
-  the following message:</p>
-
-  <blockquote>
-    “This document contains fields that may refer to other files. Do you want
-    to update the fields in this document?”
-  </blockquote>
-
-  <p>When you see this message, just click <b>Yes</b> (or press the <b>Y</b>
-  key).</p>
-
-  <p>Sadly, this is a symptom of a design flaw in Word, and is something only
-  Microsoft can fix. Unlike UX Write, Word does not keep the table of contents,
-  cross references, or figure/table numbers (all collectively known as
-  <b>Fields</b>) up to date automatically. Instead, it forces you to manually
-  tell it when it to update the fields after you have made changes to your
-  document.</p>
-
-  <p>Despite the fact that UX Write never actually produces fields that refer
-  to other files, this message is still displayed in every version of Word that
-  we have tested with, including Word 2013. The only way we could prevent such
-  a dialog from appearing is to store a setting in the document that tells Word
-  that there is no need to update the fields — but this would simply leave you
-  with an invalid table of contents and incorrect cross-references. While we've
-  done our best to ensure that UX Write provides the best user experience
-  within the app itself, we're not able to fix Word.</p>
-
-  <h2 id="item22">Opening .doc files</h2>
-
-  <p>Microsoft Word has used a number of different file formats over the years,
-  and UX Write only supports the most recent version, .docx, which is a modern,
-  XML-based, well-documented open standard. The older .doc format is a
-  proprietary and very complex binary file format that would take a minimum of
-  six months to support. We've decided that time is better spent on other
-  useful features instead.</p>
-
-  <p>If you have a .doc file that you wish to edit in UX Write, you can convert
-  it to .docx by opening it in any recent version of Word (2007 and later), and
-  using “Save as” to convert it to docx. Doing so will maintain all of the
-  content and formatting, and provide exactly the same experience when working
-  with the document in Word itself. You will then have your document in a much
-  more portable format, and be able to edit it in Word, UX Write, and other
-  word processors such as LibreOffice.</p>
-
-  <h1 id="item28">More information</h1>
-
-  <p>If you have a question that isn't answered here, check out
-  our <a href="http://www.uxproductivity.com/support">support website</a> for
-  more info. We also maintain a <a href=
-  "http://blog.uxproductivity.com">blog</a> discussing the development of the
-  app and new features that are in the works. Many of our posts discuss various
-  questions people have had about UX Write and may provide you with a deeper
-  understanding of why certain aspects of the app are the way they are.</p>
-
-  <p>We value any feedback you have about the app, and you can
-  send it to us any time via the option on the settings menu. We receive a
-  <i>lot</i> of email, and can't guarantee to respond individually or add every
-  requested feature, but we certainly take into account your feedback when
-  deciding on priorities for future updates.</p>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/setup.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/setup.py b/consumers/dfwebserver/setup.py
deleted file mode 100644
index 8675b22..0000000
--- a/consumers/dfwebserver/setup.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from distutils.core import setup, Extension
-
-# define the extension module
-dfutil_module = Extension('dfutil', 
-    sources=['src/dfutil.c', '../../consumers/dfutil/src/Commands.c'],
-    libraries = ['DocFormats', 'xml2'],
-    extra_compile_args = ['-std=c99'],
-    library_dirs = ['../../build/lib'],
-    include_dirs = [
-        '../../DocFormats/api/headers', 
-        '../../DocFormats/core/src/common',
-        '../../DocFormats/core/src/css', 
-        '../../DocFormats/core/src/html', 
-        '../../DocFormats/core/src/lib', 
-        '../../DocFormats/core/src/names', 
-        '../../DocFormats/core/src/xml', 
-        '../../DocFormats/core/tests/common', 
-        '../../DocFormats/core/tests/html',
-        '../../DocFormats/filters/latex/src',
-        '../../DocFormats/filters/ooxml/src/common', 
-        '../../DocFormats/filters/ooxml/src/word', 
-        '../../DocFormats/filters/ooxml/tests/word',
-        '../../DocFormats/headers',
-    ]
-)
-
-dfconvert_module = Extension('dfconvert', 
-    sources=['src/dfconvert.c'],
-    libraries = ['DocFormats', 'xml2', 'SDL2', 'SDL_image'],
-    extra_compile_args = ['-std=c99'],
-    library_dirs = ['../../build/lib'],
-    include_dirs = [
-        '../../DocFormats/api/headers', 
-        '../../DocFormats/core/src/common',
-        '../../DocFormats/core/src/css', 
-        '../../DocFormats/core/src/html', 
-        '../../DocFormats/core/src/lib', 
-        '../../DocFormats/core/src/names', 
-        '../../DocFormats/core/src/xml', 
-        '../../DocFormats/core/tests/common', 
-        '../../DocFormats/core/tests/html',
-        '../../DocFormats/filters/latex/src',
-        '../../DocFormats/filters/ooxml/src/common', 
-        '../../DocFormats/filters/ooxml/src/word', 
-        '../../DocFormats/filters/ooxml/tests/word',
-        '../../DocFormats/headers',
-    ]
-)
-
-# run the setup
-setup(ext_modules=[dfutil_module, dfconvert_module])  

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/src/dfconvert.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/src/dfconvert.c b/consumers/dfwebserver/src/dfconvert.c
deleted file mode 100644
index b284222..0000000
--- a/consumers/dfwebserver/src/dfconvert.c
+++ /dev/null
@@ -1,108 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include <Python.h>
-
-typedef struct DFError DFError;
-void DFErrorRelease(DFError *error);
-const char *DFErrorMessage(DFError **error);
-
-// Abstraction level 1
-
-int DFGetFile(const char *concrete, const char *abstract, DFError **error);
-int DFPutFile(const char *concrete, const char *abstract, DFError **error);
-int DFCreateFile(const char *concrete, const char *abstract, DFError **error);
-              
-
-static PyObject* get_func(PyObject* self, PyObject* args)
-{
-    DFError *error = NULL;
-    
-    char * concrete = NULL;
-    char * abstract = NULL;
-    
-    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
-        return NULL;
-    }    
-    
-    if (DFGetFile(concrete, abstract, &error)) {
-        Py_RETURN_TRUE;
-    }
-
-    fprintf(stderr,"%s\n",DFErrorMessage(&error));
-    DFErrorRelease(error);
-    Py_RETURN_FALSE;
-}
-
-static PyObject* put_func(PyObject* self, PyObject* args)
-{
-    DFError *error = NULL;
-    
-    char * concrete = NULL;
-    char * abstract = NULL;
-    
-    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
-        return NULL;
-    }    
-    
-    if (DFPutFile(concrete, abstract, &error)) {
-        Py_RETURN_TRUE;
-    }
-
-    fprintf(stderr,"%s\n",DFErrorMessage(&error));
-    DFErrorRelease(error);
-    Py_RETURN_FALSE;
-}
-
-static PyObject* create_func(PyObject* self, PyObject* args)
-{
-    DFError *error = NULL;
-    
-    char * concrete = NULL;
-    char * abstract = NULL;
-    
-    if (!PyArg_ParseTuple(args, "ss", &concrete, &abstract)) {
-        return NULL;
-    }    
-    
-    if (DFCreateFile(concrete, abstract, &error)) {
-        Py_RETURN_TRUE;
-    }
-
-    fprintf(stderr,"%s\n",DFErrorMessage(&error));
-    DFErrorRelease(error);
-    Py_RETURN_FALSE;
-}
-
-
-/*  define functions in module */
-static PyMethodDef dfconvertMethods[] =
-{
-     {"get", get_func, METH_VARARGS, "Create a new HTML file from input document"},
-     {"put", put_func, METH_VARARGS, "Update an existing Word document based on a modified HTML file."},
-     {"create", create_func, METH_VARARGS, "Create a new Word document from a HTML file. The Word document must not already exist."},
-     {NULL, NULL, 0, NULL}
-};
-
-
-/* module initialization */
-PyMODINIT_FUNC
-
-initdfconvert(void)
-{
-     (void) Py_InitModule("dfconvert", dfconvertMethods);
-}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/src/dfutil.c
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/src/dfutil.c b/consumers/dfwebserver/src/dfutil.c
deleted file mode 100644
index 9e7b689..0000000
--- a/consumers/dfwebserver/src/dfutil.c
+++ /dev/null
@@ -1,64 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include <Python.h>
-
-typedef struct DFError DFError;
-void DFErrorRelease(DFError *error);
-const char *DFErrorMessage(DFError **error);
-
-int normalizeFile(const char *filename, DFError **error);
-
-static PyObject* normalize_func(PyObject* self, PyObject* args)
-{
-    DFError *dferr = NULL;
-    
-    char * filename = NULL;
-    
-    if (!PyArg_ParseTuple(args, "s", &filename)) {
-        return NULL;
-        /* if the above function returns -1, an appropriate Python exception will
-        * have been set, and the function simply returns NULL
-        */
-    }
-    
-    if (filename!=NULL) {
-        if (1 == normalizeFile(filename, &dferr)) {
-            Py_RETURN_TRUE;
-        }
-        fprintf(stderr,"%s\n",DFErrorMessage(&dferr));
-        DFErrorRelease(dferr);
-    }
-    
-    Py_RETURN_FALSE;
-}
-
-
-/*  define functions in module */
-static PyMethodDef dfutilMethods[] =
-{
-     {"normalize", normalize_func, METH_VARARGS, "evaluate the sine"},
-     {NULL, NULL, 0, NULL}
-};
-
-/* module initialization */
-PyMODINIT_FUNC
-
-initdfutil(void)
-{
-     (void) Py_InitModule("dfutil", dfutilMethods);
-}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/test.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/test.py b/consumers/dfwebserver/test.py
deleted file mode 100644
index 213ee2b..0000000
--- a/consumers/dfwebserver/test.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# To test:
-#
-# make clean dev
-# python test.py
-
-import unittest
-
-import dfutil
-import dfconvert
-import shutil
-
-
-class MyTest(unittest.TestCase):
-    def test(self):
-        
-        self.assertTrue(dfutil.normalize("other.html"))
-
-        self.assertTrue(dfconvert.get("input.docx", "output.html"))
-        
-        shutil.copyfile("input.docx", "dummy.docx");
-        
-        self.assertTrue(dfconvert.put("dummy.docx", "output.html"))
-        
-        self.assertTrue(dfconvert.create("output.docx", "output.html"))
-        
-        
-if __name__ == '__main__':
-    unittest.main()        
-

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/dfwebserver/testSubprocess.py
----------------------------------------------------------------------
diff --git a/consumers/dfwebserver/testSubprocess.py b/consumers/dfwebserver/testSubprocess.py
deleted file mode 100644
index e3bcfa6..0000000
--- a/consumers/dfwebserver/testSubprocess.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/python
-
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import threading
-import time
-
-import dfconvert
-
-exitFlag = 0
-
-class dfconvertThread (threading.Thread):
-    def __init__(self, threadID, name, input, abstract):
-        threading.Thread.__init__(self)
-        self.threadID = threadID
-        self.name = name
-        self.input = input
-        self.abstract = abstract
-    def run(self):
-        print "Starting " + self.name
-        if exitFlag:
-            thread.exit()
-        status = dfconvert.get(self.input, self.abstract);
-        print "%s: %s status:%s" % (self.name, time.ctime(time.time()), status)
-        print "Exiting " + self.name
-
-# Create new threads
-thread1 = dfconvertThread(1, "Thread-1", "input.docx", "output1.html")
-thread2 = dfconvertThread(2, "Thread-2", "input.docx", "output2.html")
-thread3 = dfconvertThread(3, "Thread-3", "input.docx", "output3.html")
-thread4 = dfconvertThread(4, "Thread-4", "input.docx", "output4.html")
-thread5 = dfconvertThread(5, "Thread-5", "input.docx", "output5.html")
-
-# Start new Threads
-thread1.start()
-thread2.start()
-thread3.start()
-thread4.start()
-thread5.start()
-
-print "Exiting Main Thread"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ee179e37/consumers/web/client/reset.css
----------------------------------------------------------------------
diff --git a/consumers/web/client/reset.css b/consumers/web/client/reset.css
new file mode 100644
index 0000000..00b5cb8
--- /dev/null
+++ b/consumers/web/client/reset.css
@@ -0,0 +1,209 @@
+blockquote {
+    font-style: italic;
+  }
+
+  body {
+    counter-reset: h1 h2 h3 h4 h5 h6 figure table;
+    font-family: Palatino;
+    xmargin: 10%;
+    text-align: justify;
+  }
+
+  caption {
+    caption-side: bottom;
+    counter-increment: table;
+  }
+
+  caption.Unnumbered {
+    counter-increment: table 0;
+  }
+
+  caption.Unnumbered::before, figcaption.Unnumbered::before {
+    content: "";
+  }
+
+  caption::before {
+    content: "Table " counter(table) ": ";
+  }
+
+  figcaption {
+    counter-increment: figure;
+  }
+
+  figcaption.Unnumbered {
+    counter-increment: figure 0;
+  }
+
+  figcaption::before {
+    content: "Figure " counter(figure) ": ";
+  }
+
+  figure {
+    margin-bottom: 12pt;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 12pt;
+    text-align: center;
+  }
+
+  h1 {
+    counter-increment: h1;
+    counter-reset: h2 h3 h4 h5 h6;
+  }
+
+  h1.Unnumbered, h2.Unnumbered, h3.Unnumbered, h4.Unnumbered, h5.Unnumbered, h6.Unnumbered {
+  }
+
+  h1::before {
+    content: counter(h1) " ";
+  }
+
+  h2 {
+    color: #585958;
+    counter-increment: h2;
+    counter-reset: h3 h4 h5 h6;
+  }
+
+  h2::before {
+    content: counter(h1) "." counter(h2) " ";
+  }
+
+  h3 {
+    counter-increment: h3;
+    counter-reset: h4 h5 h6;
+  }
+
+  h3::before {
+    content: counter(h1) "." counter(h2) "." counter(h3) " ";
+  }
+
+  h4 {
+    counter-increment: h4;
+    counter-reset: h5 h6;
+  }
+
+  h4::before {
+    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) " ";
+  }
+
+  h5 {
+    counter-increment: h5;
+    counter-reset: h6;
+  }
+
+  h5::before {
+    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " ";
+  }
+
+  h6 {
+    counter-increment: h6;
+  }
+
+  h6::before {
+    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " ";
+  }
+
+  nav.listoffigures::before {
+    content: "List of Figures";
+    display: block;
+    font-size: 2em;
+    font-weight: bold;
+    margin-bottom: .67em;
+    margin-top: .67em;
+  }
+
+  nav.listoftables::before {
+    content: "List of Tables";
+    display: block;
+    font-size: 2em;
+    font-weight: bold;
+    margin-bottom: .67em;
+    margin-top: .67em;
+  }
+
+  nav.tableofcontents::before {
+    content: "Contents";
+    display: block;
+    font-size: 2em;
+    font-weight: bold;
+    margin-bottom: .67em;
+    margin-top: .67em;
+  }
+
+  p {
+    line-height: 166%;
+  }
+
+  p.abstract {
+    font-style: italic;
+    margin-left: 20%;
+    margin-right: 20%;
+  }
+
+  p.author {
+    font-size: 18pt;
+    text-align: center;
+  }
+
+  p.NoSpacing {
+    margin: 0%;
+  }
+
+  p.SpecialNote {
+    color: red;
+    font-weight: bold;
+    text-align: center;
+  }
+
+  p.Tip {
+    background-color: #eeeeee;
+    border: hidden;
+    border-radius: 10px;
+    margin-left: 5%;
+    margin-right: 5%;
+    padding: 10pt;
+  }
+
+  p.Title {
+    font-size: 36pt;
+    font-weight: bold;
+    margin-bottom: 24pt;
+    text-align: center;
+    text-decoration: underline;
+  }
+
+  p.toc1 {
+    margin-bottom: 6pt;
+    margin-left: 0pt;
+    margin-top: 12pt;
+  }
+
+  p.toc2 {
+    margin-bottom: 6pt;
+    margin-left: 24pt;
+    margin-top: 6pt;
+  }
+
+  p.toc3 {
+    margin-bottom: 6pt;
+    margin-left: 48pt;
+    margin-top: 6pt;
+  }
+
+  table {
+    border-collapse: collapse;
+    margin-left: auto;
+    margin-right: auto;
+  }
+
+  td > :first-child, th > :first-child {
+    margin-top: 0;
+  }
+
+  td > :last-child, th > :last-child {
+    margin-bottom: 0;
+  }
+
+  td, th {
+    border: 1px solid black;
+  }
\ No newline at end of file