Il programma si chiama Mimante, con le convenzioni di Febe (#23)
Il prodotto prende il nome del repository, come chiesto per allineare la struttura agli altri progetti: soluzione Mimante.slnx, progetti src/Mimante, tests/Mimante.Tests e tools/Mimante.Schermate, spazi dei nomi Mimante.*, immagine alby96/mimante, modello docker/unraid/mimante.xml, compose in docker/, documenti in minuscolo (stato.md, architettura.md, come-funziona.md, schermate/), versioni dei pacchetti in Directory.Packages.props. Versione 2.0.0. Non cambiano database, tabelle, variabili d'ambiente, /config, chiave della sessione e riferimenti del sito: bidoo.default.json è identico e i nomi logici delle risorse incorporate restano quelli che le migrazioni cercano. divSaldoBidBottom è l'id di Bidoo. Compatibilità: il cookie dell'interfaccia diventa mimante_sessione (un accesso in più per browser dopo l'aggiornamento); le preferenze del browser passano da bidbot.* a mimante.* con una copia una tantum. Corretto anche il tema della pagina d'accesso, che leggeva il valore salvato senza togliere le virgolette del JSON. Tolto il codice non compilato: il riferimento del riscatto (lo sostituisce il riscatto nuovo) e il formato SQLite della versione desktop (ora la issue #31); sono leggibili al tag v1.2.0. Nuovi docs/processo.md, docs/decisioni.md, docs/docker.md (con i passi per sostituire il container su Unraid) e ADR 0014. Il Dockerfile copia Directory.Packages.props e .dockerignore esclude dati/. Build con gli avvisi come errori; 288 test verdi, i 14 sul database saltati perché Docker Desktop su questo PC non parte: girano nella CI con il suo PostgreSQL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
650ccea844
commit
9d89624434
216 files changed
+884
-6493
No files matched your search
+2
-2
@@ -6,12 +6,12 @@
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>BidooBidBot.Screenshots</RootNamespace>
|
||||
<RootNamespace>Mimante.Schermate</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\BidooBidBot\BidooBidBot.csproj" />
|
||||
<ProjectReference Include="..\..\src\Mimante\Mimante.csproj" />
|
||||
<Using Remove="Microsoft.Extensions.Logging" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Text.Json;
|
||||
using BidooBidBot.Session.Cdp;
|
||||
using Mimante.Session.Cdp;
|
||||
|
||||
// Uso: dotnet run --project tools/Screenshots -- <indirizzo> <password dell'interfaccia> <cartella>
|
||||
// Esempio: dotnet run --project tools/Screenshots -- http://localhost:8080 dev docs/screenshot
|
||||
// Uso: dotnet run --project tools/Mimante.Schermate -- <indirizzo> <password dell'interfaccia> <cartella>
|
||||
// Esempio: dotnet run --project tools/Mimante.Schermate -- http://localhost:8080 dev docs/schermate
|
||||
// Il bot deve girare sul simulatore (--simulatore) per avere aste da fotografare.
|
||||
// Esce con 1 se una pagina ha errori JavaScript.
|
||||
|
||||
@@ -20,7 +20,7 @@ Directory.CreateDirectory(outDir);
|
||||
|
||||
using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(5));
|
||||
var ct = cts.Token;
|
||||
var profile = Path.Combine(Path.GetTempPath(), $"bidbot-schermate-{Environment.ProcessId}");
|
||||
var profile = Path.Combine(Path.GetTempPath(), $"mimante-schermate-{Environment.ProcessId}");
|
||||
await using var chromium = await ChromiumProcess.StartAsync(profile, ct);
|
||||
await using var cdp = await CdpClient.ConnectAsync(chromium.Endpoint, ct);
|
||||
|
||||
@@ -142,7 +142,7 @@ await Viewport(1366, 768);
|
||||
await Shot("15-aste-1366", "#/aste", clickFirst, 2000);
|
||||
await Viewport(1000, 900);
|
||||
await Shot("08-aste-finestra-stretta", "#/aste", clickFirst, 2000);
|
||||
await Eval("localStorage.removeItem('bidbot.theme')");
|
||||
await Eval("localStorage.removeItem('mimante.theme')");
|
||||
|
||||
try { await cdp.SendAsync("Browser.close", timeout: TimeSpan.FromSeconds(3)); } catch { }
|
||||
|
||||
@@ -158,6 +158,6 @@ return 1;
|
||||
static string RepoRoot()
|
||||
{
|
||||
for (var d = new DirectoryInfo(Environment.CurrentDirectory); d != null; d = d.Parent)
|
||||
if (File.Exists(Path.Combine(d.FullName, "BidooBidBot.sln"))) return d.FullName;
|
||||
if (File.Exists(Path.Combine(d.FullName, "Mimante.slnx"))) return d.FullName;
|
||||
return Environment.CurrentDirectory;
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
# Sviluppo locale di Bidoo BidBot: PostgreSQL 18 come su Unraid, e il bot dal Dockerfile.
|
||||
#
|
||||
# docker compose -f tools/dev/docker-compose.yml up -d postgres # solo il database
|
||||
# docker compose -f tools/dev/docker-compose.yml up -d --build # database + bot
|
||||
# docker compose -f tools/dev/docker-compose.yml --profile simulatore up -d --build
|
||||
#
|
||||
# Il bot legge /config da tools/dev/config (ignorata da git). Interfaccia: http://localhost:8080,
|
||||
# password «dev». Fuori da Docker: DB_HOST=localhost DB_PASSWORD=dev UI_PASSWORD=dev
|
||||
# dotnet run --project src/BidooBidBot -- --config tools/dev/config
|
||||
name: bidoo-bidbot-dev
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18
|
||||
environment:
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: dev
|
||||
POSTGRES_DB: autobidder
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U admin -d autobidder"]
|
||||
interval: 5s
|
||||
retries: 20
|
||||
|
||||
bot:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: docker/Dockerfile
|
||||
args:
|
||||
VERSION: dev
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DB_HOST: postgres:5432
|
||||
DB_PASSWORD: dev
|
||||
UI_PASSWORD: dev
|
||||
TZ: Europe/Rome
|
||||
PUID: "1000"
|
||||
PGID: "1000"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./config:/config
|
||||
|
||||
# Lo stesso bot, senza sessione Bidoo: parte in modalità simulatore (banner in alto).
|
||||
bot-simulatore:
|
||||
profiles: ["simulatore"]
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: docker/Dockerfile
|
||||
args:
|
||||
VERSION: dev
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DB_HOST: postgres:5432
|
||||
DB_NAME: bidbot_simulatore
|
||||
DB_PASSWORD: dev
|
||||
UI_PASSWORD: dev
|
||||
TZ: Europe/Rome
|
||||
ports:
|
||||
- "8081:8080"
|
||||
volumes:
|
||||
- ./config-simulatore:/config
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
@@ -1,6 +1,6 @@
|
||||
# Ambiente di release in locale: il bot compilato in Release contro il PostgreSQL di Unraid.
|
||||
# Copia questo file in tools/dev/release.env (ignorato da git) e scrivi le password.
|
||||
# Lo legge la configurazione «Bidoo BidBot (release, PostgreSQL di Unraid)» di .vscode/launch.json.
|
||||
# Lo legge la configurazione «Mimante (release, PostgreSQL di Unraid)» di .vscode/launch.json.
|
||||
#
|
||||
# DB_NAME è lo stesso database che userà il container su Unraid: ciò che il bot impara dal sito
|
||||
# vero in queste prove resta nell'archivio. Se manca, il bot lo crea (admin è superutente).
|
||||
|
||||
Reference in new issue
Block a user