?
test.txt, , ( ).
1,2,3,4,5,11,27
--lua
--
-- Hfcrkflrf ->
local file= io.open([[C:\123.txt]], "r") --
local result_file = io.open([[C:\456.txt]], "w") --
local t={}
t["a"]="" t["b"]="" t["c"]="" t["d"]="" t["e"]="" t["f"]=""
t["g"]="" t["h"]="" t["i"]="" t["j"]="" t["k"]="" t["l"]=""
t["m"]="" t["n"]="" t["o"]="" t["p"]="" t["q"]="" t["r"]=""
t["s"]="" t["t"]="" t["u"]="" t["v"]="" t["w"]="" t["x"]=""
t["y"]="" t["z"]="" t["`"]="" t["["]="" t["]"]="" t[";"]=""
t["'"]="" t[","]="" t["."]="" t["/"]="." t["A"]="" t["B"]=""
t["C"]="" t["D"]="" t["E"]="" t["F"]="" t["G"]="" t["H"]=""
t["I"]="" t["J"]="" t["K"]="" t["L"]="" t["M"]="" t["N"]=""
t["O"]="" t["P"]="" t["Q"]="" t["R"]="" t["S"]="" t["T"]=""
t["U"]="" t["V"]="" t["W"]="" t["X"]="" t["Y"]="" t["Z"]=""
t["{"]="" t["}"]="" t[":"]="" t['"']="" t["<"]="" t[">"]=""
t["?"]="," t["~"]="" t["@"]='"' t["#"]="" t["$"]=";" t["^"]=":"
t["&"]="?"
if file and result_file then --
for v in file:lines() do
result_file:write(string.gsub(v, ".", t).."\r\n") -- 't'
end
file:close()
result_file:close()
else
log (" /")
end
--lua
log "clear" log "mode compact"
local s=" URL" -- << url- ""
log(s)
local t={}
t["%D0%90"]="" t["%D0%91"]="" t["%D0%92"]="" t["%D0%93"]="" t["%D0%94"]="" t["%D0%95"]="" t["%D0%81"]="" t["%D0%96"]="" t["%D0%97"]="" t["%D0%98"]="" t["%D0%99"]=""
t["%D0%9A"]="" t["%D0%9B"]="" t["%D0%9C"]="" t["%D0%9D"]="" t["%D0%9E"]="" t["%D0%9F"]="" t["%D0%A0"]="" t["%D0%A1"]="" t["%D0%A2"]="" t["%D0%A3"]="" t["%D0%A4"]=""
t["%D0%A5"]="" t["%D0%A6"]="" t["%D0%A7"]="" t["%D0%A8"]="" t["%D0%A9"]="" t["%D0%AA"]="" t["%D0%AB"]="" t["%D0%AC"]="" t["%D0%AD"]="" t["%D0%AE"]="" t["%D0%AF"]=""
t["%D0%B0"]="" t["%D0%B1"]="" t["%D0%B2"]="" t["%D0%B3"]="" t["%D0%B4"]="" t["%D0%B5"]="" t["%D1%91"]="" t["%D0%B6"]="" t["%D0%B7"]="" t["%D0%B8"]="" t["%D0%B9"]=""
t["%D0%BA"]="" t["%D0%BB"]="" t["%D0%BC"]="" t["%D0%BD"]="" t["%D0%BE"]="" t["%D0%BF"]="" t["%D1%80"]="" t["%D1%81"]="" t["%D1%82"]="" t["%D1%83"]="" t["%D1%84"]=""
t["%D1%85"]="" t["%D1%86"]="" t["%D1%87"]="" t["%D1%88"]="" t["%D1%89"]="" t["%D1%8A"]="" t["%D1%8B"]="" t["%D1%8C"]="" t["%D1%8D"]="" t["%D1%8E"]="" t["%D1%8F"]=""
for v in pairs(t) do -- , "%D0%9A", "%d0%9a"
t[v:lower()]=t[v]
end
for i=32, 127 do t["%" .. string.format("%X", i)]=string.char(i) end -- , ascii 32 127
s=s:gsub("%%[Dd][01]%%%x%x", t) --
s=s:gsub("%%..", t) --
log(s) --
--lua
log "clear" log "mode compact"
local s=" ."
log (s)
log (s:reverse())
--lua
log "clear" log "mode compact"
-- () .
local text=[[Text or - . -..- -]]-- << .
log(text)
local t, t1, temp = {}, {}, {}
t["A"]=".-" t["B"]="-..." t["C"]="-.-." t["D"]="-.." t["E"]="." t["F"]="..-." t["G"]="--."
t["H"]="...." t["I"]=".." t["J"]=".---" t["K"]="-.-" t["L"]=".-.." t["M"]="--" t["N"]="-."
t["O"]="---" t["P"]=".--." t["Q"]="--.-" t["R"]=".-." t["S"]="..." t["T"]="-" t["U"]="..-"
t["V"]="...-" t["W"]=".--" t["X"]="-..-" t["Y"]="-.--" t["Z"]="--.."
for v in pairs(t) do temp[string_lower(v)]=t[v] end
for v in pairs(temp) do t[v]=temp[v] end
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-"
for v in pairs(t) do t1[t[v]]=v end -- , 't'
local x=0
for v in text:gmatch("[%.%- ]") do x=x+1 end -- ,
if x > #text*50/100 then -- 50%,
text=string.gsub((text .. " "):gsub("(.-) ", t1), " ", " ") --
else
text=string.gsub(text:gsub("(.)", "%1 "), "[^ ]", t) --
end
log (text)
--lua
log "clear" log "mode compact"
-- () .
local text=[[ - . -.- ... -]]-- << .
log(text)
local t, t1, temp = {}, {}, {}
t[""]=".-" t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="." t[""]="."
t[""]="...-" t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.." t[""]="--"
t[""]="-." t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-" t[""]="..-"
t[""]="..-." t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-" t[""]="-..-"
t[""]="-..-" t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
for v in pairs(t) do temp[string_lower(v)]=t[v] end
for v in pairs(temp) do t[v]=temp[v] end
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-"
for v in pairs(t) do t1[t[v]]=v end -- , 't'
local x=0
for v in text:gmatch("[%.%- ]") do x=x+1 end -- ,
if x > #text*50/100 then -- 50%,
text=string.gsub((text .. " "):gsub("(.-) ", t1), " ", " ") --
else
text=string.gsub(text:gsub("(.)", "%1 "), "[^ ]", t) --
end
log (text)
--lua
local file= io.open([[C:\123.txt]], "r") --
local result_file = io.open([[C:\456.txt]], "w") --
local t={}
t["1"]="" -- '1' ''
t["2"]="" -- '2' ''
t["11"]=" "
if file and result_file then --
for v in file:lines() do
result_file:write(string.gsub(v, "[^,]+", t).."\r\n") -- 't'
end
file:close()
result_file:close()
else
log (" /")
end
php )
c("label1")->text;
$find_and_repeat = array (
'0' => '',
'1' => ' ',
'23' => ' ',
'45' => ' ',
);
$test = 'test.txt';
$test = file_get_contents($test);
$test = explode (',', $test); // , - !
foreach ($find_and_repeat as $key => $v)
{
$test = str_replace($key, $v, $test);
$newTest = fopen('new_test.txt', 'w');
$check = fwrite($newTest , implode($test));
fclose($newTest);
}
//print_r($test);
if($check = true)
{echo '!!!';}
--lua
local file= io.open([[C:\123.txt]], "r") --
local result_file = io.open([[C:\456.txt]], "w") --
local t={}
t["1"]="" -- '1' ''
t["2"]="" -- '2' ''
t["11"]=" "
if file and result_file then --
for v in file:lines() do
result_file:write(string.gsub(v, "[^,]+", t).."\r\n") -- 't'
end
file:close()
result_file:close()
else
log (" /")
end
--lua
local file= io.open([[C:\123.txt]], "r") --
local result_file = io.open([[C:\456.txt]], "w") --
local t={}
t["q"]="" -- 'q' ''
t["w"]=""
t["e"]=""
t["r-"]=""
if file and result_file then --
for v in file:lines() do
result_file:write(string.gsub(v, ".", t).."\r\n") -- 't'
end
file:close()
result_file:close()
else
log (" /")
end
t["q"]="" -- ''
t["w."]="" -- '2' ''
t["e"]=""
t["t"]=""
t["y"]=""
qwetty
qwerrrty q
ytreq
ytrewq
.gsub(v, ".", t).."\r\n") -- 't'
<?php
/**
* Created by PhpStorm.
* User: karamush
* Date: 13.07.2018
* Time: 23:08
*/
class MorseCoder_Class {
public $MORSE_CHAR_DELIMITER = ' '; //
public $UNKNOWN_CHAR = '?'; // .
public $MORSE_DOT = '.'; //
public $MORSE_DASH = '-'; //
public $MORSE_BIN_DOT = '1'; //
public $MORSE_BIN_DASH ='111'; //
public $MORSE_BIN_DELIMITER = '0'; //
public $MORSE_BIN_CHAR_DELIMITER = '00'; //
public $MORSE_BIN_WORD_DELIMITER = '000'; // (. ?)
const MORSE_TYPE_SIMPLE = 0;
const MORSE_TYPE_BINARY = 1;
const MORSE_LANGUAGE_LATIN = 1;
const MORSE_LANGUAGE_CYRILLIC = 0;
public $morse_type = self::MORSE_TYPE_BINARY;
public $morse_language = self::MORSE_LANGUAGE_CYRILLIC;
public $morse_capital = true;
//
private $codes_symbols = [
'1' => '.----',
'2' => '..---',
'3' => '...--',
'4' => '....-',
'5' => '.....',
'6' => '-....',
'7' => '--...',
'8' => '---..',
'9' => '----.',
'0' => '-----',
'.' => '......',
',' => '.-.-.-',
':' => '---...',
';' => '-.-.-.',
'(' => '-.--.-',
')' => '-.--..', // TODO: . :)
'\'' => '.----.',
'`' => '.----.',
'"' => '.-..-.',
'-' => '-....-',
'/' => '-..-.',
'?' => '..--..',
'!' => '--..--',
' ' => '-...-', // , , , WTF?!
"\n" => '-.-..', // TODO: . !
"\r" => '-.-..-', // TODO: --!
'@' => '.--.-.',
'[END]' => '..-.-'
];
//
private $codes_latin = [
'A' => '.-',
'B' => '-...',
'C' => '-.-.',
'D' => '-..',
'E' => '.',
'F' => '..-.',
'G' => '--.',
'H' => '....',
'I' => '..',
'J' => '.---',
'K' => '-.-',
'L' => '.-..',
'M' => '--',
'N' => '-.',
'O' => '---',
'P' => '.--.',
'Q' => '--.-',
'R' => '.-.',
'S' => '...',
'T' => '-',
'U' => '..-',
'W' => '.--',
'X' => '-..-',
'Y' => '-.--',
'Z' => '--..',
'V' => '...-',
'CH' => '---.',
'SH' => '----',
'Ñ' => '-..-',
'É' => '..-..',
'Ü' => '..--',
'Ä' => '.-.-'
];
//
private $codes_cyrillic = [
'' => '.-',
'' => '-...',
'' => '.--',
'' => '--.',
'' => '-..',
'' => '.', '' => '.',
'' => '...-',
'' => '--..',
'' => '..',
'' => '.---',
'' => '-.-',
'' => '.-..',
'' => '--',
'' => '-.',
'' => '---',
'' => '.--.',
'' => '.-.',
'' => '...',
'' => '-',
'' => '..-',
'' => '..-.',
'' => '....',
'' => '-.-.',
'' => '---.',
'' => '----',
'' => '--.-',
'' => '-..-', '' => '-..-',
'' => '-.--',
'' => '..-..',
'' => '..--',
'' => '.-.-',
];
public function __construct() {
}
/**
* , ,
* ,
* . .
*
* @return array
*/
private function get_current_full_alphabet() {
$alphabet = ($this->morse_language == self::MORSE_LANGUAGE_CYRILLIC) ? array_merge($this->codes_cyrillic, $this->codes_latin) : array_merge($this->codes_latin, $this->codes_cyrillic);
return array_merge($alphabet, $this->codes_symbols);
}
/**
* -
* @param $char
*
* @return mixed|string
*/
function char_to_morse($char) {
$char = mb_strtoupper($char);
return array_key_exists($char, $this->get_current_full_alphabet()) ? $this->get_current_full_alphabet()[$char] : $this->UNKNOWN_CHAR;
}
/**
* , ..
* @param $morse_text
*
* @return string
*/
function prepare_morse_text($morse_text) {
$morse_text = str_replace('*', '.', $morse_text);
$morse_text = str_replace('_', '-', $morse_text);
return $morse_text;
}
function mbStringToArray($string, $encoding = 'UTF-8') {
$strlen = mb_strlen($string);
$str_array = [];
while ($strlen) {
$str_array[] = mb_substr($string, 0, 1, $encoding);
$string = mb_substr($string, 1, $strlen, $encoding);
$strlen = mb_strlen($string, $encoding);
}
return $str_array;
}
/**
* -
* @param $morse_char
*
* @return string
*/
function morse_to_char($morse_char) {
//
$morse_char = $this->prepare_morse_text($morse_char);
return in_array($morse_char, $this->get_current_full_alphabet()) ? array_search($morse_char, $this->get_current_full_alphabet()) : $this->UNKNOWN_CHAR;
}
/**
* , .
* @param $plain_text
*
* @return string
*/
function text_to_morse($plain_text) {
$plain_text = $this->mbStringToArray(mb_strtoupper($plain_text));
$result = '';
foreach ($plain_text as $char) {
$result .= $this->char_to_morse($char) . $this->MORSE_CHAR_DELIMITER;
}
return $result;
}
/**
* .
*
* @param $morse_text
*
* @return string
*/
function morse_to_text($morse_text) {
$morse_chars = explode($this->MORSE_CHAR_DELIMITER, $morse_text);
$result = '';
foreach($morse_chars as $char) {
$result .= $this->morse_to_char($char);
}
return $this->morse_capital ? $result : mb_strtolower($result);
}
/**
* .
* @param $morse_bin_text
*
* @return string
*/
function morse_bin_to_morse($morse_bin_text) {
$result = '';
$bin_morse_chars = explode($this->MORSE_BIN_CHAR_DELIMITER, $morse_bin_text);
foreach ($bin_morse_chars as $bin_morse_char) {
$bin_morse_char = str_replace($this->MORSE_BIN_DASH, $this->MORSE_DASH, $bin_morse_char);
$bin_morse_char = str_replace($this->MORSE_BIN_DOT, $this->MORSE_DOT, $bin_morse_char);
$bin_morse_char = str_replace($this->MORSE_BIN_DELIMITER, '', $bin_morse_char);
$result .= $bin_morse_char . $this->MORSE_CHAR_DELIMITER;
}
return rtrim($result, $this->MORSE_CHAR_DELIMITER);
}
/**
* .
* @param $morse_text
*
* @return string
*/
function morse_to_morse_bin($morse_text) {
$result = '';
$morse_text = $this->prepare_morse_text($morse_text);
for($i=0; $i<strlen($morse_text);$i++) {
switch ($morse_text[$i]) {
case $this->MORSE_DOT: $result .= $this->MORSE_BIN_DOT . $this->MORSE_BIN_DELIMITER; break;
case $this->MORSE_DASH: $result .= $this->MORSE_BIN_DASH . $this->MORSE_BIN_DELIMITER; break;
case $this->MORSE_CHAR_DELIMITER: $result .= $this->MORSE_BIN_DELIMITER; break; // , .
}
}
return $result;
}
/**
*
* @param $plaint_text
*
* @return string
*/
function text_to_morse_bin($plaint_text) {
return $this->morse_to_morse_bin($this->text_to_morse($plaint_text));
}
/**
*
*
* @param $morse_bin
*
* @return string
*/
function morse_bin_to_text($morse_bin) {
return $this->morse_to_text($this->morse_bin_to_morse($morse_bin));
}
/**
*
* ( morse_type)
* @param $plain_text
*
* @return string
*/
function morse_encode($plain_text) {
return ($this->morse_type == self::MORSE_TYPE_BINARY) ? $this->text_to_morse_bin($plain_text) : $this->text_to_morse($plain_text);
}
/**
*
* ( morse_type)
* @param $encoded_text
*
* @return string
*/
function morse_decode($encoded_text) {
return ($this->morse_type == self::MORSE_TYPE_BINARY) ? $this->morse_bin_to_text($encoded_text) : $this->morse_to_text($encoded_text);
}
}
... ( )? ( ).
--lua
log "clear" log "mode compact"
local t={} --
t[".-"]="A"
t["-..."]="B"
t["-.-."]="C"
local x="ACDBA" -- , 'D' ,
log(" :\r\n" .. x)
log()
-- :
-- A B C --
-- .-00 -...00 -.-.00 -- 00
-- .0-00 -0.0.0.00 -0.0-0.00 -- 0
-- 10-00 -01010100 -010-0100 -- 1
-- 1011100 11101010100 1110101110100 -- 111
local s=""
for w in x:gmatch(".") do --
local break_=0
for i, value in pairs(t) do --
if value == w then --
s=s .. string.gsub(string.gsub(string.gsub(i, "(.)", "%10") .. "0", "%.", "1"), "%-", "111") -- , 'A' 1011100
break_ = 1 --
break
end
end
if break_ == 0 then s=s .. w .. "00" end -- , , . .
end
log (" :\r\n" .. s) --
log()
local ss=""
for w in s:gmatch("(.-)00") do -- , 00
if w:match("[01]+") then --
ss=ss .. string.gsub(string.gsub(string.gsub(w:gsub("111", "-"), "1", "."), "0", ""), ".+", t)
else
ss=ss .. w -- ,
end
end
log (" :\r\n" .. ss)
--lua
log "clear" log "mode compact"
local t={} --
t[".-"]="A"
t["-..."]="B"
t["-.-."]="C"
local x="ACDBA" -- , 'D' ,
log(" :\r\n" .. x)
log()
-- :
-- A B C --
-- .-00 -...00 -.-.00 -- 00
-- .0-00 -0.0.0.00 -0.0-0.00 -- 0
-- 10-00 -01010100 -010-0100 -- 1
-- 1011100 11101010100 1110101110100 -- 111
local s=""
for w in x:gmatch(".") do --
local break_=0
for i, value in pairs(t) do --
if value == w then --
s=s .. string.gsub(string.gsub(string.gsub(i, "(.)", "%10") .. "0", "%.", "1"), "%-", "111") -- , 'A' 1011100
break_ = 1 --
break
end
end
if break_ == 0 then s=s .. w .. "00" end -- , , . .
end
log (" :\r\n" .. s) --
log()
local ss=""
for w in s:gmatch("(.-)00") do -- , 00
if w:match("[01]+") then --
ss=ss .. string.gsub(string.gsub(string.gsub(w:gsub("111", "-"), "1", "."), "0", ""), ".+", t)
else
ss=ss .. w -- ,
end
end
log (" :\r\n" .. ss)
t[".-"]="A"
t["-..."]="B"
t["-.-."]="C"
t["-.."]="D"
t["."]= "E"
t["..-."]="F"
t["--."]="G"
t["...."]="H"
t[".."]="I"
t[".---"]="J"
t["-.-"]="K"
t[".-.."]="L"
t["--"]="M"
t["-."]="N"
t["---"]="O"
t[".--."]="P"
t["--.-"]="Q"
t[".-."]="R"
t["..."]="S"
t["-"]="T"
t["..-"]="U"
t[".--"]="W"
t["-..-"]="X"
t["-.--"]="Y"
t["--.."]="Z"
, ? ?
--lua
--
-- Hfcrkflrf ->
local file= io.open([[C:\123.txt]], "r") --
local result_file = io.open([[C:\456.txt]], "w") --
local t={}
t["a"]="" -- 'a' ''
t["b"]=""
t["c"]=""
t["d"]=""
t["e"]=""
t["f"]=""
t["g"]=""
t["h"]=""
t["i"]=""
t["j"]=""
t["k"]=""
t["l"]=""
t["m"]=""
t["n"]=""
t["o"]=""
t["p"]=""
t["q"]=""
t["r"]=""
t["s"]=""
t["t"]=""
t["u"]=""
t["v"]=""
t["w"]=""
t["x"]=""
t["y"]=""
t["z"]=""
t["`"]=""
t["["]=""
t["]"]=""
t[";"]=""
t["'"]=""
t[","]=""
t["."]=""
t["/"]="."
t["A"]=""
t["B"]=""
t["C"]=""
t["D"]=""
t["E"]=""
t["F"]=""
t["G"]=""
t["H"]=""
t["I"]=""
t["J"]=""
t["K"]=""
t["L"]=""
t["M"]=""
t["N"]=""
t["O"]=""
t["P"]=""
t["Q"]=""
t["R"]=""
t["S"]=""
t["T"]=""
t["U"]=""
t["V"]=""
t["W"]=""
t["X"]=""
t["Y"]=""
t["Z"]=""
t["{"]=""
t["}"]=""
t[":"]=""
--t["""]=""
t["<"]=""
t[">"]=""
t["?"]=","
t["~"]=""
--t["@"]="""
t["#"]=""
t["$"]=";"
t["^"]=":"
t["&"]="?"
if file and result_file then --
for v in file:lines() do
result_file:write(string.gsub(v, ".", t).."\r\n") -- 't'
end
file:close()
result_file:close()
else
log (" /")
end
--lua
local s1 = '"Hello!"' --
local s2 = "'Hello!'" --
local s3 = [['"Hello!"']] --
log (s1)
log (s2)
log (s3)
t["<"]=""
t[">"]=""
t["?"]=","
t["<"]="" t[">"]="" t["?"]=","
url-...
6 3 ( ):
= %d0%93
= %d1%80
( ; : @ & = + $ , / ? % # [ ]) 3 , 1 , 2- d
= %20 =+
# = %23
{ = %7B
, %d0%af %D0%AF %d1%8f %D1%8F. ?
=> %D0%9A%D0%BE%D0%B4
%D0%9A+%D0%BE+%D0%B4
%D0%9A%20%D0%BE%20%D0%B4
--lua
log "clear" log "mode compact"
local s="%D0%9A%D0%BE%D0%B4%20%7Benglish%20text%7D%20%D0%9A%D0%BE%D0%B4%20lua!!!" -- {english text} lua!!!
log(s)
local t={}
t["%D0%9A"]=""
t["%D0%BE"]=""
t["%D0%B4"]=""
-- ,
--
for v in pairs(t) do -- , "%D0%9A", "%d0%9a"
t[v:lower()]=t[v]
end
for i=32, 127 do t["%" .. string.format("%X", i)]=string.char(i) end -- , ascii 32 127
s=s:gsub("%%[Dd][01]%%%x%x", t) --
s=s:gsub("%%..", t) --
log(s) --
--lua
log "clear" log "mode compact"
local s="%D0%9A%D0%BE%D0%B4%20%7Benglish%20text%7D%20%D0%9A%D0%BE%D0%B4%20lua!!!" -- {english text} lua!!!
log(s)
local t={}
t["%D0%9A"]=""
t["%D0%BE"]=""
t["%D0%B4"]=""
-- ,
--
for v in pairs(t) do -- , "%D0%9A", "%d0%9a"
t[v:lower()]=t[v]
end
for i=32, 127 do t["%" .. string.format("%X", i)]=string.char(i) end -- , ascii 32 127
s=s:gsub("%%[Dd][01]%%%x%x", t) --
s=s:gsub("%%..", t) --
log(s) --
--lua
log "clear" log "mode compact"
local s="Cirus-code-master%20%D0%B1%D0%BE%D0%B6%D1%8D%D0%BD%D1%8C%D0%BA%D0%B0!:)" -- {english text} lua!!!
log(s)
local t={}
t["%D0%90"]="" t["%D0%91"]="" t["%D0%92"]="" t["%D0%93"]="" t["%D0%94"]="" t["%D0%95"]="" t["%D0%81"]="" t["%D0%96"]="" t["%D0%97"]="" t["%D0%98"]="" t["%D0%99"]=""
t["%D0%9A"]="" t["%D0%9B"]="" t["%D0%9C"]="" t["%D0%9D"]="" t["%D0%9E"]="" t["%D0%9F"]="" t["%D0%A0"]="" t["%D0%A1"]="" t["%D0%A2"]="" t["%D0%A3"]="" t["%D0%A4"]=""
t["%D0%A5"]="" t["%D0%A6"]="" t["%D0%A7"]="" t["%D0%A8"]="" t["%D0%A9"]="" t["%D0%AA"]="" t["%D0%AB"]="" t["%D0%AC"]="" t["%D0%AD"]="" t["%D0%AE"]="" t["%D0%AF"]=""
t["%D0%B0"]="" t["%D0%B1"]="" t["%D0%B2"]="" t["%D0%B3"]="" t["%D0%B4"]="" t["%D0%B5"]="" t["%D1%91"]="" t["%D0%B6"]="" t["%D0%B7"]="" t["%D0%B8"]="" t["%D0%B9"]=""
t["%D0%BA"]="" t["%D0%BB"]="" t["%D0%BC"]="" t["%D0%BD"]="" t["%D0%BE"]="" t["%D0%BF"]="" t["%D1%80"]="" t["%D1%81"]="" t["%D1%82"]="" t["%D1%83"]="" t["%D1%84"]=""
t["%D1%85"]="" t["%D1%86"]="" t["%D1%87"]="" t["%D1%88"]="" t["%D1%89"]="" t["%D1%8A"]="" t["%D1%8B"]="" t["%D1%8C"]="" t["%D1%8D"]="" t["%D1%8E"]="" t["%D1%8F"]=""
for v in pairs(t) do -- , "%D0%9A", "%d0%9a"
t[v:lower()]=t[v]
end
for i=32, 127 do t["%" .. string.format("%X", i)]=string.char(i) end -- , ascii 32 127
s=s:gsub("%%[Dd][01]%%%x%x", t) --
s=s:gsub("%%..", t) --
log(s) --
? ?
:
--lua
log "clear" log "mode compact"
local s=" !"
log (s:reverse())
...
--lua
--log "clear" log "mode compact"
--local s="-Text-123!" -- , ""
--log(s)
local file= io.open([[C:\123.txt]], "r") --
local result_file = io.open([[C:\456.txt]], "w") --
local t={}
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-" t["A"]=".-" t["B"]="-..." t["C"]="-.-." t["D"]="-.." t["E"]="." t["F"]="..-."
t["G"]="--." t["H"]="...." t["I"]=".." t["J"]=".---" t["K"]="-.-" t["L"]=".-.." t["M"]="--"
t["N"]="-." t["O"]="---" t["P"]=".--." t["Q"]="--.-" t["R"]=".-." t["S"]="..." t["T"]="-"
t["U"]="..-" t["V"]="...-" t["W"]=".--" t["X"]="-..-" t["Y"]="-.--" t["Z"]="--.." t[""]=".-"
t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="." t[""]="." t[""]="...-"
t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.." t[""]="--" t[""]="-."
t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-" t[""]="..-" t[""]="..-."
t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-" t[""]="-..-" t[""]="-..-"
t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
for v in pairs(t) do -- , "%", "%"
t[v:lower()]=t[v]
end
if file and result_file then --
for v in file:lines() do
result_file:write(string.gsub(v, ".", t).."\r\n") -- 't'
end
file:close()
result_file:close()
else
log (" /")
end
--log(s) --
string_lower(v)
string_lower(v)
--lua
log "clear" log "mode compact"
local text = clipboard () -- text
log (text) -- text
wait (300) -- 300
local arr = clipboard (0, "string", "word") --
log()
local t={}
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-" t["A"]=".-" t["B"]="-..." t["C"]="-.-." t["D"]="-.." t["E"]="." t["F"]="..-."
t["G"]="--." t["H"]="...." t["I"]=".." t["J"]=".---" t["K"]="-.-" t["L"]=".-.." t["M"]="--"
t["N"]="-." t["O"]="---" t["P"]=".--." t["Q"]="--.-" t["R"]=".-." t["S"]="..." t["T"]="-"
t["U"]="..-" t["V"]="...-" t["W"]=".--" t["X"]="-..-" t["Y"]="-.--" t["Z"]="--.." t[""]=".-"
t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="." t[""]="." t[""]="...-"
t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.." t[""]="--" t[""]="-."
t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-" t[""]="..-" t[""]="..-."
t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-" t[""]="-..-" t[""]="-..-"
t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
for v in pairs(t) do -- , "%", "%"
t[string_lower(v)]=t[v]
end
--if --
for v in file:lines() do
s=s:write(string.gsub(v, ".", t).."\r\n") -- 't'
end
log(s) --
clipboard (???) --
--lua
log "clear" log "mode compact"
local text = clipboard () -- text
wait (300) -- 300
log (text) -- text
log()
local t={}
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-" t["A"]=".-" t["B"]="-..." t["C"]="-.-." t["D"]="-.." t["E"]="." t["F"]="..-."
t["G"]="--." t["H"]="...." t["I"]=".." t["J"]=".---" t["K"]="-.-" t["L"]=".-.." t["M"]="--"
t["N"]="-." t["O"]="---" t["P"]=".--." t["Q"]="--.-" t["R"]=".-." t["S"]="..." t["T"]="-"
t["U"]="..-" t["V"]="...-" t["W"]=".--" t["X"]="-..-" t["Y"]="-.--" t["Z"]="--.." t[""]=".-"
t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="." t[""]="." t[""]="...-"
t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.." t[""]="--" t[""]="-."
t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-" t[""]="..-" t[""]="..-."
t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-" t[""]="-..-" t[""]="-..-"
t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
for v in pairs(t) do -- , "%", "%"
t[string_lower(v)]=t[v]
end
local s=text:gsub(".", t)
log(s) --
clipboard (s) --
... .
.
t["1"]=".----"
local s=text:gsub(".", t) --
for v in pairs(t) do -- , "", ""
t[""]="-"
t[""]="-"
for v in pairs(t) do -- , "", ""
t[""]="-"
t[""]="-"
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-" t["A"]=".-" t["B"]="-..." t["C"]="-.-." t["D"]="-.." t["E"]="." t["F"]="..-."
t["G"]="--." t["H"]="...." t["I"]=".." t["J"]=".---" t["K"]="-.-" t["L"]=".-.." t["M"]="--"
t["N"]="-." t["O"]="---" t["P"]=".--." t["Q"]="--.-" t["R"]=".-." t["S"]="..." t["T"]="-"
t["U"]="..-" t["V"]="...-" t["W"]=".--" t["X"]="-..-" t["Y"]="-.--" t["Z"]="--.."
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-" t[""]=".-" t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="."
t[""]="." t[""]="...-" t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.."
t[""]="--" t[""]="-." t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-"
t[""]="..-" t[""]="..-." t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-"
t[""]="-..-" t[""]="-..-" t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
-.-\.-\-.-\\-..\.\.-..\.-\
➀ ➁ ➀ \ ➂ ➃ ➄ ➁
--lua
log "clear" log "mode compact"
local text=[[-.-\.-\-.-\\\-..\.\.-..\.-\]] -- " "
--local text=" " -- [[-.-\.-\-.-\\\-..\.\.-..\.-\]]
log(text)
local t, t1, temp = {}, {}, {}
t[""]=".-" t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="." t[""]="."
t[""]="...-" t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.." t[""]="--"
t[""]="-." t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-" t[""]="..-"
t[""]="..-." t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-" t[""]="-..-"
t[""]="-..-" t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
for v in pairs(t) do temp[string_lower(v)]=t[v] end
for v in pairs(temp) do t[v]=temp[v] end
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-"
for v in pairs(t) do t1[t[v]]=v end -- , 't'
local x=0
for v in text:gmatch("[%.%-%\\]") do x=x+1 end -- ,
if x > #text*50/100 then -- 50%,
text=string.gsub(text:gsub("(.-)\\", t1), "\\\\", " ") --
else
text=string.gsub(string.gsub(text:gsub("([^ ])", "%1\\"), "%s", "\\\\"), "[^\\]", t) --
end
log (text)
--lua
log "clear" log "mode compact"
local text=[[-.-\.-\-.-\\\-..\.\.-..\.-\]] -- " "
--local text=" " -- [[-.-\.-\-.-\\\-..\.\.-..\.-\]]
log(text)
local t, t1, temp = {}, {}, {}
t[""]=".-" t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="." t[""]="."
t[""]="...-" t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.." t[""]="--"
t[""]="-." t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-" t[""]="..-"
t[""]="..-." t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-" t[""]="-..-"
t[""]="-..-" t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
for v in pairs(t) do temp[string_lower(v)]=t[v] end
for v in pairs(temp) do t[v]=temp[v] end
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-"
for v in pairs(t) do t1[t[v]]=v end -- , 't'
local x=0
for v in text:gmatch("[%.%-%\\]") do x=x+1 end -- ,
if x > #text*50/100 then -- 50%,
text=string.gsub(text:gsub("(.-)\\", t1), "\\\\", " ") --
else
text=string.gsub(string.gsub(text:gsub("([^ ])", "%1\\"), "%s", "\\\\"), "[^\\]", t) --
end
log (text)
for i, word in pairs(split(text, "<(.-)>")) do
print(word)
end
function split(string, delimiter) -- Got this function from [url=https://helloacm.com/split-a-string-in-lua/]https://helloacm.com/split-a-string-in-lua/[/url]
result = {};
for match in (string..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match);
end
return result;
end
s = "Hello<a>World</a>!"
for a in s:gsub('%b<>','\0%0\0'):gmatch'%Z+' do
print(a)
end
--lua
function split(s, sep)
local fields = {}
local sep = sep or " "
local pattern = string.format("([^%s]+)", sep)
string.gsub(s, pattern, function(c) fields[#fields + 1] = c end)
return fields
end
t = split("a,b,c,d,e,f,g",",")
for i,j in pairs(t) do
log(i,j)
end
--lua
local arr = {"", "", "", ""}
log (table.concat(arr, " ")) --
, . .
, . . - "" . , - -. - , .
--lua
log "clear" log "mode compact"
local text=[[..-.. .--- - .- -- ]] -- " "
--local text=" " -- [[-.-\.-\-.-\\\-..\.\.-..\.-\]]
log(text)
local t, t1, temp = {}, {}, {}
t[""]=".-" t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="." t[""]="."
t[""]="...-" t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.." t[""]="--"
t[""]="-." t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-" t[""]="..-"
t[""]="..-." t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-" t[""]="-..-"
t[""]="-..-" t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
for v in pairs(t) do temp[string_lower(v)]=t[v] end
for v in pairs(temp) do t[v]=temp[v] end
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-"
for v in pairs(t) do t1[t[v]]=v end -- , 't'
local x=0
for v in text:gmatch("[%.%-%(%s)]") do x=x+1 end -- ,
if x > #text*50/100 then -- 50%,
text=string.gsub(text:gsub("(.-)(%s)", t1), "(%s)(%s)", " ") --
else
text=string.gsub(string.gsub(text:gsub("([^ ])", "%1 "), "%s", " "), "[^ ]", t) --
end
log (text)
--lua
log "clear" log "mode compact"
local text=[[-.- .- -.- -.. . .-.. .-]] -- " "
--local text=" " -- [[-.-\.-\-.-\\\-..\.\.-..\.-\]]
log(text)
local t, t1, temp = {}, {}, {}
t[""]=".-" t[""]="-..." t[""]=".--" t[""]="--." t[""]="-.." t[""]="." t[""]="."
t[""]="...-" t[""]="--.." t[""]=".." t[""]=".---" t[""]="-.-" t[""]=".-.." t[""]="--"
t[""]="-." t[""]="---" t[""]=".--." t[""]=".-." t[""]="..." t[""]="-" t[""]="..-"
t[""]="..-." t[""]="...." t[""]="-.-." t[""]="---." t[""]="----" t[""]="--.-" t[""]="-..-"
t[""]="-..-" t[""]="-.--" t[""]="..-.." t[""]="..--" t[""]=".-.-"
for v in pairs(t) do temp[string_lower(v)]=t[v] end
for v in pairs(temp) do t[v]=temp[v] end
t["1"]=".----" t["2"]="..---" t["3"]="...--" t["4"]="....-" t["5"]="....." t["6"]="-...." t["7"]="--..."
t["8"]="---.." t["9"]="----." t["0"]="-----" t["."]="......" t[":"]="---..." t[";"]="-.-.-." t["("]="-.--.-"
t[")"]="-.--.-" t["'"]=".----." t['"']=".-..-." t["-"]="-....-" t["/"]="-..-." t["?"]="..--.." t["!"]="--..--"
t[","]=".-.-.-"
for v in pairs(t) do t1[t[v]]=v end -- , 't'
local x=0
for v in text:gmatch("[%.%- ]") do x=x+1 end -- ,
if x > #text*50/100 then -- 50%,
text=string.gsub((text .. " "):gsub("(.-) ", t1), " ", " ") --
else
text=string.gsub(text:gsub("(.)", "%1 "), "[^ ]", t) --
end
log (text)
CP1251 UTF-8
--lua
log ("clear") log ("mode compact")
local q = clipboard () -- text
wait (300) -- 300
log (q) -- text
log()
local t={}
t["А"]="" t["Б"]="" t["В"]="" t["Г"]="" t["Д"]="" t["Е"]="" t["Ё"]="" t["Ж"]="" t["З"]="" t["И"]="" t["Й"]=""
t["К"]="" t["Л"]="" t["М"]="" t["Н"]="" t["О"]="" t["П"]="" t["Р"]="" t["С"]="" t["Т"]="" t["У"]="" t["Ф"]=""
t["Х"]="" t["Ц"]="" t["Ч"]="" t["Ш"]="" t["Щ"]="" t["Ъ"]="" t["Ы"]="" t["Ь"]="" t["Э"]="" t["Ю"]="" t["Я"]=""
t["а"]="" t["б"]="" t["в"]="" t["г"]="" t["д"]="" t["е"]="" t["ё"]="" t["ж"]="" t["з"]="" t["и"]="" t["й"]=""
t["к"]="" t["л"]="" t["м"]="" t["н"]="" t["о"]="" t["п"]="" t["р"]="" t["с"]="" t["т"]="" t["%у"]="" t["ф"]=""
t["х"]="" t["ц"]="" t["ч"]="" t["ш"]="" t["щ"]="" t["ъ"]="" t["ы"]="" t["ь"]="" t["э"]="" t["ю"]="" t["я"]=""
local s = (string.gsub(q, "[]x", t)) -- ???
log (s)
clipboard (s) --
. file1.txt ():
, * "
, </tr> , <tr> </tr> <tr>
file2.html <!-- 1 --> file1.txt
,
//-----
set $a *
set $a1 "
set $b </tr> , <tr>
set $b1 </tr> <tr>
set $c "<!-- 1 -->"
//-----
load_array %file1 c:/2/file1.txt
for #i 1 size(%file1)
set $file1 %file1[#i]
set %file1[#i] string_replace($file1 $a $a1 all)
set $file1 %file1[#i]
set %file1[#i] string_replace($file1 $b $b1 all)
end_for
load_array %file2 c:/2/file2.txt
set #res indexOf(%file2 noabs ($c))
set #nd #res - 1
for #i 1 #nd
set %file2a[#i] %file2[#i]
end_for
for #i 1 size(%file1)
set #j #i + #nd
set %file2a[#j] %file1[#i]
end_for
save_array %file2a c:/2/file2_new.txt
set #res1 #res + 1
for #i #res1 size(%file2)
write (c:/2/file2_new.txt %file2[#i] \r\n)
end_for
end_script
//-----
set $a *
set $a1 "
set $b </tr> , <tr>
set $b1 </tr> <tr>
set $c "<!-- 1 -->"
//-----
load_array %file1 c:\123.txt
for #i 1 size(%file1)
set $file1 %file1[#i]
set %file1[#i] string_replace($file1 $a $a1 all)
set $file1 %file1[#i]
set %file1[#i] string_replace($file1 $b $b1 all)
//write (D:\123\1_rez.txt %file1[#i] \r\n) // .
end_for
load_array %file2 D:\123\2.txt
set #res indexOf(%file2 noabs ($c))
set #nd #res - 1
for #i 1 #nd
set %file2a[#i] %file2[#i]
end_for
for #i 1 size(%file1)
set #j #i + #nd
set %file2a[#j] %file1[#i]
//write (D:\123\2_new.txt %file2a[#i] \r\n) // 3() #i #j
end_for
//save_array %file2a D:\123\2_new.txt // 0
end_script //
set #res1 #res + 1
for #i #res1 size(%file2)
write (D:\123\2_new.txt %file2[#i] \r\n)
end_for
end_script
--lua
local file= io.open([[C:\123.txt]], "r") --
local result_file = io.open([[C:\456.txt]], "w") --
if file and result_file then --
for v in file:lines() do
local s=v:gsub("*", '"') --
s=s:gsub("(</tr>)( , )(<tr>)", "%1 %3") --
result_file:write(s .. "\n")
end
file:close()
result_file:close()
else
log (" /")
end
?
--lua
local file = io.open([[C:\1_1.txt]], "r") --
local file2 = io.open([[C:\1.html]], "r") --
local result_file = io.open([[C:\1_1z.txt]], "w") --
local result_file2 = io.open([[C:\1z.html]], "w") --
if file and result_file and file2 and result_file2 then --
local s2, s = ""
for v in file:lines() do --
s=v:gsub("*", '"') --
s=s:gsub("(</tr>)( , )(<tr>)", "%1 %3") --
result_file:write(s .. "\n")
end
for v in file2:lines() do s2=s2 .. v end --
result_file2:write(s2:gsub("<!%-%- 1 %-%->", s)) --
file:close() file2:close() result_file:close() result_file2:close() --
else
log (" /")
end
load_array %file3 c:/2/11.html //
load_array %file c:/2/11_1.txt // 1
set #res indexOf(%file3 noabs ("<!-- 1 -->")) // 1
gosub zamena
load_array %file c:/2/11_2.txt // 2
set #res indexOf(%file3 noabs ("<!-- 2 -->")) // 2
gosub zamena
save_array %file3 c:/2/11_new.html //
end_script
:zamena //
set $file %file[1]
set $file string_replace($file * " all)
set $file string_replace($file "</tr> , <tr>" "</tr> <tr>" all)
set %file3[#res] $file
return
load_array %file3 c:/2/11.html //
load_array %file c:/2/11_1.txt // 1
set #res indexOf(%file3 noabs ("<!-- 1 -->")) // 1
gosub zamena
load_array %file c:/2/11_2.txt // 2
set #res indexOf(%file3 noabs ("<!-- 2 -->")) // 2
gosub zamena
save_array %file3 c:/2/11_new.html //
end_script
:zamena //
set $file %file[1]
set $file string_replace($file * " all)
set $file string_replace($file "</tr> , <tr>" "</tr> <tr>" all)
set %file3[#res] $file
return
( ). . : " .txt" , .
--lua
log "clear" log "mode compact"
local path = [[D:\_NHL\End]] --
local POISK, count = dir (path, "*.txt", "norecursion") -- 'txt',
log (" : " .. count)
if count then --
for i=1, #POISK do
log (" : " ..POISK[i][1]) --
local OldName = POISK[i][3] --
log (" : " ..OldName)
local t = {}
t[""]="A" t[""]="B" t[""]="V" t[""]="G" t[""]="D" t[""]="E" t[""]="E"
t[""]="ZH" t[""]="Z" t[""]="I" t[""]="Y" t[""]="K" t[""]="L" t[""]="M"
t[""]="N" t[""]="O" t[""]="P" t[""]="R" t[""]="S" t[""]="T" t[""]="U"
t[""]="F" t[""]="KH" t[""]="TS" t[""]="CH" t[""]="SH" t[""]="SHCH" t[""]=""
t[""]="" t[""]="Y" t[""]="E" t[""]="YU" t[""]="YA"
t[""]="a" t[""]="b" t[""]="v" t[""]="g" t[""]="d" t[""]="e" t[""]="e"
t[""]="zh" t[""]="z" t[""]="i" t[""]="y" t[""]="k" t[""]="l" t[""]="m"
t[""]="n" t[""]="o" t[""]="p" t[""]="r" t[""]="s" t[""]="t" t[""]="u"
t[""]="f" t[""]="kh" t[""]="ts" t[""]="ch" t[""]="sh" t[""]="shch" t[""]=""
t[""]="" t[""]="y" t[""]="e" t[""]="yu" t[""]="ya"
t[" "]="-" --
local NewName = string.gsub(OldName, "(.)", t) -- 't'
log (" : " ..NewName)
local NewPathAndName = POISK[i][2]..NewName..POISK[i][4]
log (" . : " ..NewPathAndName)
filerename (POISK[i][1], NewPathAndName) -- .txt Ivanov.txt
log ("---")
end
end
.
--lua
log 'clear' log 'mode compact'
local OldName = "C:\\test.txt"
local NewName = "C:\\ .txt"
log ( NewName )
log ( string.format("%q", NewName) )
filerename (string.format("%q", OldName) , string.format("%q", NewName))
Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)