mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-24 13:02:49 +01:00
aefaef
This commit is contained in:
parent
96352955e8
commit
8da91a4c5a
@ -6833,7 +6833,7 @@ return {
|
||||
-- hash256 = hash256,
|
||||
-- hash224 = hash224,
|
||||
-- new256 = new256,
|
||||
}Flib/advancedLua.lua*‡
|
||||
}Flib/advancedLua.lua*‚
|
||||
--[[
|
||||
|
||||
Advanced Lua Library v1.1 by ECS
|
||||
@ -6951,15 +6951,15 @@ end
|
||||
|
||||
-------------------------------------------------- Table extensions --------------------------------------------------
|
||||
|
||||
local function doSerialize(array, text, prettyLook, indentationSymbol, oldIndentationSymbol, equalsSymbol, currentRecusrionStack, recursionStackLimit)
|
||||
text = {"{"}
|
||||
local function doSerialize(array, prettyLook, indentationSymbol, indentationSymbolAdder, equalsSymbol, currentRecusrionStack, recursionStackLimit)
|
||||
local text, keyType, valueType, stringValue = {"{"}
|
||||
table.insert(text, (prettyLook and "\n" or nil))
|
||||
|
||||
for key, value in pairs(array) do
|
||||
local keyType, valueType, stringValue = type(key), type(value), tostring(value)
|
||||
keyType, valueType, stringValue = type(key), type(value), tostring(value)
|
||||
|
||||
if keyType == "number" or keyType == "string" then
|
||||
table.insert(text, (prettyLook and indentationSymbol or nil))
|
||||
table.insert(text, (prettyLook and table.concat({indentationSymbol, indentationSymbolAdder}) or nil))
|
||||
table.insert(text, "[")
|
||||
table.insert(text, (keyType == "string" and table.concat({"\"", key, "\""}) or key))
|
||||
table.insert(text, "]")
|
||||
@ -6974,33 +6974,48 @@ local function doSerialize(array, text, prettyLook, indentationSymbol, oldIndent
|
||||
elseif valueType == "table" then
|
||||
-- Ограничение Ñ<>тека рекурÑ<E282AC>ии
|
||||
if currentRecusrionStack < recursionStackLimit then
|
||||
table.insert(text, table.concat(doSerialize(value, text, prettyLook, table.concat({indentationSymbol, indentationSymbol}), table.concat({oldIndentationSymbol, indentationSymbol}), equalsSymbol, currentRecusrionStack + 1, recursionStackLimit)))
|
||||
table.insert(text, table.concat(doSerialize(value, prettyLook, table.concat({indentationSymbol, indentationSymbolAdder}), indentationSymbolAdder, equalsSymbol, currentRecusrionStack + 1, recursionStackLimit)))
|
||||
else
|
||||
table.insert(text, "...")
|
||||
end
|
||||
else
|
||||
-- error("Unsupported table value type: " .. valueType)
|
||||
end
|
||||
|
||||
table.insert(text, ",")
|
||||
table.insert(text, (prettyLook and "\n" or nil))
|
||||
else
|
||||
-- error("Unsupported table key type: " .. keyType)
|
||||
end
|
||||
end
|
||||
|
||||
table.remove(text, (prettyLook and #text - 1 or #text))
|
||||
table.insert(text, (prettyLook and oldIndentationSymbol or nil))
|
||||
-- УдалÑ<C2BB>ем запÑ<C2BF>тую
|
||||
if prettyLook then
|
||||
if #text > 2 then
|
||||
table.remove(text, #text - 1)
|
||||
end
|
||||
-- Ð’Ñ<E28099>тавлÑ<C2BB>ем заодно уж Ñ<>имвол индентации, благо чек на притти лук идет
|
||||
table.insert(text, indentationSymbol)
|
||||
else
|
||||
if #text > 1 then
|
||||
table.remove(text, #text)
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(text, "}")
|
||||
|
||||
return text
|
||||
end
|
||||
|
||||
function table.serialize(array, prettyLook, indentationWidth, indentUsingTabs, recursionStackLimit)
|
||||
checkArg(1, array, "table")
|
||||
indentationWidth = indentationWidth or 2
|
||||
local indentationSymbol = indentUsingTabs and " " or " "
|
||||
indentationSymbol, indentationSymbolHalf = string.rep(indentationSymbol, indentationWidth)
|
||||
return table.concat(doSerialize(array, {}, prettyLook, indentationSymbol, "", prettyLook and " = " or "=", 1, recursionStackLimit or math.huge))
|
||||
return table.concat(
|
||||
doSerialize(
|
||||
array,
|
||||
prettyLook,
|
||||
"",
|
||||
string.rep(indentUsingTabs and " " or " ", indentationWidth or 2),
|
||||
prettyLook and " = " or "=",
|
||||
1,
|
||||
recursionStackLimit or math.huge
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
function table.unserialize(serializedString)
|
||||
@ -7009,13 +7024,8 @@ function table.unserialize(serializedString)
|
||||
if success then return result else return nil, result end
|
||||
end
|
||||
|
||||
function table.toString(...)
|
||||
return table.serialize(...)
|
||||
end
|
||||
|
||||
function table.fromString(...)
|
||||
return table.unserialize(...)
|
||||
end
|
||||
table.toString = table.serialize
|
||||
table.fromString = table.unserialize
|
||||
|
||||
function table.toFile(path, array, prettyLook, indentationWidth, indentUsingTabs, recursionStackLimit, appendToFile)
|
||||
checkArg(1, path, "string")
|
||||
@ -7200,16 +7210,26 @@ end
|
||||
|
||||
-------------------------------------------------- Playground --------------------------------------------------
|
||||
|
||||
-- local function safeCall(method, ...)
|
||||
-- local arguments = {...}
|
||||
-- return xpcall(function() return method(table.unpack(arguments)) end, debug.traceback)
|
||||
-- end
|
||||
-- local t = {
|
||||
-- abc = 123,
|
||||
-- def = {
|
||||
-- cyka = "pidor",
|
||||
-- vagina = {
|
||||
-- chlen = 555,
|
||||
-- devil = 666,
|
||||
-- god = 777,
|
||||
-- serost = {
|
||||
-- tripleTable = "aefaef",
|
||||
-- aaa = "bbb",
|
||||
-- ccc = 123,
|
||||
-- }
|
||||
-- }
|
||||
-- },
|
||||
-- ghi = "HEHE",
|
||||
-- emptyTable = {},
|
||||
-- }
|
||||
|
||||
-- local function safeCallString(str)
|
||||
-- return safeCall(load(str))
|
||||
-- end
|
||||
|
||||
-- print(safeCallString("return 123"))
|
||||
-- print(table.toString(t, true))
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -8560,7 +8580,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
return colorsFlib/compressor.lua1
|
||||
return colorsFlib/compressor.luaP
|
||||
local unicode = require("unicode")
|
||||
local fs = require("filesystem")
|
||||
local compressor = {}
|
||||
@ -8743,6 +8763,7 @@ function compressor.unpack(pathToCompressedFile, pathWhereToUnpack, showInfo)
|
||||
file:write(compressedFile:read(size))
|
||||
file:close()
|
||||
else
|
||||
compressedFile:read(size)
|
||||
info(showInfo, "Failed to open file for writing while unpacking: " .. tostring(reason))
|
||||
end
|
||||
elseif not type then
|
||||
@ -18329,7 +18350,7 @@ setmetatable(sides, metatable)
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
return sides
|
||||
Flib/syntax.luaÒ
|
||||
Flib/syntax.lua
|
||||
require("advancedLua")
|
||||
local buffer = require("doubleBuffering")
|
||||
local unicode = require("unicode")
|
||||
@ -18360,13 +18381,13 @@ syntax.colorScheme = {
|
||||
}
|
||||
|
||||
syntax.patterns = {
|
||||
--Комментарии
|
||||
-- Комментарии
|
||||
{ "%-%-.+", "comments", 0, 0 },
|
||||
|
||||
--Строки
|
||||
-- Строки
|
||||
{ "\"[^\"]+\"", "strings", 0, 0 },
|
||||
|
||||
--Циклы, уÑ<C692>ловиÑ<C2B8>, объÑ<C5A0>влениÑ<C2B8>
|
||||
-- Циклы, уÑ<C692>ловиÑ<C2B8> и прочаÑ<C2B0> поебень
|
||||
{ "while ", "loops", 0, 1 },
|
||||
{ "do$", "loops", 0, 0 },
|
||||
{ "do ", "loops", 0, 1 },
|
||||
@ -18387,7 +18408,7 @@ syntax.patterns = {
|
||||
{ " break$", "loops", 0, 0 },
|
||||
{ " break ", "loops", 0, 0 },
|
||||
|
||||
--СоÑ<EFBFBD>тоÑ<EFBFBD>ниÑ<EFBFBD> переменной
|
||||
-- ИÑ<CB9C>тина, ложь, нулл
|
||||
{ "true", "boolean", 0, 0 },
|
||||
{ "false", "boolean", 0, 0 },
|
||||
{ "nil", "boolean", 0, 0 },
|
||||
@ -18396,16 +18417,18 @@ syntax.patterns = {
|
||||
{ "[%s%=%{%(][^%s%(%)%{%}%[%]]+%(", "functions", 1, 1 },
|
||||
{ "^[^%s%(%)%{%}%[%]]+%(", "functions", 0, 1 },
|
||||
|
||||
--ЛогичеÑ<C2B5>кие выражениÑ<C2B8>
|
||||
-- ЛогичеÑ<EFBFBD>кие выражениÑ<C2B8>
|
||||
{ " and ", "logic", 0, 1 },
|
||||
{ " or ", "logic", 0, 1 },
|
||||
{ " not ", "logic", 0, 1 },
|
||||
|
||||
-- КонкатенациÑ<C2B8> Ñ<>трок
|
||||
{ "[^%d]%.+[^%d]", "logic", 1, 1 },
|
||||
|
||||
--СравнениÑ<C2B8> и мат. операции
|
||||
-- СравнениÑ<EFBFBD> и мат. операции
|
||||
{ "[%>%<%=%~%+%-%*%/%^%#%%]", "compares", 0, 0 },
|
||||
|
||||
--ЧиÑ<C2B8>ла
|
||||
-- ЧиÑ<EFBFBD>ла
|
||||
{ "0x%w+", "numbers", 0, 0 },
|
||||
{ "[^%a%d][%.%d]+$", "numbers", 1, 0 },
|
||||
{ "[^%a%d][%.%d]+[^%a%d]", "numbers", 1, 1 },
|
||||
@ -18413,7 +18436,7 @@ syntax.patterns = {
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--Ð<EFBFBD>ариÑ<EFBFBD>овать и подÑ<C2B4>ветить Ñ<>троку
|
||||
-- ОтриÑ<C2B8>овка Ñ<>троки Ñ<> подÑ<C2B4>веченным Ñ<>интакÑ<C2BA>иÑ<C2B8>ом
|
||||
function syntax.highlightString(x, y, str, indentationWidth)
|
||||
if y >= buffer.drawLimit.y and y <= buffer.drawLimit.y2 then
|
||||
local stringLength, symbols, colors, searchFrom, starting, ending, bufferIndex = unicode.len(str), {}, {}
|
||||
@ -25296,105 +25319,7 @@ alias ..="cd .."
|
||||
alias df="df -h"
|
||||
|
||||
alias grep="grep --color"
|
||||
Detc/Fetc/edit.cfgkeybinds={
|
||||
["findnext"] = {
|
||||
[1] = {
|
||||
[1] = "control",
|
||||
[2] = "g"
|
||||
},
|
||||
[2] = {
|
||||
[1] = "control",
|
||||
[2] = "n"
|
||||
},
|
||||
[3] = {
|
||||
[1] = "f3"
|
||||
}
|
||||
},
|
||||
["deleteLine"] = {
|
||||
[1] = {
|
||||
[1] = "control",
|
||||
[2] = "delete"
|
||||
},
|
||||
[2] = {
|
||||
[1] = "shift",
|
||||
[2] = "delete"
|
||||
}
|
||||
},
|
||||
["home"] = {
|
||||
[1] = {
|
||||
[1] = "home"
|
||||
}
|
||||
},
|
||||
["up"] = {
|
||||
[1] = {
|
||||
[1] = "up"
|
||||
}
|
||||
},
|
||||
["pageDown"] = {
|
||||
[1] = {
|
||||
[1] = "pageDown"
|
||||
}
|
||||
},
|
||||
["close"] = {
|
||||
[1] = {
|
||||
[1] = "control",
|
||||
[2] = "w"
|
||||
}
|
||||
},
|
||||
["right"] = {
|
||||
[1] = {
|
||||
[1] = "right"
|
||||
}
|
||||
},
|
||||
["backspace"] = {
|
||||
[1] = {
|
||||
[1] = "back"
|
||||
}
|
||||
},
|
||||
["newline"] = {
|
||||
[1] = {
|
||||
[1] = "enter"
|
||||
}
|
||||
},
|
||||
["find"] = {
|
||||
[1] = {
|
||||
[1] = "control",
|
||||
[2] = "f"
|
||||
}
|
||||
},
|
||||
["pageUp"] = {
|
||||
[1] = {
|
||||
[1] = "pageUp"
|
||||
}
|
||||
},
|
||||
["delete"] = {
|
||||
[1] = {
|
||||
[1] = "delete"
|
||||
}
|
||||
},
|
||||
["left"] = {
|
||||
[1] = {
|
||||
[1] = "left"
|
||||
}
|
||||
},
|
||||
["save"] = {
|
||||
[1] = {
|
||||
[1] = "control",
|
||||
[2] = "s"
|
||||
}
|
||||
},
|
||||
["eol"] = {
|
||||
[1] = {
|
||||
[1] = "end"
|
||||
}
|
||||
},
|
||||
["down"] = {
|
||||
[1] = {
|
||||
[1] = "down"
|
||||
}
|
||||
}
|
||||
}
|
||||
Fetc/filesystem.cfgautorun=trueFetc/motdp#!/bin/lua
|
||||
Detc/Fetc/filesystem.cfgautorun=trueFetc/motdp#!/bin/lua
|
||||
|
||||
local component = require("component")
|
||||
local computer = require("computer")
|
||||
@ -25986,12 +25911,12 @@ D,MineOS/Applications/AppMarket.app/Resources/D2MineOS/Applications/AppMarket.
|
||||
youHaveNewestApps = "У ваÑ<C2B0> Ñ<>амое новое ПО",
|
||||
downloadingInfoAboutApplication = "Загрузка информации о приложении",
|
||||
updating = "Обновление",
|
||||
}D%MineOS/Applications/MineCode IDE.app/F5MineOS/Applications/MineCode IDE.app/MineCode IDE.luaä¸
|
||||
}D%MineOS/Applications/MineCode IDE.app/F5MineOS/Applications/MineCode IDE.app/MineCode IDE.luaå
|
||||
---------------------------------------------------- Libraries ----------------------------------------------------
|
||||
|
||||
-- "/MineOS/Applications/MineCode IDE.app/MineCode IDE.lua" open OS.lua
|
||||
|
||||
package.loaded.syntax = nil
|
||||
-- package.loaded.syntax = nil
|
||||
-- package.loaded.ECSAPI = nil
|
||||
-- package.loaded.GUI = nil
|
||||
-- package.loaded.windows = nil
|
||||
@ -27059,8 +26984,10 @@ local function createWindow()
|
||||
menu:addItem(localization.open, false, "^O").onTouch = function()
|
||||
open()
|
||||
end
|
||||
menu:addItem(localization.getFromWeb, false, "^U").onTouch = function()
|
||||
downloadFromWeb()
|
||||
if component.isAvailable("internet") then
|
||||
menu:addItem(localization.getFromWeb, false, "^U").onTouch = function()
|
||||
downloadFromWeb()
|
||||
end
|
||||
end
|
||||
menu:addSeparator()
|
||||
menu:addItem(localization.save, not mainWindow.leftTreeView.currentFile, "^S").onTouch = function()
|
||||
@ -27368,7 +27295,7 @@ local function createWindow()
|
||||
elseif eventData[4] == 24 then
|
||||
open()
|
||||
-- U
|
||||
elseif eventData[4] == 22 then
|
||||
elseif eventData[4] == 22 and component.isAvailable("internet") then
|
||||
downloadFromWeb()
|
||||
-- S
|
||||
elseif eventData[4] == 31 then
|
||||
@ -27493,7 +27420,7 @@ buffer.draw()
|
||||
mainWindow:handleEvents(config.cursorBlinkDelay)
|
||||
|
||||
|
||||
D/MineOS/Applications/MineCode IDE.app/Resources/D5MineOS/Applications/MineCode IDE.app/Resources/About/F@MineOS/Applications/MineCode IDE.app/Resources/About/Russian.txt½MineCode IDE - Ñ<>то мощный инÑ<C2BD>турмент длÑ<C2BB> разработки приложений Ñ<> богатым функционалом: от подÑ<C2B4>ветки Ñ<>интакÑ<C2BA>иÑ<C2B8>а Lua, выделениÑ<C2B8> текÑ<C2BA>та и работы Ñ<> буфером обмена до поддержки пользовательÑ<C592>ких цветовых Ñ<>хем. Удобный файловый менеджер также прилагаетÑ<E2809A>Ñ<EFBFBD>.F9MineOS/Applications/MineCode IDE.app/Resources/Config.cfgP{["cursorSymbol"]="┃",["screenScale"]=1,["cursorColor"]=43263,["scrollSpeed"]=8,["doubleClickDelay"]=0.4,["enableAutoBrackets"]=true,["highlightLuaSyntax"]=true,["syntaxColorScheme"]={["text"]=16777215,["functions"]=16764006,["lineNumbersText"]=13421772,["numbers"]=6740991,["scrollBarForeground"]=3389183,["selection"]=5592405,["strings"]=10092416,["scrollBarBackground"]=4473924,["boolean"]=16767808,["logic"]=16764006,["indentation"]=3947580,["comments"]=8947848,["compares"]=16777112,["loops"]=16777112,["background"]=1973790,["lineNumbersBackground"]=2960685},["cursorBlinkDelay"]=0.5}F7MineOS/Applications/MineCode IDE.app/Resources/Icon.pic
OCIFA | ||||