pymud 0.20.1.post1__py3-none-any.whl → 0.20.2a1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pymud/logger.py CHANGED
@@ -16,7 +16,7 @@ class Logger:
16
16
  :param raw: 记录带ANSI标记的原始内容,还是记录纯文本内容,默认为True,即记录带ANSI标记的原始内容。
17
17
  """
18
18
 
19
- _esc_regx = re.compile(r"\x1b\[[\d;]+[abcdmz]", flags = re.IGNORECASE)
19
+ # _esc_regx = re.compile(r"\x1b\[[\d;]+[abcdmz]", flags = re.IGNORECASE)
20
20
 
21
21
  def __init__(self, name, mode = 'a', encoding = "utf-8", errors = "ignore", raw = False):
22
22
  self._name = name
@@ -147,7 +147,9 @@ class Logger:
147
147
  newline = True
148
148
 
149
149
  if not self._raw:
150
- data = self._esc_regx.sub("", data)
150
+ from .session import Session
151
+ data = Session.PLAIN_TEXT_REGX.sub("", data)
152
+ #data = self._esc_regx.sub("", data)
151
153
 
152
154
  self._stream.write(data)
153
155
 
pymud/objects.py CHANGED
@@ -609,7 +609,7 @@ class MatchObject(BaseObject):
609
609
 
610
610
  if state.result == self.SUCCESS:
611
611
  self.event.set()
612
-
612
+
613
613
  self.state = state
614
614
  return state
615
615
 
pymud/protocol.py CHANGED
@@ -475,7 +475,7 @@ class MudClientProtocol(Protocol):
475
475
  self._mtts_index += 1
476
476
  self.log.debug('回复第二次MTTS子协商: IAC SB TTYPE IS "XTERM" IAC SE')
477
477
  elif self._mtts_index == 2:
478
- # 第三次收到,回复客户端终端支持的标准功能,此处默认设置775(支持ANSI, VT100, UTF-8, TRUECOLOR, MNES),后续功能完善后再更改
478
+ # 第三次收到,回复客户端终端支持的标准功能,此处默认设置783(支持ANSI, VT100, UTF-8, 256 COLORS, TRUECOLOR, MNES),后续功能完善后再更改
479
479
  # 根据完善的终端模拟功能,修改终端标准
480
480
  # 1 "ANSI" Client supports all common ANSI color codes.
481
481
  # 2 "VT100" Client supports all common VT100 codes.
@@ -489,9 +489,9 @@ class MudClientProtocol(Protocol):
489
489
  # 512 "MNES" Client supports the Mud New Environment Standard for information exchange.
490
490
  # 1024 "MSLP" Client supports the Mud Server Link Protocol for clickable link handling.
491
491
  # 2048 "SSL" Client supports SSL for data encryption, preferably TLS 1.3 or higher.
492
- self.session.write(IAC + SB + TTYPE + IS + b"MTTS 775" + IAC + SE)
492
+ self.session.write(IAC + SB + TTYPE + IS + b"MTTS 783" + IAC + SE)
493
493
  self._mtts_index += 1
494
- self.log.debug('回复第三次MTTS子协商: IAC SB TTYPE IS "MTTS 775" IAC SE')
494
+ self.log.debug('回复第三次MTTS子协商: IAC SB TTYPE IS "MTTS 783" IAC SE')
495
495
  else:
496
496
  self.log.warning(f'收到第{self._mtts_index + 1}次(正常为3次)的MTTS子协商, 将不予应答')
497
497
  else:
pymud/pymud.py CHANGED
@@ -484,6 +484,7 @@ class PyMudApp:
484
484
 
485
485
  ``注意: 复制的内容仅存在于运行环境的剪贴板中。若使用ssh远程,该复制命令不能访问本地剪贴板。``
486
486
  """
487
+
487
488
  b = self.consoleView.buffer
488
489
  if b.selection_state:
489
490
  cur1, cur2 = b.selection_state.original_cursor_position, b.document.cursor_position
@@ -501,7 +502,8 @@ class PyMudApp:
501
502
  line = self.mudFormatProc.line_correction(b.document.current_line)
502
503
  start = max(0, scol)
503
504
  end = min(ecol, len(line))
504
- line_plain = re.sub(r"\x1b\[[\d;]+[abcdmz]", "", line, flags = re.IGNORECASE).replace("\r", "").replace("\x00", "")
505
+ #line_plain = re.sub(r"\x1b\[[0-9;]*[a-zA-Z]", "", line, flags = re.IGNORECASE).replace("\r", "").replace("\x00", "")
506
+ line_plain = Session.PLAIN_TEXT_REGX.sub("", line).replace("\r", "").replace("\x00", "")
505
507
  #line_plain = re.sub("\x1b\\[[^mz]+[mz]", "", line).replace("\r", "").replace("\x00", "")
506
508
  selection = line_plain[start:end]
507
509
  self.app.clipboard.set_text(selection)
@@ -513,7 +515,8 @@ class PyMudApp:
513
515
  lines = []
514
516
  for row in range(srow, erow + 1):
515
517
  line = b.document.lines[row]
516
- line_plain = re.sub(r"\x1b\[[\d;]+[abcdmz]", "", line, flags = re.IGNORECASE).replace("\r", "").replace("\x00", "")
518
+ #line_plain = re.sub(r"\x1b\[[0-9;]*[a-zA-Z]", "", line, flags = re.IGNORECASE).replace("\r", "").replace("\x00", "")
519
+ line_plain = Session.PLAIN_TEXT_REGX.sub("", line).replace("\r", "").replace("\x00", "")
517
520
  lines.append(line_plain)
518
521
 
519
522
  self.app.clipboard.set_text("\n".join(lines))
pymud/session.py CHANGED
@@ -1,4 +1,4 @@
1
- import asyncio, logging, re, math, os, pickle, datetime, importlib, importlib.util, sysconfig, time
1
+ import asyncio, logging, re, math, os, pickle, datetime, importlib, importlib.util, sysconfig, time, dataclasses
2
2
  from collections.abc import Iterable
3
3
  from collections import OrderedDict
4
4
  import logging, queue
@@ -30,7 +30,8 @@ class Session:
30
30
 
31
31
  """
32
32
  #_esc_regx = re.compile("\x1b\\[[^mz]+[mz]")
33
- _esc_regx = re.compile(r"\x1b\[[\d;]+[abcdmz]", flags = re.IGNORECASE)
33
+ #_esc_regx = re.compile(r"\x1b\[[\d;]+[abcdmz]", flags = re.IGNORECASE)
34
+ PLAIN_TEXT_REGX = re.compile("\x1b\\[[0-9;]*[a-zA-Z]", flags = re.IGNORECASE | re.ASCII)
34
35
 
35
36
  _sys_commands = (
36
37
  "help",
@@ -108,7 +109,10 @@ class Session:
108
109
  self.loop = loop or asyncio.get_running_loop()
109
110
  self.syslog = logging.getLogger("pymud.Session")
110
111
 
111
- self.application = app
112
+ from .pymud import PyMudApp
113
+ if isinstance(app, PyMudApp):
114
+ self.application = app
115
+
112
116
  self.name = name
113
117
  self._transport = None
114
118
  self._protocol = None
@@ -529,7 +533,7 @@ class Session:
529
533
  :return: 经处理后的纯文本字符串
530
534
 
531
535
  """
532
- plainText = self._esc_regx.sub("", rawText)
536
+ plainText = Session.PLAIN_TEXT_REGX.sub("", rawText)
533
537
  if trim_newline:
534
538
  plainText = plainText.rstrip("\n").rstrip("\r")
535
539
 
@@ -1926,6 +1930,141 @@ class Session:
1926
1930
 
1927
1931
  self.disconnect()
1928
1932
 
1933
+ def getMaxLength(self, iter: Iterable):
1934
+ return wcswidth(sorted(iter, key = lambda s: wcswidth(s), reverse = True)[0])
1935
+
1936
+ def splitByPrintableWidth(self, str, printable_length):
1937
+ strlist = []
1938
+ startindex = 0
1939
+ remain = False
1940
+ split_str = ""
1941
+ for idx in range(1, len(str)):
1942
+ remain = True
1943
+ split_str = str[startindex:idx]
1944
+ if wcswidth(split_str) >= printable_length:
1945
+ strlist.append(split_str)
1946
+ startindex = idx
1947
+ remain = False
1948
+
1949
+ if remain:
1950
+ strlist.append(str[startindex:])
1951
+
1952
+ #self.info(f"原: {str}, 分隔为 {printable_length}, 结果为 {strlist}")
1953
+ return strlist
1954
+
1955
+ def buildDisplayLines(self, vars: DotDict, title: str):
1956
+ MIN_MARGIN = 4
1957
+ KEY_WIDTH = (self.getMaxLength(vars.keys()) // 4) * 4 + 4
1958
+ VALUE_WIDTH = 20
1959
+ VAR_WIDTH = KEY_WIDTH + 3 + VALUE_WIDTH
1960
+ display_lines = []
1961
+ vars_simple = {}
1962
+ vars_complex = {}
1963
+
1964
+ for k, v in vars.items():
1965
+ if k in ("%line", "%raw"):
1966
+ continue
1967
+
1968
+ if dataclasses.is_dataclass(v) or (isinstance(v, Iterable) and not isinstance(v, str)):
1969
+ vars_complex[k] = v
1970
+ else:
1971
+ vars_simple[k] = v
1972
+
1973
+ totalWidth = self.application.get_width() - 2
1974
+
1975
+ # draw title
1976
+ left_margin = (totalWidth - len(title)) // 2
1977
+ right_margin = totalWidth - len(title) - left_margin
1978
+ title_line = "{}{}{}".format("=" * left_margin, title, "=" * right_margin)
1979
+ display_lines.append(title_line)
1980
+
1981
+ # draw simple vars
1982
+ vars_per_line = totalWidth // VAR_WIDTH
1983
+ left_margin = (totalWidth - vars_per_line * VAR_WIDTH) // 2
1984
+ left_margin = min(MIN_MARGIN, left_margin)
1985
+ right_margin = totalWidth - vars_per_line * VAR_WIDTH - left_margin
1986
+ right_margin = min(left_margin, right_margin)
1987
+
1988
+ line = " " * left_margin
1989
+ cursor = left_margin
1990
+ var_count = 0
1991
+
1992
+ var_keys = sorted(vars_simple.keys())
1993
+ for key in var_keys:
1994
+ if len(key) < KEY_WIDTH:
1995
+ name = key.rjust(KEY_WIDTH)
1996
+ else:
1997
+ name = key.rjust(KEY_WIDTH + VAR_WIDTH)
1998
+
1999
+ value_dis = vars_simple[key].__repr__()
2000
+ var_display = "{} = {}".format(name, value_dis)
2001
+
2002
+ if (cursor + wcswidth(var_display) > totalWidth) or (var_count >= vars_per_line):
2003
+ display_lines.append(line)
2004
+
2005
+ line = " " * left_margin
2006
+ cursor = left_margin
2007
+ var_count = 0
2008
+
2009
+ line += var_display
2010
+ cursor += wcswidth(var_display)
2011
+ var_count += 1
2012
+
2013
+ # 下一处判定
2014
+ for x in range(vars_per_line, 0, -1):
2015
+ next_start = left_margin + (vars_per_line - x) * VAR_WIDTH
2016
+ if cursor < next_start:
2017
+ line += " " * (next_start - cursor)
2018
+ cursor = next_start
2019
+
2020
+ if (vars_per_line - x) > var_count:
2021
+ var_count = (vars_per_line - x)
2022
+ break
2023
+
2024
+ if cursor > left_margin:
2025
+ display_lines.append(line)
2026
+
2027
+ var_keys = sorted(vars_complex.keys())
2028
+ for key in var_keys:
2029
+ name = key.rjust(KEY_WIDTH)
2030
+ value_dis = vars_complex[key].__repr__()
2031
+ allow_len = totalWidth - left_margin - KEY_WIDTH - 3 - right_margin
2032
+ line = "{0}{1} = ".format(" " * left_margin, name.rjust(KEY_WIDTH))
2033
+ if wcswidth(value_dis) > allow_len:
2034
+ value = vars_complex[key]
2035
+ if isinstance(value, dict):
2036
+ max_len = self.getMaxLength(value.keys())
2037
+ line += '{'
2038
+ for k, v in value.items():
2039
+ val_line = "{0}: {1},".format(k.ljust(max_len), v)
2040
+ line += val_line
2041
+ display_lines.append(line)
2042
+ line = " " * (left_margin + KEY_WIDTH + 4)
2043
+ line = line[:-1] + '}'
2044
+ display_lines.append(line)
2045
+ elif isinstance(value, list):
2046
+ line += '['
2047
+ for v in value:
2048
+ val_line = "{0},".format(v)
2049
+ line += val_line
2050
+ display_lines.append(line)
2051
+ line = " " * (left_margin + KEY_WIDTH + 4)
2052
+ line = line[:-1] + ']'
2053
+ display_lines.append(line)
2054
+ else:
2055
+ value_lines = self.splitByPrintableWidth(value_dis, allow_len)
2056
+ for val_line in value_lines:
2057
+ line += val_line
2058
+ display_lines.append(line)
2059
+ line = " " * (left_margin + KEY_WIDTH + 3)
2060
+ else:
2061
+ line = "{0}{1} = {2}".format(" " * left_margin, key.rjust(KEY_WIDTH), vars_complex[key].__repr__())
2062
+ display_lines.append(line)
2063
+
2064
+ display_lines.append("=" * totalWidth)
2065
+
2066
+ return display_lines
2067
+
1929
2068
  def handle_variable(self, code: CodeLine = None, *args, **kwargs):
1930
2069
  '''
1931
2070
  嵌入命令 #variable / #var 的执行函数,操作会话变量。
@@ -1951,57 +2090,65 @@ class Session:
1951
2090
  #args = code.code[2:]
1952
2091
 
1953
2092
  if len(args) == 0:
1954
- vars = self._variables
1955
- vars_simple = {}
1956
- vars_complex = {}
1957
- for k, v in vars.items():
1958
- # 不显示line, raw两个系统变量
1959
- if k in ("%line", "%raw"):
1960
- continue
1961
-
1962
- if isinstance(v, Iterable) and not isinstance(v, str):
1963
- vars_complex[k] = v
1964
- else:
1965
- vars_simple[k] = v
1966
-
1967
- width = self.application.get_width() - 2 # 保留2个字符,防止 > 导致换行
2093
+ # vars = self._variables
2094
+ # vars_simple = {}
2095
+ # vars_complex = {}
2096
+ # for k, v in vars.items():
2097
+ # # 不显示line, raw两个系统变量
2098
+ # if k in ("%line", "%raw"):
2099
+ # continue
2100
+
2101
+ # if isinstance(v, Iterable) and not isinstance(v, str):
2102
+ # vars_complex[k] = v
2103
+ # else:
2104
+ # vars_simple[k] = v
2105
+
2106
+ # width = self.application.get_width() - 2 # 保留2个字符,防止 > 导致换行
1968
2107
 
1969
- title = f" VARIABLE LIST IN SESSION {self.name} "
1970
- left = (width - len(title)) // 2
1971
- right = width - len(title) - left
1972
- self.writetobuffer("="*left + title + "="*right, newline = True)
2108
+ # title = f" VARIABLE LIST IN SESSION {self.name} "
2109
+ # left = (width - len(title)) // 2
2110
+ # right = width - len(title) - left
2111
+ # self.writetobuffer("="*left + title + "="*right, newline = True)
1973
2112
 
1974
- # print vars in simple, 每个变量占40格,一行可以多个变量
1975
- # 这里可以考虑调整一下,默认40, 但如果一个变量值太长,则选择占两个位置
1976
- var_count = len(vars_simple)
1977
- var_per_line = (width - 2) // 40
1978
- lines = math.ceil(var_count / var_per_line)
1979
- left_space = (width - var_per_line * 40) // 2
1980
- if left_space > 4: left_space = 4
2113
+ # # print vars in simple, 每个变量占40格,一行可以多个变量
2114
+ # # 这里可以考虑调整一下,默认40, 但如果一个变量值太长,则选择占两个位置
2115
+ # var_count = len(vars_simple)
2116
+ # var_per_line = (width - 2) // 40
2117
+ # lines = math.ceil(var_count / var_per_line)
2118
+ # left_space = (width - var_per_line * 40) // 2
2119
+ # if left_space > 4: left_space = 4
1981
2120
 
1982
- var_keys = sorted(vars_simple.keys())
1983
-
1984
- for idx in range(0, lines):
1985
- start = idx * var_per_line
1986
- end = (idx + 1) * var_per_line
1987
- if end > var_count: end = var_count
1988
- self.writetobuffer(" " * left_space)
1989
- line_vars = var_keys[start:end]
1990
- for var in line_vars:
1991
- repr = vars_simple[var].__repr__()
1992
- vwidth = 22 - (wcswidth(repr) - len(repr))
1993
- self.writetobuffer("{0} = {1}".format(var.rjust(20), repr.ljust(vwidth)))
1994
- #self.writetobuffer("{0:>18} = {1:<19}".format(var, vars_simple[var].__repr__()))
1995
-
1996
- self.writetobuffer("", newline = True)
1997
-
1998
- # print vars in complex, 每个变量占1行
1999
- var_keys = sorted(vars_complex.keys())
2000
- for key in var_keys:
2001
- self.writetobuffer(" " * left_space)
2002
- self.writetobuffer("{0:>20} = {1}".format(key, vars_complex[key].__repr__()), newline = True)
2003
-
2004
- self.writetobuffer("="*width, newline = True)
2121
+ # var_keys = sorted(vars_simple.keys())
2122
+
2123
+ # for idx in range(0, lines):
2124
+ # start = idx * var_per_line
2125
+ # end = (idx + 1) * var_per_line
2126
+ # if end > var_count: end = var_count
2127
+ # self.writetobuffer(" " * left_space)
2128
+ # line_vars = var_keys[start:end]
2129
+ # for var in line_vars:
2130
+ # repr = vars_simple[var].__repr__()
2131
+ # vwidth = 22 - (wcswidth(repr) - len(repr))
2132
+ # self.writetobuffer("{0} = {1}".format(var.rjust(20), repr.ljust(vwidth)))
2133
+ # #self.writetobuffer("{0:>18} = {1:<19}".format(var, vars_simple[var].__repr__()))
2134
+
2135
+ # self.writetobuffer("", newline = True)
2136
+
2137
+ # # print vars in complex, 每个变量占1行
2138
+ # var_keys = sorted(vars_complex.keys())
2139
+ # for key in var_keys:
2140
+ # self.writetobuffer(" " * left_space)
2141
+ # self.writetobuffer("{0:>20} = {1}".format(key, vars_complex[key].__repr__()), newline = True)
2142
+
2143
+ # self.writetobuffer("="*width, newline = True)
2144
+ # row, col = self.buffer.document.translate_index_to_position(len(self.buffer.text))
2145
+ # if col:
2146
+ # self.writetobuffer("", newline = True)
2147
+
2148
+ lines = self.buildDisplayLines(self._variables, f" VARIABLE LIST IN SESSION {self.name} ")
2149
+
2150
+ for line in lines:
2151
+ self.writetobuffer(line, newline = True)
2005
2152
 
2006
2153
  elif len(args) == 1:
2007
2154
  if args[0] in self._variables.keys():
@@ -2043,50 +2190,55 @@ class Session:
2043
2190
  #args = code.code[2:]
2044
2191
 
2045
2192
  if len(args) == 0:
2046
- vars = self.application.globals
2047
- vars_simple = {}
2048
- vars_complex = {}
2049
- for k, v in vars.items():
2050
- if isinstance(v, Iterable) and not isinstance(v, str):
2051
- vars_complex[k] = v
2052
- else:
2053
- vars_simple[k] = v
2054
-
2055
- width = self.application.get_width() - 2 # 保留2个字符,防止 > 导致换行
2193
+ # vars = self.application.globals
2194
+ # vars_simple = {}
2195
+ # vars_complex = {}
2196
+ # for k, v in vars.items():
2197
+ # if isinstance(v, Iterable) and not isinstance(v, str):
2198
+ # vars_complex[k] = v
2199
+ # else:
2200
+ # vars_simple[k] = v
2201
+
2202
+ # width = self.application.get_width() - 2 # 保留2个字符,防止 > 导致换行
2056
2203
 
2057
- title = f" GLOBAL VARIABLES LIST "
2058
- left = (width - len(title)) // 2
2059
- right = width - len(title) - left
2060
- self.writetobuffer("="*left + title + "="*right, newline = True)
2204
+ # title = f" GLOBAL VARIABLES LIST "
2205
+ # left = (width - len(title)) // 2
2206
+ # right = width - len(title) - left
2207
+ # self.writetobuffer("="*left + title + "="*right, newline = True)
2061
2208
 
2062
- # print vars in simple, 每个变量占40格,一行可以多个变量
2063
- var_count = len(vars_simple)
2064
- var_per_line = (width - 2) // 40
2065
- lines = math.ceil(var_count / var_per_line)
2066
- left_space = (width - var_per_line * 40) // 2
2067
- if left_space > 4: left_space = 4
2209
+ # # print vars in simple, 每个变量占40格,一行可以多个变量
2210
+ # var_count = len(vars_simple)
2211
+ # var_per_line = (width - 2) // 40
2212
+ # lines = math.ceil(var_count / var_per_line)
2213
+ # left_space = (width - var_per_line * 40) // 2
2214
+ # if left_space > 4: left_space = 4
2068
2215
 
2069
- var_keys = sorted(vars_simple.keys())
2070
-
2071
- for idx in range(0, lines):
2072
- start = idx * var_per_line
2073
- end = (idx + 1) * var_per_line
2074
- if end > var_count: end = var_count
2075
- self.writetobuffer(" " * left_space)
2076
- line_vars = var_keys[start:end]
2077
- for var in line_vars:
2078
- repr = vars_simple[var].__repr__()
2079
- vwidth = 22 - (wcswidth(repr) - len(repr))
2080
- self.writetobuffer("{0} = {1}".format(var.rjust(20), repr.ljust(vwidth)))
2081
-
2082
- self.writetobuffer("", newline = True)
2083
-
2084
- # print vars in complex, 每个变量占1行
2085
- for k, v in vars_complex.items():
2086
- self.writetobuffer(" " * left_space)
2087
- self.writetobuffer("{0:>20} = {1}".format(k, v.__repr__()), newline = True)
2216
+ # var_keys = sorted(vars_simple.keys())
2088
2217
 
2089
- self.writetobuffer("="*width, newline = True)
2218
+ # for idx in range(0, lines):
2219
+ # start = idx * var_per_line
2220
+ # end = (idx + 1) * var_per_line
2221
+ # if end > var_count: end = var_count
2222
+ # self.writetobuffer(" " * left_space)
2223
+ # line_vars = var_keys[start:end]
2224
+ # for var in line_vars:
2225
+ # repr = vars_simple[var].__repr__()
2226
+ # vwidth = 22 - (wcswidth(repr) - len(repr))
2227
+ # self.writetobuffer("{0} = {1}".format(var.rjust(20), repr.ljust(vwidth)))
2228
+
2229
+ # self.writetobuffer("", newline = True)
2230
+
2231
+ # # print vars in complex, 每个变量占1行
2232
+ # for k, v in vars_complex.items():
2233
+ # self.writetobuffer(" " * left_space)
2234
+ # self.writetobuffer("{0:>20} = {1}".format(k, v.__repr__()), newline = True)
2235
+
2236
+ # self.writetobuffer("="*width, newline = True)
2237
+
2238
+ lines = self.buildDisplayLines(self.application.globals, f" GLOBAL VARIABLES LIST ")
2239
+
2240
+ for line in lines:
2241
+ self.writetobuffer(line, newline = True)
2090
2242
 
2091
2243
  elif len(args) == 1:
2092
2244
  var = args[0]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymud
3
- Version: 0.20.1.post1
3
+ Version: 0.20.2a1
4
4
  Summary: a MUD Client written in Python
5
5
  Author-email: "newstart@pkuxkx" <crapex@hotmail.com>
6
6
  Maintainer-email: "newstart@pkuxkx" <crapex@hotmail.com>
@@ -737,7 +737,12 @@ Requires-Dist: prompt-toolkit
737
737
 
738
738
  ## 版本更新信息
739
739
 
740
- ### 0.20.1 (2024-11-16)
740
+ ## 0.20.2 (2024-11-18)
741
+ + 功能调整: MTTS协商中,将256 Color明确写入协商回复。原先仅包含ANSI 和 TrueColor。
742
+ + 功能调整: 修复了纯文本正则处理,目前理论上支持所有ANSI控制代码的处置,以正确响应纯文本触发器。
743
+ + 功能调整: 修改了#var和#global的显示实现,提高了变量打印排列的整齐度和辨识度,以适应长值变量和复杂变量。
744
+
745
+ ## 0.20.1 (2024-11-16)
741
746
  + 功能调整: 会话中触发器匹配实现进行部分调整,减少循环次数以提高响应速度
742
747
  + 功能调整: #test / #show 触发器测试功能调整,现在会对使能的和未使能的触发器均进行匹配测试。其中,#show 命令仅测试,而 #test 命令会导致触发器真正响应。
743
748
  + 功能新增: pymud对象新增了一个持续运行的1s的周期定时任务。该任务中会刷新页面显示。可以使用 session.application.addTimerTickCallback 和 session.application.removeTimerTickCallback 来注册和解除定时器回调。
@@ -0,0 +1,19 @@
1
+ pymud/__init__.py,sha256=AP4Edhx90gMKrNfD1O_KVciA3SOnyX5Qt9fZY_JhsTY,574
2
+ pymud/__main__.py,sha256=hFzZjadLlcOuoLM7D8wFiFVO8mqF7vMuo9y-9xfIhRc,64
3
+ pymud/dialogs.py,sha256=p-LidObSuDyOeMif5CsqhF5qq3rizZ1lmThWHrxDyRg,6726
4
+ pymud/extras.py,sha256=Gr-gX7YRWZMmeKV73sk7h_Gf5eZVJ6GcAXvSEfJ4uMI,41124
5
+ pymud/logger.py,sha256=sq9HhZ6-prY34NnDUO1NjaCRy-e5-fr2j0na8FKp9ks,5789
6
+ pymud/main.py,sha256=b_Ui_cN4W8IfhYNyc1duwr3Bp7pYYZQusKTSafCWZIA,6534
7
+ pymud/modules.py,sha256=XoqTeYfZCgqDsV3SYxeehzsbkTzs0swelAUIxyWuL9g,7423
8
+ pymud/objects.py,sha256=qSOFuVZvMh3lxjg6x5JUzcr_sTSgakWWySh801x7TNQ,39457
9
+ pymud/pkuxkx.py,sha256=jRQRUs2xtw7GzYHtLYZXOASnqMumKh0iCoOeKZs8NnU,11467
10
+ pymud/protocol.py,sha256=nlsyXMBAHEf_067mPNGDHzN_zIm9808D8YDIZTNrygg,49118
11
+ pymud/pymud.py,sha256=4v-pdSheWfWCK7O-3bAipK7WE6zPe8mRLil7E1Zbnas,51663
12
+ pymud/session.py,sha256=SrDcYxbHEJDC01x9cM0mWh1U5RC3jNjH660qlAjiuzU,141531
13
+ pymud/settings.py,sha256=ZsKGkjcNGNwqeb2DztwhIrCcRDPYYN1SxtdjWNAJ9CY,7145
14
+ pymud-0.20.2a1.dist-info/LICENSE.txt,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
15
+ pymud-0.20.2a1.dist-info/METADATA,sha256=cvzddI3UTmc53fgWNcUK1eQxgMtMk0PlJ_G0sO5OhnE,74774
16
+ pymud-0.20.2a1.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
17
+ pymud-0.20.2a1.dist-info/entry_points.txt,sha256=diPUOtTkhgC1hVny7Cdg4aRhaHSynMQoraE7ZhJxUcw,37
18
+ pymud-0.20.2a1.dist-info/top_level.txt,sha256=8Gp1eXjxixXjqhhti6tLCspV_8s9sNV3z5Em2_KRhD4,6
19
+ pymud-0.20.2a1.dist-info/RECORD,,
@@ -1,19 +0,0 @@
1
- pymud/__init__.py,sha256=AP4Edhx90gMKrNfD1O_KVciA3SOnyX5Qt9fZY_JhsTY,574
2
- pymud/__main__.py,sha256=hFzZjadLlcOuoLM7D8wFiFVO8mqF7vMuo9y-9xfIhRc,64
3
- pymud/dialogs.py,sha256=p-LidObSuDyOeMif5CsqhF5qq3rizZ1lmThWHrxDyRg,6726
4
- pymud/extras.py,sha256=Gr-gX7YRWZMmeKV73sk7h_Gf5eZVJ6GcAXvSEfJ4uMI,41124
5
- pymud/logger.py,sha256=gtGm8y9RY_CpRpJ0udgKknRxyjsEPrrRyWecUDgBgZM,5662
6
- pymud/main.py,sha256=b_Ui_cN4W8IfhYNyc1duwr3Bp7pYYZQusKTSafCWZIA,6534
7
- pymud/modules.py,sha256=XoqTeYfZCgqDsV3SYxeehzsbkTzs0swelAUIxyWuL9g,7423
8
- pymud/objects.py,sha256=HNWoE6mhUV9SgRsD-2yISt5rVi8h2mTR1sapEZVklNI,39441
9
- pymud/pkuxkx.py,sha256=jRQRUs2xtw7GzYHtLYZXOASnqMumKh0iCoOeKZs8NnU,11467
10
- pymud/protocol.py,sha256=QfDXjlg2OcJXmVoXf_3mAemnYotRXDUlEZNQjhkfXdA,49106
11
- pymud/pymud.py,sha256=pkTb21UV2ccYhG44JjfGdvUSPIWbu_y-vUwBqqzeHaM,51425
12
- pymud/session.py,sha256=GAxenTtUy75A-LAfznMOx753BWd-tyozgngeNdJux4Q,135208
13
- pymud/settings.py,sha256=ZsKGkjcNGNwqeb2DztwhIrCcRDPYYN1SxtdjWNAJ9CY,7145
14
- pymud-0.20.1.post1.dist-info/LICENSE.txt,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
15
- pymud-0.20.1.post1.dist-info/METADATA,sha256=TD5fbQU363NwQw5jDJc4Me_6gkLvkaYcGyyn1BnpCwU,74350
16
- pymud-0.20.1.post1.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
17
- pymud-0.20.1.post1.dist-info/entry_points.txt,sha256=diPUOtTkhgC1hVny7Cdg4aRhaHSynMQoraE7ZhJxUcw,37
18
- pymud-0.20.1.post1.dist-info/top_level.txt,sha256=8Gp1eXjxixXjqhhti6tLCspV_8s9sNV3z5Em2_KRhD4,6
19
- pymud-0.20.1.post1.dist-info/RECORD,,