Rename progetto2 to viandante
This commit is contained in:
1 parent
0030fd7d82
commit
cf46689792
15 files changed
+41
-41
No files matched your search
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+4
-4
@@ -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 >/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`.
|
||||
|
||||
+14
-14
@@ -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 <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:<TOKEN>@192.168.0.183:8085/truetype/progetto2.git main
|
||||
git push https://truetype:<TOKEN>@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
|
||||
```
|
||||
|
||||
+2
-2
@@ -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).
|
||||
|
||||
---
|
||||
|
||||
|
||||
+3
-3
@@ -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"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"""progetto2 — CLI MUD client + utilities."""
|
||||
"""viandante — CLI MUD client + utilities."""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
@@ -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())
|
||||
+1
-1
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
from progetto2.gmcp import (
|
||||
from viandante.gmcp import (
|
||||
GmcpEvent,
|
||||
extract_room_info,
|
||||
extract_vitals,
|
||||
|
||||
@@ -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 ------------------------------------------------------
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user