Merge branch 'master' into work

pull/1/head
Ondřej Hruška 7 years ago
commit 180ab41299
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 17
      base.php
  2. 13
      compile_html.php
  3. 1
      lang/de.php
  4. 6
      package.json
  5. 24
      pages/help/charsets.php
  6. 2
      pages/help/cmd_d2d.php
  7. 81
      yarn.lock

@ -151,7 +151,8 @@ if (!function_exists('load_esp_charsets')) {
if (! file_exists($chsf)) { if (! file_exists($chsf)) {
return [ return [
'!! ERROR: `../user/character_sets.h` not found !!' => [ '!! ERROR: `../user/character_sets.h` not found !!' => [
['65', 'A', '&'], 'start' => 65,
'chars' => ['&'],
], ],
]; ];
} }
@ -189,13 +190,15 @@ if (!function_exists('load_esp_charsets')) {
$v = intval($v); $v = intval($v);
} }
$ascii = $start+$j; $ascii = $start+$j;
$table[] = [ $table[] = $literal ? $v : utf8($v==0? $ascii :$v);
$ascii,
chr($ascii),
$literal ? $v : utf8($v==0? $ascii :$v),
];
} }
$cps[$name] = $table;
$obj = [
'start' => $start,
'chars' => $table,
];
$cps[$name] = $obj;
} }
return $cps; return $cps;
} }

@ -63,9 +63,16 @@ foreach($_pages as $_k => $p) {
if (ESP_PROD) { if (ESP_PROD) {
$tmpfile = tempnam('/tmp', 'espterm').'.html'; $tmpfile = tempnam('/tmp', 'espterm').'.html';
file_put_contents($tmpfile, $s); file_put_contents($tmpfile, $s);
// using https://github.com/tdewolff/minify system('npm run html-minifier --'.
system('minify --html-keep-default-attrvals '. ' --remove-optional-tags'.
'-o '.escapeshellarg($outputPath).' '. ' --remove-script-type-attributes'.
' --remove-style-link-type-attributes'.
' --remove-comments'.
' --collapse-whitespace'.
' --collapse-boolean-attributes'.
' --html5'.
//' --max-line-length 120'.
' -o '.escapeshellarg($outputPath).
' '.escapeshellarg($tmpfile), $rv); ' '.escapeshellarg($tmpfile), $rv);
// fallback if minify is not installed // fallback if minify is not installed

@ -79,6 +79,7 @@ return [
'term.colors_preview' => '', 'term.colors_preview' => '',
'term.debugbar' => 'Debug-Leiste anzeigen', 'term.debugbar' => 'Debug-Leiste anzeigen',
'term.ascii_debug' => 'Kontrollcodes anzeigen', 'term.ascii_debug' => 'Kontrollcodes anzeigen',
'term.backdrop' => 'URL Hintergrundbild',
'cursor.block_blink' => 'Block, blinkend', 'cursor.block_blink' => 'Block, blinkend',
'cursor.block_steady' => 'Block, ruhig', 'cursor.block_steady' => 'Block, ruhig',

@ -10,10 +10,12 @@
"babel-preset-minify": "^0.2.0", "babel-preset-minify": "^0.2.0",
"node-sass": "^4.5.3", "node-sass": "^4.5.3",
"standard": "^10.0.3", "standard": "^10.0.3",
"webpack": "^3.6.0" "webpack": "^3.6.0",
"html-minifier": "^3.5.5"
}, },
"scripts": { "scripts": {
"webpack": "webpack --display-modules $@", "webpack": "webpack --display-modules $@",
"sass": "node-sass $@" "sass": "node-sass $@",
"html-minifier": "html-minifier $@"
} }
} }

@ -30,16 +30,30 @@
stays unchanged. stays unchanged.
</p> </p>
<script>
function bchst(start, str) {
var ar = str.split(' ');
for(var i=0;i<ar.length;i++) {
var a = String.fromCharCode(start+i);
var r = ar[i];
document.write('<div'+(r===a?' class="none"':'')+'><span>'+(start+i)+'</span><span>'+$.htmlEscape(a)+'</span><span>'+$.htmlEscape(r)+'</span></div>');
}
}
</script>
<?php <?php
$codepages = load_esp_charsets(); $codepages = load_esp_charsets();
foreach($codepages as $name => $cp) { foreach($codepages as $name => $cp) {
echo "<h4>Codepage `$name`</h4>\n"; echo "<h4>Codepage `$name`</h4>\n";
echo '<div class="charset">'; echo '<div class="charset">';
foreach($cp as $point) {
$dis = $point[1]==$point[2]?' class="none"' : ''; $t = implode("\x01", $cp['chars']);
echo "<div$dis><span>$point[0]</span><span>$point[1]</span><span>$point[2]</span></div>"; $t = json_encode($t, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
} $t = str_replace('\u0001', " ", $t); // space is never included
echo '</div>'; $t = htmlspecialchars($t,ENT_HTML5);
echo '<script>bchst('.$cp['start'].','.$t.')';
echo '</script></div>';
} }
?> ?>

@ -10,7 +10,7 @@
<p> <p>
Networking commands use the format `\e^...\a`, a Privacy Message (PM). Networking commands use the format `\e^...\a`, a Privacy Message (PM).
PM is similar to OSC, which uses `]` in place of `^`. The PM payload (text between `\e^` and `\a`) PM is similar to OSC, which uses `]` in place of `^`. The PM payload (text between `\e^` and `\a`)
must be shorter than 256 bytes, and should not contain any control characters (ASCII < 32). must be shorter than 256 bytes, and should not contain any control characters (ASCII &lt; 32).
</p> </p>
<h3>Device-to-device Messaging</h3> <h3>Device-to-device Messaging</h3>

@ -1007,6 +1007,13 @@ callsites@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
camel-case@3.0.x:
version "3.0.0"
resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73"
dependencies:
no-case "^2.2.0"
upper-case "^1.1.1"
camelcase-keys@^2.0.0: camelcase-keys@^2.0.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
@ -1081,6 +1088,12 @@ circular-json@^0.3.1:
version "0.3.3" version "0.3.3"
resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66"
clean-css@4.1.x:
version "4.1.9"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.9.tgz#35cee8ae7687a49b98034f70de00c4edd3826301"
dependencies:
source-map "0.5.x"
cli-cursor@^1.0.1: cli-cursor@^1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
@ -1121,7 +1134,7 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
dependencies: dependencies:
delayed-stream "~1.0.0" delayed-stream "~1.0.0"
commander@^2.11.0: commander@2.11.x, commander@^2.11.0, commander@~2.11.0:
version "2.11.0" version "2.11.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
@ -1991,6 +2004,10 @@ hawk@~3.1.3:
hoek "2.x.x" hoek "2.x.x"
sntp "1.x.x" sntp "1.x.x"
he@1.1.x:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
hmac-drbg@^1.0.0: hmac-drbg@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
@ -2014,6 +2031,19 @@ hosted-git-info@^2.1.4:
version "2.5.0" version "2.5.0"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c"
html-minifier@^3.5.5:
version "3.5.5"
resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.5.tgz#3bdc9427e638bbe3dbde96c0eb988b044f02739e"
dependencies:
camel-case "3.0.x"
clean-css "4.1.x"
commander "2.11.x"
he "1.1.x"
ncname "1.0.x"
param-case "2.1.x"
relateurl "0.2.x"
uglify-js "3.1.x"
http-signature@~1.1.0: http-signature@~1.1.0:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
@ -2456,6 +2486,10 @@ loud-rejection@^1.0.0:
currently-unhandled "^0.4.1" currently-unhandled "^0.4.1"
signal-exit "^3.0.0" signal-exit "^3.0.0"
lower-case@^1.1.1:
version "1.1.4"
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
lru-cache@^4.0.1: lru-cache@^4.0.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
@ -2591,6 +2625,18 @@ natural-compare@^1.4.0:
version "1.4.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
ncname@1.0.x:
version "1.0.0"
resolved "https://registry.yarnpkg.com/ncname/-/ncname-1.0.0.tgz#5b57ad18b1ca092864ef62b0b1ed8194f383b71c"
dependencies:
xml-char-classes "^1.0.0"
no-case@^2.2.0:
version "2.3.2"
resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac"
dependencies:
lower-case "^1.1.1"
node-gyp@^3.3.1: node-gyp@^3.3.1:
version "3.6.2" version "3.6.2"
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.2.tgz#9bfbe54562286284838e750eac05295853fa1c60" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.2.tgz#9bfbe54562286284838e750eac05295853fa1c60"
@ -2833,6 +2879,12 @@ pako@~0.2.0:
version "0.2.9" version "0.2.9"
resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
param-case@2.1.x:
version "2.1.1"
resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247"
dependencies:
no-case "^2.2.0"
parse-asn1@^5.0.0: parse-asn1@^5.0.0:
version "5.1.0" version "5.1.0"
resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712"
@ -3167,6 +3219,10 @@ regjsparser@^0.1.4:
dependencies: dependencies:
jsesc "~0.5.0" jsesc "~0.5.0"
relateurl@0.2.x:
version "0.2.7"
resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
remove-trailing-separator@^1.0.1: remove-trailing-separator@^1.0.1:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
@ -3375,16 +3431,16 @@ source-map-support@^0.4.15:
dependencies: dependencies:
source-map "^0.5.6" source-map "^0.5.6"
source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
source-map@^0.4.2: source-map@^0.4.2:
version "0.4.4" version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
dependencies: dependencies:
amdefine ">=0.0.4" amdefine ">=0.0.4"
source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
spdx-correct@~1.0.0: spdx-correct@~1.0.0:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
@ -3664,6 +3720,13 @@ typedarray@^0.0.6:
version "0.0.6" version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
uglify-js@3.1.x:
version "3.1.3"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.3.tgz#d61f0453b4718cab01581f3162aa90bab7520b42"
dependencies:
commander "~2.11.0"
source-map "~0.5.1"
uglify-js@^2.8.29: uglify-js@^2.8.29:
version "2.8.29" version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
@ -3693,6 +3756,10 @@ uniq@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
upper-case@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"
url@^0.11.0: url@^0.11.0:
version "0.11.0" version "0.11.0"
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
@ -3842,6 +3909,10 @@ write@^0.2.1:
dependencies: dependencies:
mkdirp "^0.5.1" mkdirp "^0.5.1"
xml-char-classes@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/xml-char-classes/-/xml-char-classes-1.0.0.tgz#64657848a20ffc5df583a42ad8a277b4512bbc4d"
xtend@^4.0.0, xtend@^4.0.1: xtend@^4.0.0, xtend@^4.0.1:
version "4.0.1" version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"

Loading…
Cancel
Save