제9장 설정 파일

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

제9장 설정 파일

wxreader의 모든 사용자 데이터는 한 디렉터리에 모여 있으며, wxterm / wxeditor와 완전히 분리되어 있습니다:

플랫폼 설정 디렉터리
Linux / FreeBSD ~/.wxreader/
macOS ~/Library/Application Support/wxreader/
Windows %APPDATA%\wxreader\

9.1 파일 개요

파일 용도
data.dat 라이브러리 SQLite 데이터베이스(WAL 모드): shelf / books / notes / mark 네 테이블
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": "ko",
    "themeFontFamily": "Noto Sans CJK KR",
    "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