Lines of
残局文料/残局改名.lua
from check-in 81015f535b
that are changed by the sequence of edits moving toward
check-in a8787a258d:
1: package.path = [[.\lua_lib\?.lua;]] .. package.path
2: package.cpath = [[.\lua_lib\?.dll;]] .. package.cpath
3: local 字集码互转库 = require("u8_to_a")
4: local u8 = 字集码互转库.u8_to_a
5: local f = require(u8("常用库"))
6: local 简文件库 = require("lfs")
7: local d_5 = {}
8: --~ 文
9: function d_5.局筛则数(o1)
10: local k1
11: local k1_9
12: --~ 则数排
13: k1_9 = f.历文(o1, string.gmatch, "[^\n]+")
14: k1_9 = f.历排(k1_9, f.全筛前缀, "Debug.ReloadFieldBegin")
15: k1 = string.match(k1_9[1], "[0-9]")
16: return k1 or 3
17: end
18: --~ 目对
19: function d_5.残局改名(o1)
81015f535b 2024-02-03 20: local k1_9, k2_9
21: --~ 文件排
22: k1_9 = f.历文(o1.文件目, 简文件库.dir)
23: k1_9 = f.历排(k1_9, f.全筛后缀, ".lua")
24: for o2 = 1, #k1_9 do
25: k1_9[o2] = f.加前缀(k1_9[o2], o1.文件目)
26: k1_9[o2] = f.读文件(k1_9[o2])
27: k1_9[o2] = string.gsub(k1_9[o2], "%-%-" .. "%[(=*)%[" .. ".-" .. "%]%1%]", "")
28: k1_9[o2] = string.gsub(k1_9[o2], "%-%-" .. "[^\n]*", "")
29: end
30: --~ 则数排
31: k2_9 = f.历排(k1_9, d_5.局筛则数)
32: end
33: d_5.目对 = {
34: ["文件目"] = "../single/"
35: , ["数据库路"] = [[D:\install\YGOPro\cards.cdb]]
36: }
37: for o1, o2 in pairs(d_5.目对) do
38: d_5.目对[o1] = f.操类(o2, "string", u8)
39: end
40: d_5.残局改名(d_5.目对)