From b1996998a4d079eb7d6cffadda9dce4cbd78ba73 Mon Sep 17 00:00:00 2001 From: Sparky2021 Date: Tue, 23 Jan 2024 22:37:20 +0100 Subject: [PATCH] mdoku_0.2 --- Test/FitnessePages/AaaPrepare/content.txt | 2 +- Test/FitnessePages/AaaPrepare/properties.xml | 4 ++-- {csTest => Test/FitnessePages/ConvertDoc}/.dummy | 0 .../FitnessePages/ConvertDoc/content.txt | 0 .../FitnessePages/ConvertDoc}/properties.xml | 0 Test/FitnessePages/MdocExtractor/content.txt | 7 +++++++ {csTest => Test}/etc/nl.tpl | 0 {csTest => Test}/etc/nl.xml | 0 csTest/FitnessePages/.dummy | 0 csTest/FitnessePages/AaaPrepare/.dummy | 0 csTest/FitnessePages/AaaPrepare/content.txt | 2 -- csTest/FitnessePages/ConvertDoc/.dummy | 0 csTest/FitnessePages/ConvertDoc/properties.xml | 14 -------------- csTest/FitnessePages/content.txt | 1 - csTest/FitnessePages/properties.xml | 14 -------------- csTest/etc/.dummy | 0 debian/mdoku.conf | 2 ++ python/mDoc/mdoc_extract.py | 9 ++++++--- python/mDoc/mutil | 1 - 19 files changed, 18 insertions(+), 38 deletions(-) rename {csTest => Test/FitnessePages/ConvertDoc}/.dummy (100%) rename {csTest => Test}/FitnessePages/ConvertDoc/content.txt (100%) rename {csTest/FitnessePages/AaaPrepare => Test/FitnessePages/ConvertDoc}/properties.xml (100%) rename {csTest => Test}/etc/nl.tpl (100%) rename {csTest => Test}/etc/nl.xml (100%) delete mode 100644 csTest/FitnessePages/.dummy delete mode 100644 csTest/FitnessePages/AaaPrepare/.dummy delete mode 100644 csTest/FitnessePages/AaaPrepare/content.txt delete mode 100644 csTest/FitnessePages/ConvertDoc/.dummy delete mode 100644 csTest/FitnessePages/ConvertDoc/properties.xml delete mode 100644 csTest/FitnessePages/content.txt delete mode 100644 csTest/FitnessePages/properties.xml delete mode 100644 csTest/etc/.dummy create mode 100644 debian/mdoku.conf delete mode 120000 python/mDoc/mutil diff --git a/Test/FitnessePages/AaaPrepare/content.txt b/Test/FitnessePages/AaaPrepare/content.txt index 678beed..dc3983e 100644 --- a/Test/FitnessePages/AaaPrepare/content.txt +++ b/Test/FitnessePages/AaaPrepare/content.txt @@ -1,2 +1,2 @@ !|test.util.CallScript| -|call script|mtestinfo mdoku| +|call script|mtestinfo mdoku mdoc-tools| diff --git a/Test/FitnessePages/AaaPrepare/properties.xml b/Test/FitnessePages/AaaPrepare/properties.xml index c53497f..afb3ad1 100644 --- a/Test/FitnessePages/AaaPrepare/properties.xml +++ b/Test/FitnessePages/AaaPrepare/properties.xml @@ -2,12 +2,12 @@ - + - + diff --git a/csTest/.dummy b/Test/FitnessePages/ConvertDoc/.dummy similarity index 100% rename from csTest/.dummy rename to Test/FitnessePages/ConvertDoc/.dummy diff --git a/csTest/FitnessePages/ConvertDoc/content.txt b/Test/FitnessePages/ConvertDoc/content.txt similarity index 100% rename from csTest/FitnessePages/ConvertDoc/content.txt rename to Test/FitnessePages/ConvertDoc/content.txt diff --git a/csTest/FitnessePages/AaaPrepare/properties.xml b/Test/FitnessePages/ConvertDoc/properties.xml similarity index 100% rename from csTest/FitnessePages/AaaPrepare/properties.xml rename to Test/FitnessePages/ConvertDoc/properties.xml diff --git a/Test/FitnessePages/MdocExtractor/content.txt b/Test/FitnessePages/MdocExtractor/content.txt index 11cfc8d..a5e9ebe 100644 --- a/Test/FitnessePages/MdocExtractor/content.txt +++ b/Test/FitnessePages/MdocExtractor/content.txt @@ -1,4 +1,5 @@ !|test.util.CallScript| +|call script|!-rm etc/Testdocument.tex |true-!| |call script|mdoc-extract etc/Testdocument.xml default| |call script|grep "nicht cl1-text" etc/Testdocument.tex| |call script|mdoc-extract etc/Testdocument.xml cl1| @@ -10,3 +11,9 @@ |call script|grep "cl2-Text" etc/Testdocument.tex| |call script|grep "cl1.1+cl2-Text" etc/Testdocument.tex| +mdoc-extract writes into named file + +!|test.util.CallScript| +|call script|!-rm out.txt |true-!| +|call script|mdoc-extract etc/Testdocument.xml default out.txt| +|call script|ls out.txt| diff --git a/csTest/etc/nl.tpl b/Test/etc/nl.tpl similarity index 100% rename from csTest/etc/nl.tpl rename to Test/etc/nl.tpl diff --git a/csTest/etc/nl.xml b/Test/etc/nl.xml similarity index 100% rename from csTest/etc/nl.xml rename to Test/etc/nl.xml diff --git a/csTest/FitnessePages/.dummy b/csTest/FitnessePages/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/csTest/FitnessePages/AaaPrepare/.dummy b/csTest/FitnessePages/AaaPrepare/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/csTest/FitnessePages/AaaPrepare/content.txt b/csTest/FitnessePages/AaaPrepare/content.txt deleted file mode 100644 index 92944e6..0000000 --- a/csTest/FitnessePages/AaaPrepare/content.txt +++ /dev/null @@ -1,2 +0,0 @@ -!|test.util.CallScript| -|call script|mtestinfo mdoc-tools| diff --git a/csTest/FitnessePages/ConvertDoc/.dummy b/csTest/FitnessePages/ConvertDoc/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/csTest/FitnessePages/ConvertDoc/properties.xml b/csTest/FitnessePages/ConvertDoc/properties.xml deleted file mode 100644 index afb3ad1..0000000 --- a/csTest/FitnessePages/ConvertDoc/properties.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/csTest/FitnessePages/content.txt b/csTest/FitnessePages/content.txt deleted file mode 100644 index 990fb6f..0000000 --- a/csTest/FitnessePages/content.txt +++ /dev/null @@ -1 +0,0 @@ -!contents -R2 -g -p -f -h \ No newline at end of file diff --git a/csTest/FitnessePages/properties.xml b/csTest/FitnessePages/properties.xml deleted file mode 100644 index 3096ff6..0000000 --- a/csTest/FitnessePages/properties.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/csTest/etc/.dummy b/csTest/etc/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/debian/mdoku.conf b/debian/mdoku.conf new file mode 100644 index 0000000..4f91cd7 --- /dev/null +++ b/debian/mdoku.conf @@ -0,0 +1,2 @@ +compile_type=NONE +target_type=DEB diff --git a/python/mDoc/mdoc_extract.py b/python/mDoc/mdoc_extract.py index 6226d79..32a529e 100755 --- a/python/mDoc/mdoc_extract.py +++ b/python/mDoc/mdoc_extract.py @@ -8,17 +8,20 @@ import sys from mdoc import extractor import re -usage = 'mdoc-extract ' +usage = 'mdoc-extract [target]' def command_dispatch(args): # check runtime parameters if len(args) < 2: - raise RuntimeError("mdoc-extract needs 2 arguments.") + raise RuntimeError("mdoc-extract needs 2/3 arguments.") file = args[0] classs = args[1] - target = re.sub(r'\..*', '.tex', file) + if len(args) == 3: + target = args[2] + else: + target = re.sub(r'\..*', '.tex', file) return extractor.extract(file, classs, target) diff --git a/python/mDoc/mutil b/python/mDoc/mutil deleted file mode 120000 index 774bbec..0000000 --- a/python/mDoc/mutil +++ /dev/null @@ -1 +0,0 @@ -../../../xets/python/xets/util/ \ No newline at end of file -- 2.20.1