Overview
Comment: | 见名称而知用途 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ebd6d74a8f336196dbf188ade1cc53ef |
User & Date: | 顽雨沉风 on 2024-01-31 14:00:03 |
Other Links: | manifest | tags |
Context
2024-01-31
| ||
14:04 | 统一名称 check-in: 1a5876d58d user: 顽雨沉风 tags: trunk | |
14:00 | 见名称而知用途 check-in: ebd6d74a8f user: 顽雨沉风 tags: trunk | |
13:21 | lua在语法上依赖代码行的顺序,而stylua对导入库代码的排序会调整代码行顺序,两者矛盾了。 check-in: df10ddfbd2 user: 顽雨沉风 tags: trunk | |
Changes
Deleted 残局文料/产常量件.lua version [ef998ce094].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted 残局文料/排版lua文件.lua version [093b8cc3fd].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added 残局文料/收集YGOPro常量并据此生成lua文件.lua version [ef998ce094].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | _G.常用库 = require("lib/ipml_mj_ysaf") local 字集码互转库 = require("u8_to_a") local 读件库 = 常用库.导入库_通用大字集态_八位态("算机_基统_窗群_件系_小件_读") local 写件库 = 常用库.导入库_通用大字集态_八位态("算机_基统_窗群_件系_小件_写") local 删注库 = 常用库.导入库_通用大字集态_八位态("程语_月_删注_不虑字串") local 删字库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_删字") local 文转排库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_筛文_文转排") local 遍历排库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_排_遍历") local 前后缀库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_前后缀") local 判文库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_筛文_判文") local d_3 = {} function d_3.产常量件_基态(o1) d_3.产普常量件_基态(o1) d_3.产字段名件_基态(o1) end function d_3.产普常量件_基态(o1) local k1 local k1_11 k1 = 读件库.读件(o1 .. "/script/constant.lua") k1 = 删注库.单行注(k1) k1 = 删字库.空格与制表符(k1) k1_11 = 文转排库.单行_非空态_无换行符态(k1) d_3.入排而加表限并写件(k1_11, 字集码互转库.u8_to_a("普常量.lua")) end function d_3.入排而加表限并写件(o1_11, o1) local k1 o1_11 = 遍历排库.遍历_返排态(o1_11, string.gsub, "[^=]+", "[\"%1\"]") o1_11 = 遍历排库.遍历_返排态(o1_11, 前后缀库.加前缀_基态, [[k1_11.]]) table.insert(o1_11, 1, "local k1_11 = {}") table.insert(o1_11, "return k1_11") k1 = table.concat(o1_11, "\n") 写件库.写件(k1, o1) end function d_3.产字段名件_基态(o1) local k1 local k1_11 k1 = 读件库.读件(o1 .. "/strings.conf") k1_11 = 文转排库.单行_非空态_无换行符态(k1) k1_11 = 遍历排库.遍历_返排态(k1_11, string.startswith, "!setname") k1_11 = 遍历排库.遍历_返排态(k1_11, 前后缀库.删前缀_基态, "!setname ") k1_11 = 遍历排库.遍历_返排态(k1_11, 判文库.返选文, "[^\t]+") k1_11 = 遍历排库.遍历_返排态(k1_11, string.lstrip) k1_11 = 遍历排库.遍历_返排态(k1_11, string.gsub, " ", "=", 1) k1_11 = 遍历排库.遍历_返排态(k1_11, string.gsub, "|.+", "") d_3.入排而加表限并写件(k1_11, 字集码互转库.u8_to_a("字段名.lua")) end d_3.产常量件_基态(字集码互转库.u8_to_a([[D:\install\YGOPro]])) |
Added 残局文料/用命令行工具排版lua文件.lua version [093b8cc3fd].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | package.path = [[.\lua_lib\?.lua;]] .. package.path package.cpath = [[.\lua_lib\?.dll;]] .. package.cpath local 字集码互转库 = require("u8_to_a") local k1 = 字集码互转库.u8_to_a("计算机_系统_窗口群_命令行_无窗口") local 令行库 = require(k1) local 简单文件系统库 = require("lfs") local k1 = 字集码互转库.u8_to_a("程序语言_月_基础类型_字串_逐一") local 历文库 = require(k1) local k1 = 字集码互转库.u8_to_a("程序语言_月_基础类型_序排_逐一") local 历排库 = require(k1) local k1 = 字集码互转库.u8_to_a("程序语言_月_基础类型_字串_前缀与后缀") local 前后缀库 = require(k1) local k1 = 字集码互转库.u8_to_a("程序语言_月_基础类型_字串_全筛") local 全筛文库 = require(k1) local d_2 = {} function d_2.排版lua文件(o1, o2) local k1 local k1_9 k1_9 = 历文库.处理后返回新排(o1, 简单文件系统库.dir) k1_9 = 历排库.处理后返回新排(k1_9, 前后缀库.加前缀, o1 .. "/") k1 = ".lua" k1_9 = 历排库.处理后返回新排(k1_9, 全筛文库.找字, k1, -#k1, true) k1_9 = 历排库.处理后返回新排(k1_9, 前后缀库.加前缀, [["]]) k1_9 = 历排库.处理后返回新排(k1_9, 前后缀库.加后缀, [["]]) k1_9 = 历排库.处理后返回新排(k1_9, 前后缀库.加前缀, o2) 历排库.处理后返回新排(k1_9, 令行库.执行命令) end local k1 = 字集码互转库.u8_to_a([[../single]]) local k2 = 字集码互转库.u8_to_a([[stylua --indent-type Spaces --indent-width 2 --collapse-simple-statement Never ]]) --~ 若不传命令行参数,则后果未必如愿。例如,我想用空格做缩进符,它却用制表符。 d_2.排版lua文件(k1, k2) |