3 | 10 |
deleted file mode 100644 |
... | ... |
@@ -1,99 +0,0 @@ |
1 |
-<?php |
|
2 |
- include_once("source/logic/server/data.php"); |
|
3 |
- include_once("source/logic/server/table.php"); |
|
4 |
- include_once("source/logic/server/misc.php"); |
|
5 |
- ?> |
|
6 |
-<section class="section" id="adpositions"> |
|
7 |
- <header>Adpositions</header> |
|
8 |
- <?php proposal(); ?> |
|
9 |
- <!-- |
|
10 |
- <p>The following list gives an overview over prepositions:</p> |
|
11 |
- --> |
|
12 |
-<?php |
|
13 |
- $data_adpositions = read_json("source/data/adpositions.json"); |
|
14 |
- // $data = $data_adpositions["words"]; |
|
15 |
- $data = $data_adpositions["situations"]; |
|
16 |
- { |
|
17 |
- /* |
|
18 |
- { |
|
19 |
- $data = sql_cross($data, $data_adpositions["situations"]); |
|
20 |
- $data = sql_select($data, function ($row) {return ($row["situation_id"] == $row["id"]);}); |
|
21 |
- $data = sql_order($data, function ($x, $y) {return ($x["situation_id"] >= $y["situation_id"]);}); |
|
22 |
- $data = sql_delete($data, ["situation_id", "id"]); |
|
23 |
- $data = sql_rename($data, "name", "situation_name"); |
|
24 |
- } |
|
25 |
- */ |
|
26 |
- { |
|
27 |
- $data = sql_cross($data, $data_adpositions["words"]); |
|
28 |
- $data = sql_select($data, function ($row) {return ($row["situation_id"] == $row["id"]);}); |
|
29 |
- $data = sql_delete($data, ["situation_id", "id"]); |
|
30 |
- $data = sql_rename($data, "name", "situation_name"); |
|
31 |
- } |
|
32 |
- { |
|
33 |
- $data = sql_cross($data, $data_adpositions["types"]); |
|
34 |
- $data = sql_select($data, function ($row) {return ($row["type_id"] == $row["id"]);}); |
|
35 |
- $data = sql_delete($data, ["type_id", "id"]); |
|
36 |
- $data = sql_rename($data, "name", "type_name"); |
|
37 |
- } |
|
38 |
- { |
|
39 |
- $data = sql_cross($data, $data_adpositions["references"]); |
|
40 |
- $data = sql_select($data, function ($row) {return ($row["reference_id"] == $row["id"]);}); |
|
41 |
- $data = sql_delete($data, ["reference_id", "id"]); |
|
42 |
- $data = sql_rename($data, "name", "reference_name"); |
|
43 |
- } |
|
44 |
- } |
|
45 |
- |
|
46 |
- $table = new class_table |
|
47 |
- ( |
|
48 |
- [ |
|
49 |
- new class_column("Language", "language_id"), |
|
50 |
- new class_column("Situation", "situation_name"), |
|
51 |
- new class_column("Type", "type_name"), |
|
52 |
- new class_column("Reference", "reference_name"), |
|
53 |
- new class_column("Words", "words", function ($x) {return json_encode($x);}), |
|
54 |
- ], |
|
55 |
- $data |
|
56 |
- ); |
|
57 |
- $table_ = $table->snap |
|
58 |
- ( |
|
59 |
- [ |
|
60 |
- "label_vertical" => function ($column) {return "";}, |
|
61 |
- "columns_vertical" => |
|
62 |
- [ |
|
63 |
- $table->columns_get()[1], |
|
64 |
- ], |
|
65 |
- "label_horizontal" => function ($column, $value) {return $value;}, |
|
66 |
- "columns_horizontal" => |
|
67 |
- [ |
|
68 |
- $table->columns_get()[2], |
|
69 |
- $table->columns_get()[3], |
|
70 |
- ], |
|
71 |
- "columns_data" => |
|
72 |
- [ |
|
73 |
- $table->columns_get()[0], |
|
74 |
- $table->columns_get()[4], |
|
75 |
- ], |
|
76 |
- "data_aggregator" => function ($values) |
|
77 |
- { |
|
78 |
- return $values; |
|
79 |
- }, |
|
80 |
- "data_formatter" => function_chain |
|
81 |
- ( |
|
82 |
- [ |
|
83 |
- object_from_array("language_id"), |
|
84 |
- object_map(object_attribute("words")), |
|
85 |
- format_correlation("type_word"), |
|
86 |
- ] |
|
87 |
- ), |
|
88 |
- ] |
|
89 |
- ); |
|
90 |
- $table_->generate(); |
|
91 |
- ?> |
|
92 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Ek skal varte foran."], "eng" => ["I will wait in front."]])); ?></p> |
|
93 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Du mut blive bakan."], "eng" => ["You must stay in the back."]])); ?></p> |
|
94 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Han sta nedan de brüg."], "eng" => ["He stands under the bridge."]])); ?></p> |
|
95 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Hun flüg uvan de volker."], "eng" => ["She flies above the clouds."]])); ?></p> |
|
96 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Vi kan gae in de timer."], "eng" => ["We can go into the room."]])); ?></p> |
|
97 |
- <p><?php echo(format_correlation("type_sentence")(["flk" => ["Je skal löpe ut de hus."], "eng" => ["You shall run out of the house."]])); ?></p> |
|
98 |
-</section> |
|
99 |
- |
100 | 0 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,15 @@ |
1 |
+<section class="section" id="adpositions"> |
|
2 |
+ <header>Adpositions</header> |
|
3 |
+ {{call::_proposal.html.tpl}} |
|
4 |
+ <!-- |
|
5 |
+ <p>The following list gives an overview over prepositions:</p> |
|
6 |
+ --> |
|
7 |
+ {{fold:adpositions.words:situation_id:type_id/reference_id}} |
|
8 |
+ <p><?php echo(format_correlation("type_sentence")(["flk" => ["Ek skal varte foran."], "eng" => ["I will wait in front."]])); ?></p> |
|
9 |
+ <p><?php echo(format_correlation("type_sentence")(["flk" => ["Du mut blive bakan."], "eng" => ["You must stay in the back."]])); ?></p> |
|
10 |
+ <p><?php echo(format_correlation("type_sentence")(["flk" => ["Han sta nedan de brüg."], "eng" => ["He stands under the bridge."]])); ?></p> |
|
11 |
+ <p><?php echo(format_correlation("type_sentence")(["flk" => ["Hun flüg uvan de volker."], "eng" => ["She flies above the clouds."]])); ?></p> |
|
12 |
+ <p><?php echo(format_correlation("type_sentence")(["flk" => ["Vi kan gae in de timer."], "eng" => ["We can go into the room."]])); ?></p> |
|
13 |
+ <p><?php echo(format_correlation("type_sentence")(["flk" => ["Je skal löpe ut de hus."], "eng" => ["You shall run out of the house."]])); ?></p> |
|
14 |
+</section> |
|
15 |
+ |
6 | 22 |
similarity index 53% |
7 | 23 |
rename from source/content/basics.html.php |
8 | 24 |
rename to source/content/basics.html.tpl |
... | ... |
@@ -1,12 +1,5 @@ |
1 | 1 |
<section class="chapter" id="basics"> |
2 | 2 |
<header>Basics</header> |
3 |
-<?php |
|
4 |
- compose |
|
5 |
- ( |
|
6 |
- [ |
|
7 |
- "phonology_and_orthography", |
|
8 |
- ] |
|
9 |
- ); |
|
10 |
- ?> |
|
3 |
+ [[call::phonology_and_orthography.html.tpl]] |
|
11 | 4 |
</section> |
12 | 5 |
|
22 | 15 |
deleted file mode 100644 |
... | ... |
@@ -1,78 +0,0 @@ |
1 |
-<?php |
|
2 |
- include_once("source/logic/server/data.php"); |
|
3 |
- include_once("source/logic/server/table.php"); |
|
4 |
- include_once("source/logic/server/misc.php"); |
|
5 |
- include_once("source/logic/server/sql.php"); |
|
6 |
- ?> |
|
7 |
-<section class="subsection" id="correlatives"> |
|
8 |
- <header>Correlatives</header> |
|
9 |
- <?php proposal(); ?> |
|
10 |
-<?php |
|
11 |
- $data_correlatives = read_json("source/data/correlatives.json"); |
|
12 |
- $data = $data_correlatives["words"]; |
|
13 |
- { |
|
14 |
- { |
|
15 |
- $data = sql_cross($data, $data_correlatives["domains"]); |
|
16 |
- $data = sql_select($data, function ($row) {return ($row["domain_id"] == $row["id"]);}); |
|
17 |
- $data = sql_delete($data, ["domain_id", "id"]); |
|
18 |
- $data = sql_rename($data, "name", "domain_name"); |
|
19 |
- } |
|
20 |
- { |
|
21 |
- $data = sql_cross($data, $data_correlatives["types"]); |
|
22 |
- $data = sql_select($data, function ($row) {return ($row["type_id"] == $row["id"]);}); |
|
23 |
- $data = sql_delete($data, ["type_id", "id"]); |
|
24 |
- $data = sql_rename($data, "name", "type_name"); |
|
25 |
- } |
|
26 |
- } |
|
27 |
- |
|
28 |
- $table = new class_table |
|
29 |
- ( |
|
30 |
- [ |
|
31 |
- new class_column("Language", "language_id"), |
|
32 |
- new class_column("Domain", "domain_name"), |
|
33 |
- new class_column("Type", "type_name"), |
|
34 |
- new class_column("Words", "words", function ($x) {return json_encode($x);}), |
|
35 |
- ], |
|
36 |
- $data |
|
37 |
- ); |
|
38 |
- $table_ = $table->snap |
|
39 |
- ( |
|
40 |
- [ |
|
41 |
- "label_vertical" => function ($column) {return "";}, |
|
42 |
- "columns_vertical" => |
|
43 |
- [ |
|
44 |
- $table->columns_get()[1], |
|
45 |
- ], |
|
46 |
- "label_horizontal" => function ($column, $value) {return $value;}, |
|
47 |
- "columns_horizontal" => |
|
48 |
- [ |
|
49 |
- $table->columns_get()[2], |
|
50 |
- ], |
|
51 |
- "columns_data" => |
|
52 |
- [ |
|
53 |
- $table->columns_get()[0], |
|
54 |
- $table->columns_get()[3], |
|
55 |
- ], |
|
56 |
- "data_aggregator" => function ($values) |
|
57 |
- { |
|
58 |
- return $values; |
|
59 |
- }, |
|
60 |
- "data_formatter" => function_chain |
|
61 |
- ( |
|
62 |
- [ |
|
63 |
- object_from_array("language_id"), |
|
64 |
- object_map(object_attribute("words")), |
|
65 |
- format_correlation("type_word"), |
|
66 |
- ] |
|
67 |
- ), |
|
68 |
- ] |
|
69 |
- ); |
|
70 |
- $table_->generate(); |
|
71 |
- ?> |
|
72 |
- <div class="note note_information"> |
|
73 |
- <span class="note_content"> |
|
74 |
- <p>Some of these words are very unlikely to ever get used (e.g. <?php echo(mark("ni slag", ["type_word", "lang_flk"])); ?>). Nevertheless they exist and are listed for completeness.</p> |
|
75 |
- </span> |
|
76 |
- </div> |
|
77 |
-</section> |
|
78 |
- |
79 | 0 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,11 @@ |
1 |
+<section class="subsection" id="correlatives"> |
|
2 |
+ <header>Correlatives</header> |
|
3 |
+ {{call::_proposal.html.tpl}} |
|
4 |
+ {{fold:correlatives.words:domain_id:type_id}} |
|
5 |
+ <div class="note note_information"> |
|
6 |
+ <span class="note_content"> |
|
7 |
+ <p>Some of these words are very unlikely to ever get used (e.g. [[show:correlative_example|mark:type_word:lang_flk]]). Nevertheless they exist and are listed for completeness.</p> |
|
8 |
+ </span> |
|
9 |
+ </div> |
|
10 |
+</section> |
|
11 |
+ |
9 | 21 |
similarity index 51% |
10 | 22 |
rename from source/content/draft.html.php |
11 | 23 |
rename to source/content/draft.html.tpl |
... | ... |
@@ -1,10 +1,12 @@ |
1 | 1 |
<!DOCTYPE HTML> |
2 |
-<?php include_once("source/logic/server/settings.php"); ?> |
|
3 |
-<?php include_once("source/logic/server/misc.php"); ?> |
|
4 | 2 |
<html> |
5 | 3 |
<head> |
6 | 4 |
<title>Folksprak -- Draft</title> |
7 |
- <?php include("source/content/meta.html.php"); ?> |
|
5 |
+ <meta charset="utf-8"/> |
|
6 |
+ <meta name="author" content="Fenris Wolf"/> |
|
7 |
+ <meta name="description" content="draft for the constructed germanic zonal auxlang 'Folksprak'"/> |
|
8 |
+ <meta name="language" content="english"/> |
|
9 |
+ <meta name="keywords" content="language,germanic,constructed"/> |
|
8 | 10 |
<link rel="shortcut icon" type="image/png" href="favicon.png"/> |
9 | 11 |
<link rel="stylesheet" type="text/css" href="draft.css"/> |
10 | 12 |
<script type="text/javascript" src="draft.js"></script> |
... | ... |
@@ -20,34 +22,11 @@ |
20 | 22 |
<!-- |
21 | 23 |
titlepage |
22 | 24 |
--> |
23 |
-<?php |
|
24 |
- /* |
|
25 |
- echo |
|
26 |
- ( |
|
27 |
- function_chain |
|
28 |
- ( |
|
29 |
- [ |
|
30 |
- function ($x) {return $x+1;}, |
|
31 |
- function ($x) {return $x*2;}, |
|
32 |
- function ($x) {return $x/3;}, |
|
33 |
- ] |
|
34 |
- ) |
|
35 |
- (5) |
|
36 |
- ); |
|
37 |
- */ |
|
38 |
- compose |
|
39 |
- ( |
|
40 |
- [ |
|
41 |
- "introduction", |
|
42 |
- "basics", |
|
43 |
- "vocabulary", |
|
44 |
- "grammar", |
|
45 |
- "examples", |
|
46 |
- ] |
|
47 |
- ); |
|
48 |
- /* |
|
49 |
- */ |
|
50 |
- ?> |
|
25 |
+ {{call::introduction.html.tpl}} |
|
26 |
+ {{call::basics.html.tpl}} |
|
27 |
+ {{call::vocabulary.html.tpl}} |
|
28 |
+ [[call::grammar.html.tpl]] |
|
29 |
+ [[call::examples.html.tpl]] |
|
51 | 30 |
</div> |
52 | 31 |
</body> |
53 | 32 |
</html> |
69 | 48 |
deleted file mode 100644 |
... | ... |
@@ -1,15 +0,0 @@ |
1 |
-<?php include_once("source/logic/server/misc.php"); ?> |
|
2 |
-<section class="chapter hidden" id="introduction"> |
|
3 |
- <header>Introduction</header> |
|
4 |
-<?php |
|
5 |
- compose |
|
6 |
- ( |
|
7 |
- [ |
|
8 |
- "toc", |
|
9 |
- "preface", |
|
10 |
- "key_parameters", |
|
11 |
- ] |
|
12 |
- ); |
|
13 |
- ?> |
|
14 |
-</section> |
|
15 |
- |
15 | 23 |
deleted file mode 100644 |
... | ... |
@@ -1,167 +0,0 @@ |
1 |
-<?php |
|
2 |
-global $configuration; |
|
3 |
-include_once("source/logic/server/data.php"); |
|
4 |
-include_once("source/logic/server/sql.php"); |
|
5 |
-include_once("source/logic/server/table.php"); |
|
6 |
- |
|
7 |
-/* |
|
8 |
-function convert_persona($persona) {return [0 => "impersonal", 1 => "1st person", 2 => "2nd person", 3 => "3rd person"][$persona];} |
|
9 |
-function convert_numerus($numerus) {return [0 => null, 1 => "singular", 2 => "plural"][$numerus];} |
|
10 |
-function convert_genus($genus) {return [0 => "common", 1 => "masculine", 2 => "feminine", 3 => "neuter"][$genus];} |
|
11 |
- */ |
|
12 |
- ?> |
|
13 |
-<section class="subsection" id="personal_pronouns"> |
|
14 |
- <header>Personal Pronouns</header> |
|
15 |
-<?php |
|
16 |
- $data_common = read_json("source/data/common.json"); |
|
17 |
- $data_pronouns = read_json("source/data/personal_pronouns.json"); |
|
18 |
- |
|
19 |
- $data = $data_pronouns["words"]; |
|
20 |
- { |
|
21 |
- { |
|
22 |
- if (false) |
|
23 |
- { |
|
24 |
- $data = sql_cross($data, $data_common["counts"]); |
|
25 |
- $data = sql_select($data, function ($row) {return ($row["count_id"] == $row["id"]);}); |
|
26 |
- $data = sql_delete($data, ["count_id", "id"]); |
|
27 |
- $data = sql_rename($data, "name", "count_name"); |
|
28 |
- } |
|
29 |
- else |
|
30 |
- { |
|
31 |
- $data = sql_rename($data, "count_id", "count_name"); |
|
32 |
- } |
|
33 |
- } |
|
34 |
- { |
|
35 |
- if (false) |
|
36 |
- { |
|
37 |
- $data = sql_cross($data, $data_common["persons"]); |
|
38 |
- $data = sql_select($data, function ($row) {return ($row["person_id"] == $row["id"]);}); |
|
39 |
- $data = sql_delete($data, ["person_id", "id"]); |
|
40 |
- $data = sql_rename($data, "name", "person_name"); |
|
41 |
- } |
|
42 |
- else |
|
43 |
- { |
|
44 |
- $data = sql_rename($data, "person_id", "person_name"); |
|
45 |
- } |
|
46 |
- } |
|
47 |
- { |
|
48 |
- if (false) |
|
49 |
- { |
|
50 |
- $data = sql_cross($data, $data_common["genders"]); |
|
51 |
- $data = sql_select($data, function ($row) {return ($row["gender_id"] == $row["id"]);}); |
|
52 |
- $data = sql_delete($data, ["gender_id", "id"]); |
|
53 |
- $data = sql_rename($data, "name", "gender_name"); |
|
54 |
- } |
|
55 |
- else |
|
56 |
- { |
|
57 |
- $data = sql_rename($data, "gender_id", "gender_name"); |
|
58 |
- } |
|
59 |
- } |
|
60 |
- { |
|
61 |
- if (false) |
|
62 |
- { |
|
63 |
- $data = sql_cross($data, $data_pronouns["types"]); |
|
64 |
- $data = sql_select($data, function ($row) {return ($row["type_id"] == $row["id"]);}); |
|
65 |
- $data = sql_delete($data, ["type_id", "id"]); |
|
66 |
- $data = sql_rename($data, "name", "type_name"); |
|
67 |
- } |
|
68 |
- else |
|
69 |
- { |
|
70 |
- $data = sql_rename($data, "type_id", "type_name"); |
|
71 |
- } |
|
72 |
- } |
|
73 |
- { |
|
74 |
- if (false) |
|
75 |
- { |
|
76 |
- $data = sql_cross($data, $data_common["cases"]); |
|
77 |
- $data = sql_select($data, function ($row) {return ($row["case_id"] == $row["id"]);}); |
|
78 |
- $data = sql_delete($data, ["case_id", "id"]); |
|
79 |
- $data = sql_rename($data, "name", "case_name"); |
|
80 |
- } |
|
81 |
- else |
|
82 |
- { |
|
83 |
- $data = sql_rename($data, "case_id", "case_name"); |
|
84 |
- } |
|
85 |
- } |
|
86 |
- } |
|
87 |
- |
|
88 |
- { |
|
89 |
- // $data = sql_select($data, function ($row) {return ($row["type_name"] == "nor");}); |
|
90 |
- $data = sql_select($data, function ($row) {global $configuration; return (($row["language_id"] == "flk") or ($row["language_id"] == $configuration["target"]));}); |
|
91 |
- } |
|
92 |
- |
|
93 |
- $table = new class_table |
|
94 |
- ( |
|
95 |
- [ |
|
96 |
- new class_column("Language", "language_id"), |
|
97 |
- new class_column("Count", "count_name"), |
|
98 |
- new class_column("Person", "person_name"), |
|
99 |
- new class_column("Gender", "gender_name"), |
|
100 |
- new class_column("Type", "type_name"), |
|
101 |
- new class_column("Case", "case_name"), |
|
102 |
- new class_column("Words", "words", function ($x) {return json_encode($x);}), |
|
103 |
- ], |
|
104 |
- $data |
|
105 |
- ); |
|
106 |
- |
|
107 |
- $table->snap |
|
108 |
- ( |
|
109 |
- [ |
|
110 |
- "label_vertical" => function ($column) {return "";}, |
|
111 |
- "columns_vertical" => |
|
112 |
- [ |
|
113 |
- $table->columns_get()[1], |
|
114 |
- $table->columns_get()[2], |
|
115 |
- $table->columns_get()[3], |
|
116 |
- ], |
|
117 |
- "label_horizontal" => function ($column, $value) {return $value;}, |
|
118 |
- "columns_horizontal" => |
|
119 |
- [ |
|
120 |
- $table->columns_get()[4], |
|
121 |
- $table->columns_get()[5], |
|
122 |
- ], |
|
123 |
- "columns_data" => |
|
124 |
- [ |
|
125 |
- $table->columns_get()[0], |
|
126 |
- $table->columns_get()[6], |
|
127 |
- ], |
|
128 |
- "data_aggregator" => function ($values) |
|
129 |
- { |
|
130 |
- return $values; |
|
131 |
- }, |
|
132 |
- "data_formatter" => function_chain |
|
133 |
- ( |
|
134 |
- [ |
|
135 |
- object_from_array("language_id"), |
|
136 |
- object_map(object_attribute("words")), |
|
137 |
- format_correlation("type_word"), |
|
138 |
- ] |
|
139 |
- ), |
|
140 |
- ] |
|
141 |
- )->generate(); |
|
142 |
- ?> |
|
143 |
- <div class="note note_information"> |
|
144 |
- <span class="note_content"> |
|
145 |
- <p>Since the word <?php echo(mark("man", ["type_word", "lang_flk"])); ?> simply means <?php echo(mark("human being", ["type_word", "lang_en"])); ?>, it can be understood as an implicit way to express an abstract actor; similar words like <?php echo(mark("lüd", ["type_word", "lang_flk"])); ?> (<?php echo(mark("people", ["type_word", "lang_en"])); ?>) or <?php echo(mark("di", ["type_word", "lang_flk"])); ?> can be used as well.</p> |
|
146 |
- </span> |
|
147 |
- </div> |
|
148 |
- <div class="note note_information"> |
|
149 |
- <span class="note_content"> |
|
150 |
- <p>The honorific salutation is expressed by the plural form <?php echo(mark("je", ["type_word", "lang_flk"])); ?>; however it should be avoided in usual speech in favor of the singular form <?php echo(mark("du", ["type_word", "lang_flk"])); ?>.</p> |
|
151 |
- </span> |
|
152 |
- </div> |
|
153 |
- <div class="note note_information"> |
|
154 |
- <span class="note_content"> |
|
155 |
- <p>A reflexive genitive can be formed by inserting the word <?php echo(mark("egen", ["word", "lang_flk"])); ?> (<?php echo(mark("own", ["type_word", "lang_en"])); ?>), for example <?php echo(format_correlation("type_sentence")(["flk" => ["Han (A) hav givt to ham (B) hans egen buk."], "eng" => ["He (A) has given (to) him (B) his own book."]])); ?> (A's book was given to B).</p> |
|
156 |
- </span> |
|
157 |
- </div> |
|
158 |
- <div class="note note_reasoning"> |
|
159 |
- <input type="checkbox" class="note_hide" title="click to show/hide" id="note_02"/> |
|
160 |
- <label class="note_label note_label_show" for="note_02">show</label> |
|
161 |
- <label class="note_label note_label_hide" for="note_02">hide</label> |
|
162 |
- <span class="note_content"> |
|
163 |
- <p>When finding appropriate personal pronouns, the most intricate cases were the 3rd person singular and the 2nd person plural; both turned out to be very diverse among the modern Germanic languages. While for the 2nd person plural we could find a sufficient satisfying solution after a while, the 3rd person singular kept defying. In the end we came to the settlement to use a Swedish-like solution including the pronoun <?php echo(mark("hen", ["type_word", "lang_flk"])); ?>, which is not bound to any sexus so that it can be used for actors in general.</p> |
|
164 |
- </span> |
|
165 |
- </div> |
|
166 |
-</section> |
|
167 |
- |
168 | 0 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,28 @@ |
1 |
+<section class="subsection" id="personal_pronouns"> |
|
2 |
+ <header>Personal Pronouns</header> |
|
3 |
+ {{fold:personal_pronouns.words:count_id/person_id/gender_id:type_id/case_id}} |
|
4 |
+ <div class="note note_information"> |
|
5 |
+ <span class="note_content"> |
|
6 |
+ <p>Since the word <?php echo(mark("man", ["type_word", "lang_flk"])); ?> simply means <?php echo(mark("human being", ["type_word", "lang_en"])); ?>, it can be understood as an implicit way to express an abstract actor; similar words like <?php echo(mark("lüd", ["type_word", "lang_flk"])); ?> (<?php echo(mark("people", ["type_word", "lang_en"])); ?>) or <?php echo(mark("di", ["type_word", "lang_flk"])); ?> can be used as well.</p> |
|
7 |
+ </span> |
|
8 |
+ </div> |
|
9 |
+ <div class="note note_information"> |
|
10 |
+ <span class="note_content"> |
|
11 |
+ <p>The honorific salutation is expressed by the plural form <?php echo(mark("je", ["type_word", "lang_flk"])); ?>; however it should be avoided in usual speech in favor of the singular form <?php echo(mark("du", ["type_word", "lang_flk"])); ?>.</p> |
|
12 |
+ </span> |
|
13 |
+ </div> |
|
14 |
+ <div class="note note_information"> |
|
15 |
+ <span class="note_content"> |
|
16 |
+ <p>A reflexive genitive can be formed by inserting the word <?php echo(mark("egen", ["word", "lang_flk"])); ?> (<?php echo(mark("own", ["type_word", "lang_en"])); ?>), for example <?php echo(format_correlation("type_sentence")(["flk" => ["Han (A) hav givt to ham (B) hans egen buk."], "eng" => ["He (A) has given (to) him (B) his own book."]])); ?> (A's book was given to B).</p> |
|
17 |
+ </span> |
|
18 |
+ </div> |
|
19 |
+ <div class="note note_reasoning"> |
|
20 |
+ <input type="checkbox" class="note_hide" title="click to show/hide" id="note_02"/> |
|
21 |
+ <label class="note_label note_label_show" for="note_02">show</label> |
|
22 |
+ <label class="note_label note_label_hide" for="note_02">hide</label> |
|
23 |
+ <span class="note_content"> |
|
24 |
+ <p>When finding appropriate personal pronouns, the most intricate cases were the 3rd person singular and the 2nd person plural; both turned out to be very diverse among the modern Germanic languages. While for the 2nd person plural we could find a sufficient satisfying solution after a while, the 3rd person singular kept defying. In the end we came to the settlement to use a Swedish-like solution including the pronoun <?php echo(mark("hen", ["type_word", "lang_flk"])); ?>, which is not bound to any sexus so that it can be used for actors in general.</p> |
|
25 |
+ </span> |
|
26 |
+ </div> |
|
27 |
+</section> |
|
28 |
+ |
3 | 32 |
similarity index 91% |
4 | 33 |
rename from source/content/preface.html.php |
5 | 34 |
rename to source/content/preface.html.tpl |
... | ... |
@@ -2,6 +2,6 @@ |
2 | 2 |
<header>Preface</header> |
3 | 3 |
<p>Folksprak is the name of a project that aims to construct an inter-Germanic zonal auxiliary language, which means a language that can be easily understood by any speaker of a Germanic language (a group numbering over 465 million native speakers with an additional 300 to 900 million speaking English as a second language) without ever having learned it.</p> |
4 | 4 |
<p>Folksprak is not meant to be designed by any one individual, but rather a collective work created by all interested parties; so you're welcome to participate.</p> |
5 |
- <p>The content of this document is the result of a collaboration between people from different parts on earth, connected by the internet. Its not a final specification for Folksprak, but a draft as a base to work on. Please let us know what you think about it and how you would improve it! You can find us in the IRC-Channel <span class="code">##folksprak</span> on <a href="irc://irc.freenode.net">irc.freenode.net</a>. You can also write an E-Mail to <a href="mailto:admin@folksprak.org">admin@folksprak.org</a>.</p> |
|
5 |
+ <p>The content of this document is the result of a collaboration between people from different parts on earth, connected by the internet. Its not a final specification for Folksprak, but a draft as a base to work on. Please let us know what you think about it and how you would improve it! You can find us in the IRC-Channel <span class="code">##folksprak</span> on <a href="irc://irc.freenode.net">irc.freenode.net</a>. You can also write an E-Mail to <a href="mailto:admin@folksprak.org">admin@folksprak.org</a> or leave thoughts at <a href="https://public.etherpad-mozilla.org/p/fs-draft">this Etherpad</a>.</p> |
|
6 | 6 |
</section> |
7 | 7 |
|
11 | 11 |
similarity index 50% |
12 | 12 |
rename from source/content/pronouns.html.php |
13 | 13 |
rename to source/content/pronouns.html.tpl |
... | ... |
@@ -1,13 +1,6 @@ |
1 | 1 |
<section class="section" id="pronouns"> |
2 | 2 |
<header>Pronouns</header> |
3 |
-<?php |
|
4 |
- compose |
|
5 |
- ( |
|
6 |
- [ |
|
7 |
- "personal_pronouns", |
|
8 |
- "correlatives", |
|
9 |
- ] |
|
10 |
- ); |
|
11 |
- ?> |
|
3 |
+ {{call::personal_pronouns.html.tpl}} |
|
4 |
+ {{call::correlatives.html.tpl}} |
|
12 | 5 |
</section> |
13 | 6 |
|
23 | 16 |
deleted file mode 100644 |
... | ... |
@@ -1,16 +0,0 @@ |
1 |
-<section class="chapter" id="vocabulary"> |
|
2 |
- <header>Vocabulary</header> |
|
3 |
-<?php |
|
4 |
- compose |
|
5 |
- ( |
|
6 |
- [ |
|
7 |
- "principles", |
|
8 |
- "pronouns", |
|
9 |
- "adpositions", |
|
10 |
- "word_functions", |
|
11 |
- "dictionary", |
|
12 |
- ] |
|
13 |
- ); |
|
14 |
- ?> |
|
15 |
-</section> |
|
16 |
- |
17 | 0 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,9 @@ |
1 |
+<section class="chapter" id="vocabulary"> |
|
2 |
+ <header>Vocabulary</header> |
|
3 |
+ [[call::principles.html.tpl]] |
|
4 |
+ {{call::pronouns.html.tpl}} |
|
5 |
+ {{call::adpositions.html.tpl}} |
|
6 |
+ [[call::word_functions.html.tpl]] |
|
7 |
+ {{call::dictionary.html.tpl}} |
|
8 |
+</section> |
|
9 |
+ |
0 | 7 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
1 |
+const _fs = require("fs"); |
|
2 |
+ |
|
3 |
+let data_master = {}; |
|
4 |
+const dir_source = "source/data"; |
|
5 |
+_fs.readdir( |
|
6 |
+ dir_source, |
|
7 |
+ (error, names) => { |
|
8 |
+ names.forEach( |
|
9 |
+ (name) => { |
|
10 |
+ const path = (dir_source + "/" + name); |
|
11 |
+ const content = _fs.readFileSync(path); |
|
12 |
+ const data_segment = JSON.parse(content); |
|
13 |
+ const key = name.split(".")[0]; |
|
14 |
+ data_master[key] = data_segment; |
|
15 |
+ } |
|
16 |
+ ); |
|
17 |
+ console.info(JSON.stringify(data_master)); |
|
18 |
+ } |
|
19 |
+); |
|
20 |
+ |
... | ... |
@@ -7,9 +7,8 @@ |
7 | 7 |
"sub": [ |
8 | 8 |
{ |
9 | 9 |
"name": "structure", |
10 |
- "type": "php", |
|
10 |
+ "type": "script", |
|
11 | 11 |
"parameters": { |
12 |
- "only_last": true, |
|
13 | 12 |
"inputs": [ |
14 | 13 |
"source/data/adpositions.json", |
15 | 14 |
"source/data/common.json", |
... | ... |
@@ -26,39 +25,42 @@ |
26 | 25 |
"source/logic/server/settings.php", |
27 | 26 |
"source/logic/server/table.php", |
28 | 27 |
"source/logic/server/sql.php", |
29 |
- "source/content/meta.html.php", |
|
30 |
- "source/content/introduction.html.php", |
|
31 |
- "source/content/preface.html.php", |
|
32 |
- "source/content/key_parameters.html.php", |
|
33 |
- "source/content/toc.html.php", |
|
34 |
- "source/content/basics.html.php", |
|
35 |
- "source/content/phonology_and_orthography.html.php", |
|
36 |
- "source/content/grammar.html.php", |
|
37 |
- "source/content/personal_pronouns.html.php", |
|
38 |
- "source/content/correlatives.html.php", |
|
39 |
- "source/content/conjugation.html.php", |
|
40 |
- "source/content/infinite_verbforms.html.php", |
|
41 |
- "source/content/modal_verbs.html.php", |
|
42 |
- "source/content/tempora_and_modi.html.php", |
|
43 |
- "source/content/negation.html.php", |
|
44 |
- "source/content/declension.html.php", |
|
45 |
- "source/content/numeri.html.php", |
|
46 |
- "source/content/cases.html.php", |
|
47 |
- "source/content/definiteness.html.php", |
|
48 |
- "source/content/attributes.html.php", |
|
49 |
- "source/content/sentence_structure.html.php", |
|
50 |
- "source/content/vocabulary.html.php", |
|
51 |
- "source/content/principles.html.php", |
|
52 |
- "source/content/word_functions.html.php", |
|
53 |
- "source/content/adpositions.html.php", |
|
54 |
- "source/content/pronouns.html.php", |
|
55 |
- "source/content/dictionary.html.php", |
|
56 |
- "source/content/examples.html.php", |
|
57 |
- "source/content/example_sentences.html.php", |
|
58 |
- "source/content/example_texts.html.php", |
|
59 |
- "source/content/draft.html.php" |
|
28 |
+ "source/content/meta.html.tpl", |
|
29 |
+ "source/content/introduction.html.tpl", |
|
30 |
+ "source/content/preface.html.tpl", |
|
31 |
+ "source/content/key_parameters.html.tpl", |
|
32 |
+ "source/content/toc.html.tpl", |
|
33 |
+ "source/content/basics.html.tpl", |
|
34 |
+ "source/content/phonology_and_orthography.html.tpl", |
|
35 |
+ "source/content/grammar.html.tpl", |
|
36 |
+ "source/content/personal_pronouns.html.tpl", |
|
37 |
+ "source/content/correlatives.html.tpl", |
|
38 |
+ "source/content/conjugation.html.tpl", |
|
39 |
+ "source/content/infinite_verbforms.html.tpl", |
|
40 |
+ "source/content/modal_verbs.html.tpl", |
|
41 |
+ "source/content/tempora_and_modi.html.tpl", |
|
42 |
+ "source/content/negation.html.tpl", |
|
43 |
+ "source/content/declension.html.tpl", |
|
44 |
+ "source/content/numeri.html.tpl", |
|
45 |
+ "source/content/cases.html.tpl", |
|
46 |
+ "source/content/definiteness.html.tpl", |
|
47 |
+ "source/content/attributes.html.tpl", |
|
48 |
+ "source/content/sentence_structure.html.tpl", |
|
49 |
+ "source/content/vocabulary.html.tpl", |
|
50 |
+ "source/content/principles.html.tpl", |
|
51 |
+ "source/content/word_functions.html.tpl", |
|
52 |
+ "source/content/adpositions.html.tpl", |
|
53 |
+ "source/content/pronouns.html.tpl", |
|
54 |
+ "source/content/dictionary.html.tpl", |
|
55 |
+ "source/content/examples.html.tpl", |
|
56 |
+ "source/content/example_sentences.html.tpl", |
|
57 |
+ "source/content/example_texts.html.tpl", |
|
58 |
+ "source/content/draft.html.tpl" |
|
60 | 59 |
], |
61 |
- "output": "build/draft.html" |
|
60 |
+ "outputs": [ |
|
61 |
+ "build/draft.html" |
|
62 |
+ ], |
|
63 |
+ "path": "tools/coin.sh" |
|
62 | 64 |
} |
63 | 65 |
}, |
64 | 66 |
{ |
65 | 67 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,27 @@ |
1 |
+"use strict"; |
|
2 |
+exports.__esModule = true; |
|
3 |
+/** |
|
4 |
+ * @author kcf |
|
5 |
+ */ |
|
6 |
+function encode(wert) { |
|
7 |
+ return lib_code.base64_encode(wert); |
|
8 |
+} |
|
9 |
+/** |
|
10 |
+ * @author kcf |
|
11 |
+ */ |
|
12 |
+function definieren() { |
|
13 |
+ return { |
|
14 |
+ "name": "base64", |
|
15 |
+ "modifikatoren": { |
|
16 |
+ "encode": [ |
|
17 |
+ { |
|
18 |
+ "name": "base64", |
|
19 |
+ "funktion": function () { return function (wert) { |
|
20 |
+ return encode(wert); |
|
21 |
+ }; } |
|
22 |
+ }, |
|
23 |
+ ] |
|
24 |
+ } |
|
25 |
+ }; |
|
26 |
+} |
|
27 |
+exports.definieren = definieren; |
0 | 28 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,262 @@ |
1 |
+"use strict"; |
|
2 |
+exports.__esModule = true; |
|
3 |
+/** |
|
4 |
+ * @author fenris |
|
5 |
+ */ |
|
6 |
+function objvals(objekt) { |
|
7 |
+ return Object.keys(objekt).map(function (key) { return objekt[key]; }); |
|
8 |
+} |
|
9 |
+/** |
|
10 |
+ * @author fenris |
|
11 |
+ */ |
|
12 |
+function merge(liste_x, liste_y, ordnung) { |
|
13 |
+ if (liste_x.length <= 0) { |
|
14 |
+ return liste_y; |
|
15 |
+ } |
|
16 |
+ else if (liste_y.length <= 0) { |
|
17 |
+ return liste_x; |
|
18 |
+ } |
|
19 |
+ else { |
|
20 |
+ return (ordnung(liste_x[0], liste_y[0]) |
|
21 |
+ ? ([liste_x[0]].concat(merge(liste_x.slice(1), liste_y, ordnung))) |
|
22 |
+ : ([liste_y[0]].concat(merge(liste_x, liste_y.slice(1), ordnung)))); |
|
23 |
+ } |
|
24 |
+} |
|
25 |
+/** |
|
26 |
+ * @author fenris |
|
27 |
+ */ |
|
28 |
+function mergesort(liste, ordnung) { |
|
29 |
+ if (liste.length <= 1) { |
|
30 |
+ return liste; |
|
31 |
+ } |
|
32 |
+ else { |
|
33 |
+ var n = (Math.floor(liste.length / 2)); |
|
34 |
+ return merge(mergesort(liste.slice(0, n), ordnung), mergesort(liste.slice(n), ordnung), ordnung); |
|
35 |
+ } |
|
36 |
+} |
|
37 |
+/** |
|
38 |
+ * @author fenris |
|
39 |
+ */ |
|
40 |
+function order_list(liste, kollation) { |
|
41 |
+ if (kollation === void 0) { kollation = (function (x, y) { return (x === y); }); } |
|
42 |
+ return (function (x, y) { |
|
43 |
+ var i = liste["findIndex"](function (element) { return kollation(x, element); }); |
|
44 |
+ var j = liste["findIndex"](function (element) { return kollation(y, element); }); |
|
45 |
+ return (i <= j); |
|
46 |
+ }); |
|
47 |
+} |
|
48 |
+/** |
|
49 |
+ * @author fenris |
|
50 |
+ */ |
|
51 |
+function order_lex(ordnungen) { |
|
52 |
+ return (function (x, y) { |
|
53 |
+ if ((ordnungen.length <= 0) |
|
54 |
+ || |
|
55 |
+ (x.length <= 0) |
|
56 |
+ || |
|
57 |
+ (y.length <= 0)) { |
|
58 |
+ return true; |
|
59 |
+ } |
|
60 |
+ else { |
|
61 |
+ var le = ordnungen[0](x[0], y[0]); |
|
62 |
+ var ge = ordnungen[0](y[0], x[0]); |
|
63 |
+ if (le && !ge) { |
|
64 |
+ return true; |
|
65 |
+ } |
|
66 |
+ else if (!le && ge) { |
|
67 |
+ return false; |
|
68 |
+ } |
|
69 |
+ else { |
|
70 |
+ return order_lex(ordnungen.slice(1))(x.slice(1), y.slice(1)); |
|
71 |
+ } |
|
72 |
+ } |
|
73 |
+ }); |
|
74 |
+} |
|
75 |
+/* |
|
76 |
+ |
|
77 |
+ +------+------+------+ |
|
78 |
+ | xA | xB | xC | |
|
79 |
+ +------+------+------+ |
|
80 |
+ | a2 | b1 | c3 | |
|
81 |
+ | a1 | b1 | c0 | |
|
82 |
+ | a1 | b3 | c2 | |
|
83 |
+ | a2 | b2 | c4 | |
|
84 |
+ | a1 | b2 | c1 | |
|
85 |
+ | a2 | b4 | c5 | |
|
86 |
+ +------+------+------+ |
|
87 |
+ |
|
88 |
+ +------+------+------+------+------+ |
|
89 |
+ | xA | xB:b1| xB:b2| xB:b3| xB:b4| |
|
90 |
+ +------+------+------+------+------+ |
|
91 |
+ | a1 | c0 | c1 | c2 | -- | |
|
92 |
+ | a2 | c3 | c4 | -- | c5 | |
|
93 |
+ +------+------+------+------+------+ |
|
94 |
+ |
|
95 |
+ */ |
|
96 |
+/** |
|
97 |
+ * @author fenris |
|
98 |
+ */ |
|
99 |
+function anordnen(_a) { |
|
100 |
+ var daten = _a["daten"], namen_senkrecht = _a["senkrecht"], namen_waagerecht = _a["waagerecht"], _b = _a["kollationen"], kollationen = _b === void 0 ? {} : _b, _c = _a["ordnungen"], ordnungen = _c === void 0 ? {} : _c, _d = _a["feldsatz_kuerzen"], feldsatz_kuerzen = _d === void 0 ? true : _d, _e = _a["sortierung_propagieren"], sortierung_propagieren = _e === void 0 ? true : _e; |
|
101 |
+ var kollation_satz = function (satz_x, satz_y, namen) { |
|
102 |
+ return (namen.every(function (name) { return kollationen[name](satz_x[name], satz_y[name]); })); |
|
103 |
+ }; |
|
104 |
+ var sammeln = function (namen) { |
|
105 |
+ var liste = []; |
|
106 |
+ // Heraussuchen |
|
107 |
+ daten |
|
108 |
+ .forEach(function (satz_urspruenglich) { |
|
109 |
+ var satz_neu = {}; |
|
110 |
+ namen.forEach(function (name) { satz_neu[name] = satz_urspruenglich[name]; }); |
|
111 |
+ var vorhanden = liste.some(function (satz_alt) { return kollation_satz(satz_alt, satz_neu, namen); }); |
|
112 |
+ if (!vorhanden) { |
|
113 |
+ liste.push(satz_neu); |
|
114 |
+ } |
|
115 |
+ }); |
|
116 |
+ // Sortieren |
|
117 |
+ liste = mergesort(liste, function (x, y) { |
|
118 |
+ var x_ = namen.map(function (name) { return x[name]; }); |
|
119 |
+ var y_ = namen.map(function (name) { return y[name]; }); |
|
120 |
+ var ordnung = order_lex(namen.map(function (name) { return ordnungen[name]; })); |
|
121 |
+ return ordnung(x_, y_); |
|
122 |
+ }); |
|
123 |
+ return liste; |
|
124 |
+ }; |
|
125 |
+ // Kollationen und Ordnungen vervollständigen |
|
126 |
+ { |
|
127 |
+ ([].concat(namen_senkrecht).concat(namen_waagerecht)) |
|
128 |
+ .forEach(function (name) { |
|
129 |
+ // Kollation ergänzen |
|
130 |
+ if (!kollationen.hasOwnProperty(name)) { |
|
131 |
+ kollationen[name] = (function (x, y) { return (x === y); }); |
|
132 |
+ } |
|
133 |
+ // Ordnung ergänzen |
|
134 |
+ if (!ordnungen.hasOwnProperty(name)) { |
|
135 |
+ ordnungen[name] = (sortierung_propagieren ? (function (x, y) { return false; }) : (function (x, y) { return (x <= y); })); |
|
136 |
+ } |
|
137 |
+ }); |
|
138 |
+ } |
|
139 |
+ var werte_senkrecht = sammeln(namen_senkrecht); |
|
140 |
+ var werte_waagerecht = sammeln(namen_waagerecht); |
|
141 |
+ var meta = { |
|
142 |
+ "x": {}, |
|
143 |
+ "y": {} |
|
144 |
+ }; |
|
145 |
+ werte_senkrecht.forEach(function (satz, nummer) { var name = ("y" + nummer.toFixed(0)); meta.y[name] = satz; }); |
|
146 |
+ werte_waagerecht.forEach(function (satz, nummer) { var name = ("x" + nummer.toFixed(0)); meta.x[name] = satz; }); |
|
147 |
+ var data = (Object.keys(meta.y) |
|
148 |
+ .map(function (label_senkrecht) { |
|
149 |
+ var satz_senkrecht = meta.y[label_senkrecht]; |
|
150 |
+ var satz_ergebnis = {}; |
|
151 |
+ // Kopf |
|
152 |
+ { |
|
153 |
+ var name_1 = "_"; |
|
154 |
+ satz_ergebnis[name_1] = label_senkrecht; |
|
155 |
+ } |
|
156 |
+ // Rumpf |
|
157 |
+ { |
|
158 |
+ Object.keys(meta.x) |
|
159 |
+ .forEach(function (label_waagerecht) { |
|
160 |
+ var satz_waagerecht = meta.x[label_waagerecht]; |
|
161 |
+ var saetze_feld = (daten |
|
162 |
+ .filter(function (satz_urspruenglich) { return (kollation_satz(satz_urspruenglich, satz_senkrecht, namen_senkrecht) |
|
163 |
+ && |
|
164 |
+ kollation_satz(satz_urspruenglich, satz_waagerecht, namen_waagerecht)); }) |
|
165 |
+ .map(function (satz_urspruenglich) { |
|
166 |
+ var satz_neu = {}; |
|
167 |
+ Object.keys(satz_urspruenglich) |
|
168 |
+ .forEach(function (name) { |
|
169 |
+ if (!feldsatz_kuerzen |
|
170 |
+ || |
|
171 |
+ (namen_senkrecht.every(function (name_) { return (name !== name_); }) |
|
172 |
+ && |
|
173 |
+ namen_waagerecht.every(function (name_) { return (name !== name_); }))) { |
|
174 |
+ satz_neu[name] = satz_urspruenglich[name]; |
|
175 |
+ } |
|
176 |
+ }); |
|
177 |
+ return satz_neu; |
|
178 |
+ })); |
|
179 |
+ satz_ergebnis[label_waagerecht] = saetze_feld; |
|
180 |
+ }); |
|
181 |
+ } |
|
182 |
+ return satz_ergebnis; |
|
183 |
+ })); |
|
184 |
+ return { |
|
185 |
+ "meta": meta, |
|
186 |
+ "data": data |
|
187 |
+ }; |
|
188 |
+} |
|
189 |
+/** |
|
190 |
+ * @author fenris |
|
191 |
+ */ |
|
192 |
+function xmlwrap(name, kern) { |
|
193 |
+ return (("<" + name + ">") + kern + ("</" + name + ">") + "\n"); |
|
194 |
+} |
|
195 |
+/** |
|
196 |
+ * @author fenris |
|
197 |
+ */ |
|
198 |
+function htmltable(titel, daten, _2d) { |
|
199 |
+ if (_2d === void 0) { _2d = false; } |
|
200 |
+ return (xmlwrap("table", ( |
|
201 |
+ // kopf |
|
202 |
+ xmlwrap("thead", xmlwrap("tr", (titel |
|
203 |
+ .map(function (titel_) { return xmlwrap("th", titel_); }) |
|
204 |
+ .join("")))) |
|
205 |
+ + |
|
206 |
+ // rumpf |
|
207 |
+ xmlwrap("tbody", (daten |
|
208 |
+ .map(function (satz) { return xmlwrap("tr", satz.map(function (feld, nummer) { return ((_2d && (nummer === 0)) |
|
209 |
+ ? xmlwrap("th", feld) |
|
210 |
+ : xmlwrap("td", feld)); }) |
|
211 |
+ .join("")); }) |
|
212 |
+ .join("")))))); |
|
213 |
+} |
|
214 |
+/** |
|
215 |
+ * @author kcf |
|
216 |
+ */ |
|
217 |
+function definieren() { |
|
218 |
+ return { |
|
219 |
+ "name": "fold", |
|
220 |
+ "befehle": [ |
|
221 |
+ { |
|
222 |
+ "name": "fold", |
|
223 |
+ "funktion": function (args) { return function (wert) { |
|
224 |
+ var senkrecht_ = ((args.length > 0) |
|
225 |
+ ? args.shift() |
|
226 |
+ : null); |
|
227 |
+ var waagerecht_ = ((args.length > 0) |
|
228 |
+ ? args.shift() |
|
229 |
+ : null); |
|
230 |
+ var senkrecht = ((senkrecht_ !== null) |
|
231 |
+ ? senkrecht_.split("/") |
|
232 |
+ : []); |
|
233 |
+ var waagerecht = ((waagerecht_ !== null) |
|
234 |
+ ? waagerecht_.split("/") |
|
235 |
+ : []); |
|
236 |
+ var tabelle = anordnen({ |
|
237 |
+ "daten": wert, |
|
238 |
+ "senkrecht": senkrecht, |
|
239 |
+ "waagerecht": waagerecht |
|
240 |
+ }); |
|
241 |
+ var tabelle_ = { |
|
242 |
+ "kopf": ([""].concat(Object.keys(tabelle.meta.x).map(function (label) { return ( |
|
243 |
+ // JSON.stringify(tabelle.meta.x[label]) |
|
244 |
+ objvals(tabelle.meta.x[label]).join("/")); }))), |
|
245 |
+ "rumpf": tabelle.data.map(function (satz) { return (Object.keys(satz).map(function (label) { return ((label === "_") |
|
246 |
+ // ? JSON.stringify(tabelle.meta.y[satz[label]]) |
|
247 |
+ ? objvals(tabelle.meta.y[satz[label]]).join("/") |
|
248 |
+ // : JSON.stringify(satz[label]) |
|
249 |
+ : (satz[label] |
|
250 |
+ .filter(function (x) { return (x["language_id"] === "flk"); }) |
|
251 |
+ .map(function (x) { return x["words"].join(", "); }) |
|
252 |
+ .join("; "))); })); }) |
|
253 |
+ }; |
|
254 |
+ var tabelle__ = htmltable(tabelle_.kopf, tabelle_.rumpf, true); |
|
255 |
+ var style = xmlwrap("style", "td {font-style: italic;}"); |
|
256 |
+ return (style + tabelle__); |
|
257 |
+ }; } |
|
258 |
+ }, |
|
259 |
+ ] |
|
260 |
+ }; |
|
261 |
+} |
|
262 |
+exports.definieren = definieren; |
0 | 263 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,105 @@ |
1 |
+"use strict"; |
|
2 |
+exports.__esModule = true; |
|
3 |
+/** |
|
4 |
+ * @author fenris |
|
5 |
+ */ |
|
6 |
+function zeichenkette_zufaellig(laenge) { |
|
7 |
+ var interpolieren = function (x, y, t) { |
|
8 |
+ return (((1 - t) * x) + ((t) * y)); |
|
9 |
+ }; |
|
10 |
+ var zeichenkette = ""; |
|
11 |
+ for (var i = 0; i < laenge; ++i) { |
|
12 |
+ var code = Math.floor(interpolieren(32, 128, Math.random())); |
|
13 |
+ zeichenkette += String.fromCharCode(code); |
|
14 |
+ } |
|
15 |
+ return zeichenkette; |
|
16 |
+} |
|
17 |
+/** |
|
18 |
+ * @author kcf |
|
19 |
+ */ |
|
20 |
+function escape_(wert) { |
|
21 |
+ return (wert |
|
22 |
+ .replace(new RegExp("&", "g"), "&") |
|
23 |
+ .replace(new RegExp("<", "g"), "<") |
|
24 |
+ .replace(new RegExp(">", "g"), ">") |
|
25 |
+ .replace(new RegExp("\"", "g"), """) |
|
26 |
+ .replace(new RegExp("'", "g"), "'")); |
|
27 |
+} |
|
28 |
+/** |
|
29 |
+ * @author kcf |
|
30 |
+ */ |
|
31 |
+function squelch(zeichenkette, laenge) { |
|
32 |
+ var stuecke = []; |
|
33 |
+ var position = 0; |
|
34 |
+ var ende = zeichenkette.length; |
|
35 |
+ while (position < ende) { |
|
36 |
+ var stueck = zeichenkette.slice(position, Math.min(ende, position + laenge)); |
|
37 |
+ stuecke.push(stueck); |
|
38 |
+ position += laenge; |
|
39 |
+ } |
|
40 |
+ return ("<span class=\"ninja\">" |
|
41 |
+ + |
|
42 |
+ (stuecke |
|
43 |
+ .map(function (stueck) { return ([ |
|
44 |
+ ("<span>" + escape_(zeichenkette_zufaellig(laenge)) + "</span>"), |
|
45 |
+ ("<span>" + escape_(stueck) + "</span>"), |
|
46 |
+ ]); }) |
|
47 |
+ .reduce(function (x, y) { return x.concat(y); }, []) |
|
48 |
+ .join("")) |
|
49 |
+ + |
|
50 |
+ "</span>"); |
|
51 |
+} |
|
52 |
+/** |
|
53 |
+ * @author kcf |
|
54 |
+ */ |
|
55 |
+function habitus(modifikatoren) { |
|
56 |
+ if (!(modifikatoren |
|
57 |
+ .some(function (modifikator) { return (((modifikator.art === "escape") |
|
58 |
+ && |
|
59 |
+ (modifikator.angaben["ziel"] === "html")) |
|
60 |
+ || |
|
61 |
+ ((modifikator.art === "squelch") |
|
62 |
+ && |
|
63 |
+ (modifikator.angaben["ziel"] === "html"))); }))) { |
|
64 |
+ return modifikatoren.concat([{ "art": "escape", "angaben": { "ziel": "html" } }]); |
|
65 |
+ } |
|
66 |
+ else { |
|
67 |
+ return modifikatoren; |
|
68 |
+ } |
|
69 |
+} |
|
70 |
+/** |
|
71 |
+ * @author kcf |
|
72 |
+ */ |
|
73 |
+function definieren() { |
|
74 |
+ return { |
|
75 |
+ "name": "html", |
|
76 |
+ "modifikatoren": { |
|
77 |
+ "escape": [ |
|
78 |
+ { |
|
79 |
+ "name": "html", |
|
80 |
+ "funktion": function () { return function (wert) { |
|
81 |
+ return escape_(wert); |
|
82 |
+ }; } |
|
83 |
+ }, |
|
84 |
+ ], |
|
85 |
+ "squelch": [ |
|
86 |
+ { |
|
87 |
+ "name": "html", |
|
88 |
+ "funktion": function (args) { return function (wert) { |
|
89 |
+ var laenge = ((args.length > 0) ? parseInt(args.shift()) : 2); |
|
90 |
+ return squelch(wert, laenge); |
|
91 |
+ }; } |
|
92 |
+ }, |
|
93 |
+ ] |
|
94 |
+ }, |
|
95 |
+ "habiti": [ |
|
96 |
+ { |
|
97 |
+ "name": "html", |
|
98 |
+ "funktion": function (modifikatoren) { |
|
99 |
+ return habitus(modifikatoren); |
|
100 |
+ } |
|
101 |
+ }, |
|
102 |
+ ] |
|
103 |
+ }; |
|
104 |
+} |
|
105 |
+exports.definieren = definieren; |
0 | 106 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,27 @@ |
1 |
+"use strict"; |
|
2 |
+exports.__esModule = true; |
|
3 |
+/** |
|
4 |
+ * @author kcf |
|
5 |
+ */ |
|
6 |
+function encode(wert) { |
|
7 |
+ return lib_code.json_encode(wert); |
|
8 |
+} |
|
9 |
+/** |
|
10 |
+ * @author kcf |
|
11 |
+ */ |
|
12 |
+function definieren() { |
|
13 |
+ return { |
|
14 |
+ "name": "json", |
|
15 |
+ "modifikatoren": { |
|
16 |
+ "encode": [ |
|
17 |
+ { |
|
18 |
+ "name": "json", |
|
19 |
+ "funktion": function () { return function (wert) { |
|
20 |
+ return encode(wert); |
|
21 |
+ }; } |
|
22 |
+ }, |
|
23 |
+ ] |
|
24 |
+ } |
|
25 |
+ }; |
|
26 |
+} |
|
27 |
+exports.definieren = definieren; |
0 | 28 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,52 @@ |
1 |
+"use strict"; |
|
2 |
+exports.__esModule = true; |
|
3 |
+/** |
|
4 |
+ * @author kcf |
|
5 |
+ */ |
|
6 |
+function escape_(wert) { |
|
7 |
+ return (wert |
|
8 |
+ .replace(new RegExp("\\\\", "g"), "\\\\") |
|
9 |
+ .replace(new RegExp("%", "g"), "\\%") |
|
10 |
+ .replace(new RegExp("&", "g"), "\\&")); |
|
11 |
+} |
|
12 |
+/** |
|
13 |
+ * @author kcf |
|
14 |
+ */ |
|
15 |
+function habitus(modifikatoren) { |
|
16 |
+ if (!(modifikatoren |
|
17 |
+ .some(function (modifikator) { return ((modifikator.art === "escape") |
|
18 |
+ && |
|
19 |
+ (modifikator.angaben["ziel"] === "latex")); }))) { |
|
20 |
+ return modifikatoren.concat([{ "art": "escape", "angaben": { "ziel": "latex" } }]); |
|
21 |
+ } |
|
22 |
+ else { |
|
23 |
+ return modifikatoren; |
|
24 |
+ } |
|
25 |
+} |
|
26 |
+/** |
|
27 |
+ * @author kcf |
|
28 |
+ */ |
|
29 |
+function definieren() { |
|
30 |
+ return { |
|
31 |
+ "name": "latex", |
|
32 |
+ "modifikatoren": { |
|
33 |
+ "escape": [ |
|
34 |
+ { |
|
35 |
+ "name": "latex", |
|
36 |
+ "funktion": function () { return function (wert) { |
|
37 |
+ return escape_(wert); |
|
38 |
+ }; } |
|
39 |
+ }, |
|
40 |
+ ] |
|
41 |
+ }, |
|
42 |
+ "habiti": [ |
|
43 |
+ { |
|
44 |
+ "name": "latex", |
|
45 |
+ "funktion": function (modifikatoren) { |
|
46 |
+ return habitus(modifikatoren); |
|
47 |
+ } |
|
48 |
+ }, |
|
49 |
+ ] |
|
50 |
+ }; |
|
51 |
+} |
|
52 |
+exports.definieren = definieren; |
0 | 53 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,52 @@ |
1 |
+"use strict"; |
|
2 |
+exports.__esModule = true; |
|
3 |
+/** |
|
4 |
+ * @author kcf |
|
5 |
+ */ |
|
6 |
+function escape_(wert) { |
|
7 |
+ return (wert |
|
8 |
+ .replace(new RegExp("\\\\", "g"), "\\\\") |
|
9 |
+ .replace(new RegExp("%", "g"), "\\%") |
|
10 |
+ .replace(new RegExp("&", "g"), "\\&")); |
|
11 |
+} |
|
12 |
+/** |
|
13 |
+ * @author kcf |
|
14 |
+ */ |
|
15 |
+function habitus(modifikatoren) { |
|
16 |
+ if (!(modifikatoren |
|
17 |
+ .some(function (modifikator) { return ((modifikator.art === "escape") |
|
18 |
+ && |
|
19 |
+ (modifikator.angaben["ziel"] === "markdown")); }))) { |
|
20 |
+ return modifikatoren.concat([{ "art": "escape", "angaben": { "ziel": "markdown" } }]); |
|
21 |
+ } |
|
22 |
+ else { |
|
23 |
+ return modifikatoren; |
|
24 |
+ } |
|
25 |
+} |
|
26 |
+/** |
|
27 |
+ * @author kcf |
|
28 |
+ */ |
|
29 |
+function definieren() { |
|
30 |
+ return { |
|
31 |
+ "name": "markdown", |
|
32 |
+ "modifikatoren": { |
|
33 |
+ "escape": [ |
|
34 |
+ { |
|
35 |
+ "name": "markdown", |
|
36 |
+ "funktion": function () { return function (wert) { |
|
37 |
+ return escape_(wert); |
|
38 |
+ }; } |
|
39 |
+ }, |
|
40 |
+ ] |
|
41 |
+ }, |
|
42 |
+ "habiti": [ |
|
43 |
+ { |
|
44 |
+ "name": "markdown", |
|
45 |
+ "funktion": function (modifikatoren) { |
|
46 |
+ return habitus(modifikatoren); |
|
47 |
+ } |
|
48 |
+ }, |
|
49 |
+ ] |
|
50 |
+ }; |
|
51 |
+} |
|
52 |
+exports.definieren = definieren; |
0 | 53 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,50 @@ |
1 |
+"use strict"; |
|
2 |
+exports.__esModule = true; |
|
3 |
+/** |
|
4 |
+ * @author kcf |
|
5 |
+ */ |
|
6 |
+function escape_(wert) { |
|
7 |
+ return (wert |
|
8 |
+ .replace("\'", "\\\'")); |
|
9 |
+} |
|
10 |
+/** |
|
11 |
+ * @author kcf |
|
12 |
+ */ |
|
13 |
+function habitus(modifikatoren) { |
|
14 |
+ if (!(modifikatoren |
|
15 |
+ .some(function (modifikator) { return ((modifikator.art === "escape") |
|
16 |
+ && |
|
17 |
+ (modifikator.angaben["ziel"] === "sql")); }))) { |
|
18 |
+ return modifikatoren.concat([{ "art": "escape", "angaben": { "ziel": "sql" } }]); |
|
19 |
+ } |
|
20 |
+ else { |
|
21 |
+ return modifikatoren; |
|
22 |
+ } |
|
23 |
+} |
|
24 |
+/** |
|
25 |
+ * @author kcf |
|
26 |
+ */ |
|
27 |
+function definieren() { |
|
28 |
+ return { |
|
29 |
+ "name": "sql", |
|
30 |
+ "modifikatoren": { |
|
31 |
+ "escape": [ |
|