From cf46689792d33b88fcde9e6494543598ddf09519 Mon Sep 17 00:00:00 2001 From: truetype Date: Tue, 7 Jul 2026 15:43:54 +0000 Subject: [PATCH] Rename progetto2 to viandante --- README.md | 12 ++++++------ docs/README.md | 2 +- docs/architecture.md | 2 +- docs/development.md | 8 ++++---- docs/gitea.md | 28 ++++++++++++++-------------- docs/usage.md | 4 ++-- pyproject.toml | 6 +++--- src/progetto2/__init__.py | 2 +- src/progetto2/__main__.py | 4 ++-- tests/test_ansi.py | 2 +- tests/test_deadsouls.py | 2 +- tests/test_gmcp.py | 2 +- tests/test_logger.py | 4 ++-- tests/test_mapper.py | 2 +- tests/test_telnet.py | 2 +- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 2645ad4..472c5e3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# progetto2 +# viandante -`progetto2` ospita un **client MUD CLI** pensato per collegarsi a un MUD +`viandante` ospita un **client MUD CLI** pensato per collegarsi a un MUD LP‑MUD basato sul driver **FluffOS** (per esempio **Dead Souls**, libreria 3.8.6). Il client parla telnet con estensioni standard: `ECHO`, `NAWS`, `TTYPE`, e rifiuta (`WONT`) tutte le altre (`GMCP`, `MSDP`, `MCCP`, `MXP` @@ -15,7 +15,7 @@ ASCII** on-demand. ## Setup ```bash -cd progetto2 +cd viandante python3 -m venv .venv source .venv/bin/activate pip install -e ".[dev]" @@ -96,7 +96,7 @@ Quando il server invia `Char.Vitals` via GMCP, hp/sp/mv compaiono automaticament ## Layout dei sorgenti ``` -progetto2/ +viandante/ ├── pyproject.toml # metadata + dipendenze + entry point `mudclient` ├── README.md # questo file ├── .gitignore @@ -109,9 +109,9 @@ progetto2/ │ ├── events.md # schema eventi del logger │ ├── development.md # setup dev, pytest, ruff, come estendere │ └── gitea.md # flusso di pubblicazione sul Gitea + sicurezza token -├── src/progetto2/ # package +├── src/viandante/ # package │ ├── __init__.py -│ ├── __main__.py # supporta `python -m progetto2` +│ ├── __main__.py # supporta `python -m viandante` │ ├── cli.py # entry point + UI a riga di comando │ ├── telnet.py # state machine IAC + asyncio │ ├── deadsouls.py # parser di stanze Dead Souls / LP‑MUD diff --git a/docs/README.md b/docs/README.md index 9dffb56..d1ed3d2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# `docs/` — indice della documentazione di `progetto2` +# `docs/` — indice della documentazione di `viandante` Documentazione completa del client MUD CLI. La lingua è l'italiano per coerenza con il `README.md` principale. I blocchi di codice e i nomi diff --git a/docs/architecture.md b/docs/architecture.md index c618260..5fd3f95 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,4 +1,4 @@ -# Architettura di `progetto2` +# Architettura di `viandante` > Versione: v0.2.x — client MUD CLI asincrono in Python ≥ 3.10 basato su > `prompt_toolkit`. Niente dipendenze pesanti: solo la libreria del diff --git a/docs/development.md b/docs/development.md index ca12803..0b86690 100644 --- a/docs/development.md +++ b/docs/development.md @@ -7,8 +7,8 @@ Setup locale, pytest, ruff, e come estendere il client. ## Setup ```bash -git clone https://192.168.0.183:8085/truetype/progetto2.git -cd progetto2 +git clone https://192.168.0.183:8085/truetype/viandante.git +cd viandante python3 -m venv .venv source .venv/bin/activate @@ -80,7 +80,7 @@ Dead Souls docker su `localhost:6666`: # 2 secondi, log JSONL + MD LOGJSON=$(mktemp /tmp/mud-json.XXXXXX.jsonl) LOGMD=$(mktemp /tmp/mud-md.XXXXXX.md) -timeout 2 python -m progetto2 --host localhost --port 6666 \ +timeout 2 python -m viandante --host localhost --port 6666 \ --log-json "$LOGJSON" --log-md "$LOGMD" /dev/null 2>&1 || true wc -l "$LOGJSON" "$LOGMD" head -3 "$LOGJSON" @@ -97,7 +97,7 @@ e un header MD con `host/port/user`. Esempio: nuovo modulo `directions.py` che assorbe `EXIT_ALIASES` da `deadsouls.py`. Procedura: -1. Crea `src/progetto2/directions.py` con le costanti e `normalize_exits()`. +1. Crea `src/viandante/directions.py` con le costanti e `normalize_exits()`. 2. Aggiorna `deadsouls.py` → re‑import da `directions` per back‑compat. 3. Aggiorna `gmcp.py`, `mapper.py`, `cli.py` → import da `directions`. 4. Scrivi `tests/test_directions.py`. diff --git a/docs/gitea.md b/docs/gitea.md index c926080..f8a8201 100644 --- a/docs/gitea.md +++ b/docs/gitea.md @@ -2,7 +2,7 @@ Server: **http://192.168.0.183:8085** Owner: `truetype` -Repo: `progetto2` +Repo: `viandante` Branch iniziale: `main` --- @@ -24,7 +24,7 @@ Il token Gitea in colonna `truetype` (stringa 40‑hex) fornisce accesso 3. **Preferisci token *scoped***: quando ne crei uno nuovo, limita `repository.write` e basta, non `repository.admin`. 4. **HTTPS vs SSH.** Se hai una chiave SSH sull'account Gitea, - preferisci sempre SSH: `git@192.168.0.183:8085:truetype/progetto2.git` + preferisci sempre SSH: `git@192.168.0.183:8085:truetype/viandante.git` (nota: Gitea usa `:owner/repo.git` dopo il `:`). Nessun token in chiaro è necessario. @@ -41,20 +41,20 @@ Il token Gitea in colonna `truetype` (stringa 40‑hex) fornisce accesso curl -X POST http://192.168.0.183:8085/api/v1/user/repos \ -H "Authorization: token " \ -H "Content-Type: application/json" \ - -d '{"name": "progetto2", "description": "MUD client (Dead Souls / LP-MUD)", "auto_init": false, "private": false}' + -d '{"name": "viandante", "description": "MUD client (Dead Souls / LP-MUD)", "auto_init": false, "private": false}' ``` Risposta attesa: `201 Created` con JSON contenente `id`, `ssh_url`, `clone_url`, `html_url`. Annota: - `html_url` (visibile in browser) -- `clone_url` (es. `http://192.168.0.183:8085/truetype/progetto2.git`) +- `clone_url` (es. `http://192.168.0.183:8085/truetype/viandante.git`) --- ## Configurazione git locale (una tantum) -Da `/home/ubuntu/code/progetto2`: +Da `/home/ubuntu/code/viandante`: ```bash git config user.name "truetype" @@ -70,7 +70,7 @@ git config user.email "truetype@192.168.0.183" Se `.git/` non esiste ancora: ```bash -cd /home/ubuntu/code/progetto2 +cd /home/ubuntu/code/viandante git init git branch -M main ``` @@ -86,14 +86,14 @@ git commit -m "Initial commit: MUD client v0.2 (cli, telnet, gmcp, mapper, deads Push (token inline, **non** salvato): ```bash -git push https://truetype:@192.168.0.183:8085/truetype/progetto2.git main +git push https://truetype:@192.168.0.183:8085/truetype/viandante.git main ``` Verifica: ```bash git remote -v -# deve mostrare origin → http://192.168.0.183:8085/truetype/progetto2.git +# deve mostrare origin → http://192.168.0.183:8085/truetype/viandante.git git log --oneline -5 ``` @@ -107,15 +107,15 @@ Dopo un push con URL `https://user:token@host/...`, Gitea lascia subito le credenziali: ```bash -git remote set-url origin http://192.168.0.183:8085/truetype/progetto2.git +git remote set-url origin http://192.168.0.183:8085/truetype/viandante.git git remote -v -# deve mostrare: origin http://192.168.0.183:8085/truetype/progetto2.git (no user:token@) +# deve mostrare: origin http://192.168.0.183:8085/truetype/viandante.git (no user:token@) ``` Da questo momento i push successivi richiederanno il token solo se usi HTTPS nudo. Per evitare di digitarlo ogni volta, configura una **chiave SSH** (`http://192.168.0.183:8085/user/settings/keys`) e -cambia il remote in `git@192.168.0.183:8085:truetype/progetto2.git`. +cambia il remote in `git@192.168.0.183:8085:truetype/viandante.git`. --- @@ -163,12 +163,12 @@ dei binari / delle release notes. Se per qualunque motivo il `.git/` locale viene perso: ```bash -cd /home/ubuntu/code/progetto2 +cd /home/ubuntu/code/viandante git init git branch -M main -git remote add origin https://192.168.0.183:8085/truetype/progetto2.git +git remote add origin https://192.168.0.183:8085/truetype/viandante.git git add . -git commit -m "Restore: progetto2 v0.2" +git commit -m "Restore: viandante v0.2" git push -u origin main # NB: questo push richiede di nuovo un token se SSH non è configurato ``` diff --git a/docs/usage.md b/docs/usage.md index e7e89d6..d00bc05 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,7 +1,7 @@ # Uso della CLI — riferimento completo Il comando dopo `pip install -e .` è **`mudclient`** (entry point -definito in `pyproject.toml`). È equivalente a `python -m progetto2`. +definito in `pyproject.toml`). È equivalente a `python -m viandante`. --- @@ -135,7 +135,7 @@ Password: Tolleranti a prefissi `> *`, spaziature e `: ?` finale. Se il tuo MUD usa prompt diversi, modifica le regex in -`src/progetto2/cli.py` (sono 3 righe ciascuna). +`src/viandante/cli.py` (sono 3 righe ciascuna). --- diff --git a/pyproject.toml b/pyproject.toml index 86d563e..f6ec123 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "progetto2" +name = "viandante" version = "0.1.0" description = "CLI MUD client + utilities (Dead Souls / LP-MUD over telnet)" readme = "README.md" @@ -27,7 +27,7 @@ dev = [ ] [project.scripts] -mudclient = "progetto2.cli:main" +mudclient = "viandante.cli:main" [build-system] requires = ["setuptools>=61.0", "wheel"] @@ -35,7 +35,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["src"] -include = ["progetto2*"] +include = ["viandante*"] [tool.setuptools.package-dir] "" = "src" diff --git a/src/progetto2/__init__.py b/src/progetto2/__init__.py index fb13b8c..28872f3 100644 --- a/src/progetto2/__init__.py +++ b/src/progetto2/__init__.py @@ -1,3 +1,3 @@ -"""progetto2 — CLI MUD client + utilities.""" +"""viandante — CLI MUD client + utilities.""" __version__ = "0.1.0" diff --git a/src/progetto2/__main__.py b/src/progetto2/__main__.py index 9ae03e8..a2d4c43 100644 --- a/src/progetto2/__main__.py +++ b/src/progetto2/__main__.py @@ -1,7 +1,7 @@ -"""Allow ``python -m progetto2`` to launch the CLI.""" +"""Allow ``python -m viandante`` to launch the CLI.""" from __future__ import annotations -from progetto2.cli import main +from viandante.cli import main if __name__ == "__main__": raise SystemExit(main()) diff --git a/tests/test_ansi.py b/tests/test_ansi.py index 9f69c92..62e3030 100644 --- a/tests/test_ansi.py +++ b/tests/test_ansi.py @@ -1,7 +1,7 @@ """Tests for the ANSI stripper.""" from __future__ import annotations -from progetto2.ansi import strip_ansi, visible_len +from viandante.ansi import strip_ansi, visible_len def test_strip_sgr() -> None: diff --git a/tests/test_deadsouls.py b/tests/test_deadsouls.py index a6f583c..61595fd 100644 --- a/tests/test_deadsouls.py +++ b/tests/test_deadsouls.py @@ -1,7 +1,7 @@ """Tests for the Dead Souls textual parser.""" from __future__ import annotations -from progetto2.deadsouls import ( +from viandante.deadsouls import ( EXIT_ALIASES, RollingRoomParser, parse_exits, diff --git a/tests/test_gmcp.py b/tests/test_gmcp.py index 53ed259..4087eed 100644 --- a/tests/test_gmcp.py +++ b/tests/test_gmcp.py @@ -3,7 +3,7 @@ from __future__ import annotations import json -from progetto2.gmcp import ( +from viandante.gmcp import ( GmcpEvent, extract_room_info, extract_vitals, diff --git a/tests/test_logger.py b/tests/test_logger.py index 912b449..46e7c65 100644 --- a/tests/test_logger.py +++ b/tests/test_logger.py @@ -1,4 +1,4 @@ -"""Tests for :mod:`progetto2.logger`.""" +"""Tests for :mod:`viandante.logger`.""" from __future__ import annotations import json @@ -6,7 +6,7 @@ from pathlib import Path import pytest -from progetto2.logger import EventLogger +from viandante.logger import EventLogger # ---- shared helpers ------------------------------------------------------ diff --git a/tests/test_mapper.py b/tests/test_mapper.py index 0301519..b4c99b1 100644 --- a/tests/test_mapper.py +++ b/tests/test_mapper.py @@ -1,7 +1,7 @@ """Tests for the room graph + ASCII map renderer.""" from __future__ import annotations -from progetto2.mapper import Mapper +from viandante.mapper import Mapper def test_visit_returns_stable_id() -> None: diff --git a/tests/test_telnet.py b/tests/test_telnet.py index 264301e..b885841 100644 --- a/tests/test_telnet.py +++ b/tests/test_telnet.py @@ -1,7 +1,7 @@ """Tests for the telnet IAC parser.""" from __future__ import annotations -from progetto2.telnet import ( +from viandante.telnet import ( DO, EOR, GA,