第9章 設定ファイル

Last Updated: 2026-10-23 02:52 Views: 6

第9章 設定ファイル

wxreader のユーザーデータはすべて 1 つのディレクトリに集約されて おり、wxterm / wxeditor とは完全に分離しています:

プラットフォーム 設定ディレクトリ
Linux / FreeBSD ~/.wxreader/
macOS ~/Library/Application Support/wxreader/
Windows %APPDATA%\wxreader\

9.1 ファイル一覧

ファイル 用途
data.dat ライブラリの SQLite データベース(WAL モード):shelf / books / notes / mark の 4 テーブル
cover/{書籍id}.png 表紙キャッシュ(240×320)
settings.json すべての設定:options(テーマ/言語/UI フォント/テーマ切替/背景画像)+ editor(リーダースタイルの reader ノード)
logs/app_{日付}.log 実行ログ(日付ごとにローテーション。問題の調査時に参照)

9.2 data.dat のテーブル構造

テーブル フィールド
shelf id、name(一意)、added_time、sort_order(ドラッグ順)
books id、shelf_id(0=未分類)、title、path(一意、重複排除キー)、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

format の値:pdf / epub / mobi(azw3、prc を含む)/ md / txt / chm / img(漫画フォルダー)。

9.3 settings.json の構造

{
  "options": {
    "theme": "Tokyo Night",
    "lang": "ja",
    "themeFontFamily": "Noto Sans CJK JP",
    "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 進捗の意味

books.progress(1 起点)は形式ごとに意味が異なります:

format progress の意味
epub / mobi / md / txt 章番号
pdf ページ番号
img 再帰的な閲覧順の画像番号
chm 恒 1

read_seconds は累積読書秒数です(リーダーウィンドウが開いている間、 60 秒ごとに +60)。

← Previous Article 第8章 ショートカットとコマンドライン Next Article → 第10章 よくある問題

Comments

No comments yet