mirror of
https://github.com/onyx-and-iris/q3rcon-cli.git
synced 2026-04-13 04:23:38 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac5b117e2c | |||
| 4f5272ac32 | |||
| 04c4e40063 | |||
| 2233f5eda1 |
@@ -20,7 +20,7 @@ classifiers = [
|
|||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
]
|
]
|
||||||
dependencies = ["aio-q3-rcon>=1.0.0", "clypi>=1.8.2"]
|
dependencies = ["aio-q3-rcon>=1.0.1", "clypi>=1.8.2"]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
q3rcon-cli = "q3rcon_cli.cli:main"
|
q3rcon-cli = "q3rcon_cli.cli:main"
|
||||||
@@ -34,7 +34,7 @@ Source = "https://github.com/onyx-and-iris/q3rcon-cli"
|
|||||||
path = "src/q3rcon_cli/__about__.py"
|
path = "src/q3rcon_cli/__about__.py"
|
||||||
|
|
||||||
[tool.hatch.envs.default]
|
[tool.hatch.envs.default]
|
||||||
dependencies = ["aio-q3-rcon @ {root:parent:uri}/aio-q3-rcon"]
|
workspace.members = [{ path = "../aio-q3-rcon" }]
|
||||||
|
|
||||||
[tool.hatch.envs.types]
|
[tool.hatch.envs.types]
|
||||||
extra-dependencies = ["mypy>=1.0.0"]
|
extra-dependencies = ["mypy>=1.0.0"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2026-present onyx-and-iris <code@onyxandiris.online>
|
# SPDX-FileCopyrightText: 2026-present onyx-and-iris <code@onyxandiris.online>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
__version__ = '0.2.1'
|
__version__ = '0.2.3'
|
||||||
|
|||||||
@@ -74,12 +74,12 @@ class OutConsole(Console):
|
|||||||
cprint('\nNo players connected.\n', fg=self.style)
|
cprint('\nNo players connected.\n', fg=self.style)
|
||||||
return
|
return
|
||||||
|
|
||||||
slots = clypi.boxed(_slots, title='Slot', width=15)
|
slots = clypi.boxed(_slots, title='Slot', width=10, align='center')
|
||||||
scores = clypi.boxed(_scores, title='Score', width=15)
|
scores = clypi.boxed(_scores, title='Score', width=10, align='center')
|
||||||
pings = clypi.boxed(_pings, title='Ping', width=15)
|
pings = clypi.boxed(_pings, title='Ping', width=10, align='center')
|
||||||
guids = clypi.boxed(_guids, title='GUID', width=40)
|
guids = clypi.boxed(_guids, title='GUID', width=len(max(_guids, key=len)) + 4)
|
||||||
names = clypi.boxed(_names, title='Name', width=30)
|
names = clypi.boxed(_names, title='Name', width=len(max(_names, key=len)) + 4)
|
||||||
ips = clypi.boxed(_ips, title='IP', width=30)
|
ips = clypi.boxed(_ips, title='IP', width=len(max(_ips, key=len)) + 4)
|
||||||
print(f'\n{clypi.stack(slots, scores, pings, guids, names, ips, padding=0)}')
|
print(f'\n{clypi.stack(slots, scores, pings, guids, names, ips, padding=0)}')
|
||||||
|
|
||||||
def print_cvar(self, response: str):
|
def print_cvar(self, response: str):
|
||||||
@@ -87,20 +87,20 @@ class OutConsole(Console):
|
|||||||
|
|
||||||
if m := self.CVAR_REGEX.match(response):
|
if m := self.CVAR_REGEX.match(response):
|
||||||
name = clypi.boxed(
|
name = clypi.boxed(
|
||||||
[m.group('name')], title='Name', width=max(len(m.group('name')) + 4, 30)
|
[m.group('name')], title='Name', width=max(len(m.group('name')) + 4, 15)
|
||||||
)
|
)
|
||||||
value = clypi.boxed(
|
value = clypi.boxed(
|
||||||
[m.group('value')],
|
[m.group('value')],
|
||||||
title='Value',
|
title='Value',
|
||||||
width=max(len(m.group('value')) + 4, 30),
|
width=max(len(m.group('value')) + 4, 15),
|
||||||
)
|
)
|
||||||
default = clypi.boxed(
|
default = clypi.boxed(
|
||||||
[m.group('default')],
|
[m.group('default')],
|
||||||
title='Default',
|
title='Default',
|
||||||
width=max(len(m.group('default')) + 4, 30),
|
width=max(len(m.group('default')) + 4, 15),
|
||||||
)
|
)
|
||||||
info = clypi.boxed(
|
info = clypi.boxed(
|
||||||
[m.group('info')], title='Info', width=max(len(m.group('info')) + 4, 30)
|
[m.group('info')], title='Info', width=max(len(m.group('info')) + 4, 15)
|
||||||
)
|
)
|
||||||
print(f'\n{clypi.stack(name, value, default, info, padding=0)}')
|
print(f'\n{clypi.stack(name, value, default, info, padding=0)}')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user