Skip to content

Commit dd0ad7f

Browse files
committed
1.1.0: matrix-nio 0.26.0 support, interactive cache mode, globals refactor, getpass, reset command, msgtype fix, tests and ci
1 parent 40c4034 commit dd0ad7f

8 files changed

Lines changed: 538 additions & 317 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release Check
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
test-and-lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
17+
18+
- name: Set up Python
19+
run: uv python install 3.13
20+
21+
- name: Install dependencies
22+
run: uv sync
23+
24+
- name: Run Ruff (Linting)
25+
run: uv run ruff check .
26+
27+
- name: Run Tests
28+
run: uv run pytest

README.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# LocalModeration for Matrix
22

3-
A CLI tool for bulk message deletion, media cleanup, and sticker purge in Matrix rooms.
4-
5-
> **Note:** This tool targets **public (unencrypted) rooms**. Encrypted messages are skipped automatically.
3+
A CLI tool for bulk message deletion, media cleanup, and sticker purge in public (unencrypted) Matrix rooms. Encrypted messages are skipped automatically.
64

75
## Installation
86

@@ -25,6 +23,7 @@ uv tool install localmoderationmatrix
2523
## Session
2624

2725
Once logged in, your session is saved in your home directory. Just enter your **User ID** on the next run to auto-login.
26+
If you need to clear the saved session, type `reset` as your User ID.
2827

2928
## Usage
3029

@@ -39,6 +38,7 @@ localmoderationmatrix <room_id> [options]
3938
| `room_id` | (Required) The Matrix room ID. |
4039
| `--search` | Search for a single keyword. |
4140
| `--file` | Search using a wordlist file (one word per line). |
41+
| `--interactive` | Scan room once and enter Interactive Hub mode. |
4242
| `--purge-media` | Delete media older than X days (`0` for all). |
4343
| `--purge-sticker` | Delete stickers older than X days (`0` for all). |
4444
| `--log-room` | Room ID to send moderation logs. |
@@ -52,7 +52,7 @@ localmoderationmatrix <room_id> [options]
5252
* `y` : Delete.
5353
* `n` : Skip.
5454
* `a` : **Delete All** remaining items automatically.
55-
* `q` : Quit.
55+
* `q` : Quit current review (returns to menu in Interactive Mode).
5656

5757
## Examples
5858

@@ -74,16 +74,10 @@ localmoderationmatrix "!roomID:matrix.org" --file words.txt --days 7 --log-room
7474
localmoderationmatrix "!roomID:matrix.org" --purge-media 90
7575
```
7676

77-
**Delete ALL stickers:**
78-
79-
```bash
80-
localmoderationmatrix "!roomID:matrix.org" --purge-sticker 0
81-
```
82-
83-
**Custom time filter:**
77+
**Interactive Mode (Scan once, filter instantly):**
8478

8579
```bash
86-
localmoderationmatrix "!roomID:matrix.org" --search "test" --days 3 --hours 12
80+
localmoderationmatrix "!roomID:matrix.org" --interactive --days 7
8781
```
8882

8983
## Building from Source
@@ -97,7 +91,7 @@ uv build
9791
**Standalone Executable:**
9892

9993
```bash
100-
pyinstaller --onefile --name LocalModerationMatrix --clean --noconfirm --optimize 2 src/localmoderationmatrix/cli.py
94+
pyinstaller --onefile --name LocalModerationMatrix --clean --noconfirm --optimize 2 --collect-all localmoderationmatrix src/localmoderationmatrix/cli.py
10195
```
10296

10397
## License

pyproject.toml

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,50 @@
11
[project]
22
name = "localmoderationmatrix"
3-
version = "1.0.2"
4-
description = "CLI moderation tool for bulk message deletion and media cleanup in public Matrix rooms."
3+
version = "1.1.0"
4+
description = "A CLI tool for bulk message deletion, media cleanup, and sticker purge in public Matrix rooms."
55
readme = "README.md"
66
license = { text = "Apache-2.0" }
7-
requires-python = ">=3.13"
8-
keywords = ["matrix", "moderation", "cli", "purge", "bulk-delete", "sticker", "media-cleanup", "matrix-org"]
7+
requires-python = ">=3.11"
8+
authors = [{ name = "Berkay Gediz" }]
9+
keywords = [
10+
"matrix",
11+
"matrix-org",
12+
"moderation",
13+
"cli",
14+
"bulk-delete",
15+
"purge",
16+
"media-cleanup",
17+
"sticker",
18+
"chat-moderation",
19+
"synapse",
20+
"matrix-bot",
21+
"community-management",
22+
]
923
classifiers = [
10-
"Development Status :: 4 - Beta",
24+
"Development Status :: 5 - Production/Stable",
1125
"Environment :: Console",
1226
"Intended Audience :: System Administrators",
27+
"Intended Audience :: Telecommunications Industry",
1328
"License :: OSI Approved :: Apache Software License",
29+
"Operating System :: Microsoft :: Windows",
30+
"Operating System :: POSIX :: Linux",
31+
"Operating System :: MacOS",
1432
"Programming Language :: Python :: 3",
33+
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
35+
"Programming Language :: Python :: 3.13",
36+
"Programming Language :: Python :: 3 :: Only",
1537
"Topic :: Communications :: Chat",
1638
"Topic :: System :: Systems Administration",
39+
"Topic :: Utilities",
1740
]
18-
dependencies = [
19-
"matrix-nio>=0.25.2",
20-
]
41+
dependencies = ["matrix-nio>=0.26.0"]
42+
43+
[project.urls]
44+
Homepage = "https://github.com/berkaygediz/LocalModerationMatrix"
45+
Repository = "https://github.com/berkaygediz/LocalModerationMatrix"
46+
Issues = "https://github.com/berkaygediz/LocalModerationMatrix/issues"
47+
Changelog = "https://github.com/berkaygediz/LocalModerationMatrix/releases"
2148

2249
[project.scripts]
2350
localmoderationmatrix = "localmoderationmatrix.cli:main"
@@ -30,6 +57,4 @@ build-backend = "hatchling.build"
3057
packages = ["src/localmoderationmatrix"]
3158

3259
[dependency-groups]
33-
dev = [
34-
"pyinstaller>=6.20.0",
35-
]
60+
dev = ["pyinstaller>=6.21.0", "pytest>=9.1.1"]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
matrix-nio>=0.25.2
1+
matrix-nio>=0.26.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""LocalModeration for Matrix - CLI moderation tool for bulk message deletion and media cleanup in public Matrix rooms."""
22

3-
__version__ = "1.0.2"
3+
__version__ = "1.1.0"

0 commit comments

Comments
 (0)