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
-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).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user