mdoku_0.2
authorSparky2021 <sparky2021@core>
Tue, 23 Jan 2024 21:37:20 +0000 (22:37 +0100)
committerSparky2021 <sparky2021@core>
Tue, 23 Jan 2024 21:37:20 +0000 (22:37 +0100)
24 files changed:
Test/FitnessePages/AaaPrepare/content.txt
Test/FitnessePages/AaaPrepare/properties.xml
Test/FitnessePages/ConvertDoc/.dummy [new file with mode: 0644]
Test/FitnessePages/ConvertDoc/content.txt [new file with mode: 0644]
Test/FitnessePages/ConvertDoc/properties.xml [new file with mode: 0644]
Test/FitnessePages/MdocExtractor/content.txt
Test/etc/nl.tpl [new file with mode: 0644]
Test/etc/nl.xml [new file with mode: 0644]
csTest/.dummy [deleted file]
csTest/FitnessePages/.dummy [deleted file]
csTest/FitnessePages/AaaPrepare/.dummy [deleted file]
csTest/FitnessePages/AaaPrepare/content.txt [deleted file]
csTest/FitnessePages/AaaPrepare/properties.xml [deleted file]
csTest/FitnessePages/ConvertDoc/.dummy [deleted file]
csTest/FitnessePages/ConvertDoc/content.txt [deleted file]
csTest/FitnessePages/ConvertDoc/properties.xml [deleted file]
csTest/FitnessePages/content.txt [deleted file]
csTest/FitnessePages/properties.xml [deleted file]
csTest/etc/.dummy [deleted file]
csTest/etc/nl.tpl [deleted file]
csTest/etc/nl.xml [deleted file]
debian/mdoku.conf [new file with mode: 0644]
python/mDoc/mdoc_extract.py
python/mDoc/mutil [deleted symlink]

index 678beed..dc3983e 100644 (file)
@@ -1,2 +1,2 @@
 !|test.util.CallScript|
-|call script|mtestinfo mdoku|
+|call script|mtestinfo mdoku mdoc-tools|
index c53497f..afb3ad1 100644 (file)
@@ -2,12 +2,12 @@
 <properties>
        <Edit/>
        <Files/>
-       <Help></Help>
+       <Help/>
        <Properties/>
        <RecentChanges/>
        <Refactor/>
        <Search/>
-       <Suites></Suites>
+       <Suites/>
        <Test/>
        <Versions/>
        <WhereUsed/>
diff --git a/Test/FitnessePages/ConvertDoc/.dummy b/Test/FitnessePages/ConvertDoc/.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Test/FitnessePages/ConvertDoc/content.txt b/Test/FitnessePages/ConvertDoc/content.txt
new file mode 100644 (file)
index 0000000..d9ea851
--- /dev/null
@@ -0,0 +1,5 @@
+!2 Convert a document
+
+!|test.util.CallScript|
+|call script|mdoc etc/nl.xml etc/nl.tpl|
+|call script|rm etc/nl.html|
diff --git a/Test/FitnessePages/ConvertDoc/properties.xml b/Test/FitnessePages/ConvertDoc/properties.xml
new file mode 100644 (file)
index 0000000..afb3ad1
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<properties>
+       <Edit/>
+       <Files/>
+       <Help/>
+       <Properties/>
+       <RecentChanges/>
+       <Refactor/>
+       <Search/>
+       <Suites/>
+       <Test/>
+       <Versions/>
+       <WhereUsed/>
+</properties>
index 11cfc8d..a5e9ebe 100644 (file)
@@ -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/Test/etc/nl.tpl b/Test/etc/nl.tpl
new file mode 100644 (file)
index 0000000..aea189b
--- /dev/null
@@ -0,0 +1,60 @@
+<mdoc format="html" extension="html">
+<global>
+       <b><pre><![CDATA[<b>]]></pre><post><![CDATA[</b>]]></post></b>
+       <p><pre><![CDATA[<p>]]></pre><post><![CDATA[</p>]]></post></p>
+</global>
+<hierarchical>
+<newsletter>
+       <pre><![CDATA[<!DOCTYPE html>
+<html>
+<head>
+<title>Newsletter Maxjosefstift</title>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
+<style>
+body {font-family: "Times New Roman", Georgia, Serif;}
+h1, h2, h3, h4, h5, h6 {
+  font-family: "Playfair Display";
+  letter-spacing: 5px;
+}
+</style>
+</head>
+<body>
+
+
+<!-- Header -->
+
+<!-- Page content -->
+<div class="w3-content" style="max-width:700px">
+  <img class="w3-image" src="https://mcusercontent.com/c49e44a2c411ce9d2e4c53eec/images/aea1f0bf-cdd7-4e4a-96c4-e7f561987359.jpg" alt="MJS Logo" width="700" height="350">
+
+<!-- Einleitung -->
+<div class="w3-container w3-padding-64" id="contact">]]></pre>
+       <post><![CDATA[</div>
+
+<!-- Footer -->
+<footer class="w3-center w3-light-grey w3-padding-32">
+<p>Impressum:<br/>
+       OStDin Kristina Kalb-Heubisch, Schulleiterin<br/>
+       Dr. Dunja Jaber, PR-Team Gymnasium Max-Josef-Stift<br/>
+       Mühlbaurstr. 15<br/>
+       81677 München<br/>
+       Telefon: 089-998435-0<br/>
+       Telefax: 089-998435-155<br/>
+       E-Mail: sekretariat@maxjosefstift.de<br/>
+       Nutzungsbedingungen siehe https://www.maxjosefstift.de/impressum2.html</p>
+<p>Sie möchten diesen Newsletter nicht mehr erhalten?</p>
+<p>Eine Email genügt, zu adressieren an newsletter@maxjosefstift.de mit dem Betreff „Abmelden“.</p>
+  <p>Powered by <a href="http://www.w3schools.com/w3css/default.asp" title="W3.CSS" target="_blank" class="w3-hover-text-green">w3.css</a> and
+  <a href="http://wagnertech.de">WagnerTech UG</a></p>
+</footer>
+
+</body>
+</html>]]></post>
+       <h1><pre><![CDATA[<h2 class="w3-center">]]></pre><post><![CDATA[</h2>]]></post></h1>
+       <img><pre><![CDATA[<img width="700" src="$src"/>]]></pre></img>
+</newsletter>
+</hierarchical>
+</mdoc>
+
diff --git a/Test/etc/nl.xml b/Test/etc/nl.xml
new file mode 100644 (file)
index 0000000..735535e
--- /dev/null
@@ -0,0 +1,6 @@
+<newsletter>
+<h1>Überschrift</h1>
+<img src="Bild1.jpg"/>
+<p>Text mit <b>Verdickung</b></p>
+</newsletter>
+
diff --git a/csTest/.dummy b/csTest/.dummy
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/csTest/FitnessePages/.dummy b/csTest/FitnessePages/.dummy
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/csTest/FitnessePages/AaaPrepare/.dummy b/csTest/FitnessePages/AaaPrepare/.dummy
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/csTest/FitnessePages/AaaPrepare/content.txt b/csTest/FitnessePages/AaaPrepare/content.txt
deleted file mode 100644 (file)
index 92944e6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-!|test.util.CallScript|
-|call script|mtestinfo mdoc-tools|
diff --git a/csTest/FitnessePages/AaaPrepare/properties.xml b/csTest/FitnessePages/AaaPrepare/properties.xml
deleted file mode 100644 (file)
index afb3ad1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<properties>
-       <Edit/>
-       <Files/>
-       <Help/>
-       <Properties/>
-       <RecentChanges/>
-       <Refactor/>
-       <Search/>
-       <Suites/>
-       <Test/>
-       <Versions/>
-       <WhereUsed/>
-</properties>
diff --git a/csTest/FitnessePages/ConvertDoc/.dummy b/csTest/FitnessePages/ConvertDoc/.dummy
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/csTest/FitnessePages/ConvertDoc/content.txt b/csTest/FitnessePages/ConvertDoc/content.txt
deleted file mode 100644 (file)
index d9ea851..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-!2 Convert a document
-
-!|test.util.CallScript|
-|call script|mdoc etc/nl.xml etc/nl.tpl|
-|call script|rm etc/nl.html|
diff --git a/csTest/FitnessePages/ConvertDoc/properties.xml b/csTest/FitnessePages/ConvertDoc/properties.xml
deleted file mode 100644 (file)
index afb3ad1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<properties>
-       <Edit/>
-       <Files/>
-       <Help/>
-       <Properties/>
-       <RecentChanges/>
-       <Refactor/>
-       <Search/>
-       <Suites/>
-       <Test/>
-       <Versions/>
-       <WhereUsed/>
-</properties>
diff --git a/csTest/FitnessePages/content.txt b/csTest/FitnessePages/content.txt
deleted file mode 100644 (file)
index 990fb6f..0000000
+++ /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 (file)
index 3096ff6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<properties>
-       <Edit/>
-       <Files/>
-       <Help></Help>
-       <Properties/>
-       <RecentChanges/>
-       <Refactor/>
-       <Search/>
-       <Suite/>
-       <Suites></Suites>
-       <Versions/>
-       <WhereUsed/>
-</properties>
diff --git a/csTest/etc/.dummy b/csTest/etc/.dummy
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/csTest/etc/nl.tpl b/csTest/etc/nl.tpl
deleted file mode 100644 (file)
index aea189b..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<mdoc format="html" extension="html">
-<global>
-       <b><pre><![CDATA[<b>]]></pre><post><![CDATA[</b>]]></post></b>
-       <p><pre><![CDATA[<p>]]></pre><post><![CDATA[</p>]]></post></p>
-</global>
-<hierarchical>
-<newsletter>
-       <pre><![CDATA[<!DOCTYPE html>
-<html>
-<head>
-<title>Newsletter Maxjosefstift</title>
-<meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
-<style>
-body {font-family: "Times New Roman", Georgia, Serif;}
-h1, h2, h3, h4, h5, h6 {
-  font-family: "Playfair Display";
-  letter-spacing: 5px;
-}
-</style>
-</head>
-<body>
-
-
-<!-- Header -->
-
-<!-- Page content -->
-<div class="w3-content" style="max-width:700px">
-  <img class="w3-image" src="https://mcusercontent.com/c49e44a2c411ce9d2e4c53eec/images/aea1f0bf-cdd7-4e4a-96c4-e7f561987359.jpg" alt="MJS Logo" width="700" height="350">
-
-<!-- Einleitung -->
-<div class="w3-container w3-padding-64" id="contact">]]></pre>
-       <post><![CDATA[</div>
-
-<!-- Footer -->
-<footer class="w3-center w3-light-grey w3-padding-32">
-<p>Impressum:<br/>
-       OStDin Kristina Kalb-Heubisch, Schulleiterin<br/>
-       Dr. Dunja Jaber, PR-Team Gymnasium Max-Josef-Stift<br/>
-       Mühlbaurstr. 15<br/>
-       81677 München<br/>
-       Telefon: 089-998435-0<br/>
-       Telefax: 089-998435-155<br/>
-       E-Mail: sekretariat@maxjosefstift.de<br/>
-       Nutzungsbedingungen siehe https://www.maxjosefstift.de/impressum2.html</p>
-<p>Sie möchten diesen Newsletter nicht mehr erhalten?</p>
-<p>Eine Email genügt, zu adressieren an newsletter@maxjosefstift.de mit dem Betreff „Abmelden“.</p>
-  <p>Powered by <a href="http://www.w3schools.com/w3css/default.asp" title="W3.CSS" target="_blank" class="w3-hover-text-green">w3.css</a> and
-  <a href="http://wagnertech.de">WagnerTech UG</a></p>
-</footer>
-
-</body>
-</html>]]></post>
-       <h1><pre><![CDATA[<h2 class="w3-center">]]></pre><post><![CDATA[</h2>]]></post></h1>
-       <img><pre><![CDATA[<img width="700" src="$src"/>]]></pre></img>
-</newsletter>
-</hierarchical>
-</mdoc>
-
diff --git a/csTest/etc/nl.xml b/csTest/etc/nl.xml
deleted file mode 100644 (file)
index 735535e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<newsletter>
-<h1>Überschrift</h1>
-<img src="Bild1.jpg"/>
-<p>Text mit <b>Verdickung</b></p>
-</newsletter>
-
diff --git a/debian/mdoku.conf b/debian/mdoku.conf
new file mode 100644 (file)
index 0000000..4f91cd7
--- /dev/null
@@ -0,0 +1,2 @@
+compile_type=NONE
+target_type=DEB
index 6226d79..32a529e 100755 (executable)
@@ -8,17 +8,20 @@ import sys
 from mdoc import extractor
 import re
 
-usage = 'mdoc-extract <source> <class>'
+usage = 'mdoc-extract <source> <class> [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 (symlink)
index 774bbec..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../../xets/python/xets/util/
\ No newline at end of file