Capitolo 9. File di configurazione
Capitolo 9. File di configurazione
Tutti i dati utente di wxreader si trovano in un’unica directory, completamente separata da wxterm / wxeditor:
| Piattaforma | Directory dei dati |
|---|---|
| Linux / FreeBSD | ~/.wxreader/ |
| macOS | ~/Library/Application Support/wxreader/ |
| Windows | %APPDATA%\wxreader\ |
9.1 Panoramica dei file
| File | Scopo |
|---|---|
data.dat |
database SQLite della biblioteca (modalità WAL): tabelle shelf / books / notes / mark |
cover/{id-libro}.png |
cache delle copertine (240×320) |
settings.json |
tutte le impostazioni: options (tema/lingua/font dell’interfaccia/cambio di tema/sfondo) + editor (stile del lettore nel nodo reader) |
logs/app_{data}.log |
log di esecuzione a rotazione (da consultare in caso di problemi) |
9.2 Struttura delle tabelle di data.dat
| Tabella | Colonne |
|---|---|
| shelf | id, name (univoco), added_time, sort_order (ordine per trascinamento) |
| books | id, shelf_id (0 = non raggruppato), title, path (univoco, chiave di deduplica), cover, added_time, last_read, read_seconds, progress, favorite, author, format, note |
| notes | id, book_id, page, selected_text, note_content, added_time |
| mark | id, book_id, page, selected_text, added_time |
Valori di format: pdf / epub / mobi (inclusi azw3, prc) / md / txt /
chm / img (cartella di fumetti).
9.3 Struttura di settings.json
{
"options": {
"theme": "Tokyo Night",
"lang": "it",
"themeFontFamily": "Inter",
"themeFontSize": 12,
"themeSwitchMode": "by-time",
"uiDarkTheme": "Dark",
"uiLightTheme": "Light",
"darkThemeStartTime": "19:00",
"lightThemeStartTime": "07:00",
"backgroundImage": "/path/to/img.jpg",
"backgroundImageMode": 2,
"backgroundImageOpacity": 0.3
},
"editor": {
"reader": {
"fontSize": 18,
"lineHeight": 1.5,
"paraSpacing": 1.0,
"textAlign": 0,
"invert": false,
"brightness": 1.0,
"autoScroll": false,
"scrollInterval": 3,
"viewMode": 0
}
}
}
9.4 Semantica dell’avanzamento
books.progress (con base 1) ha significati diversi a seconda del
formato:
| format | significato di progress |
|---|---|
| epub / mobi / md / txt | numero di capitolo |
| numero di pagina | |
| img | indice dell’immagine nell’ordine di lettura ricorsivo |
| chm | sempre 1 |
read_seconds è il tempo di lettura accumulato (+60 ogni 60 secondi
mentre una finestra di lettura è aperta).