dlxj commited on
Commit ·
4e1096a
1
Parent(s): 98cbcde
init
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .dockerignoreAdded+31
- .editorconfigAdded+3
- .gitattributes+2
- .github/FUNDING.ymlAdded+15
- .github/ISSUE_TEMPLATE/feature-request.mdAdded+23
- .github/ISSUE_TEMPLATE/report-bug.mdAdded+35
- .github/dependabot.ymlAdded+13
- .github/workflows/pull-request.ymlAdded+93
- .github/workflows/release.ymlAdded+401
- .github/workflows/retry-workflow.ymlAdded+18
- .github/workflows/upload-to-r2.ymlAdded+77
- .github/workflows/vercel-merge.ymlAdded+23
- .gitignoreAdded+49
- .gitmodulesAdded+12
- .prettierignoreAdded+34
- .prettierrc.jsonAdded+10
- .vscode/extensions.jsonAdded+8
- .vscode/settings.jsonAdded+31
- CONTRIBUTING.mdAdded+104
- Cargo.lockAdded
- Cargo.tomlAdded+42
- DockerfileAdded+40
- LICENSEAdded+661
- README.mdAdded+362
- apps/readest-app/.envAdded+12
- apps/readest-app/.env.local.exampleAdded+32
- apps/readest-app/.env.tauriAdded+3
- apps/readest-app/.env.tauri.exampleAdded+2
- apps/readest-app/.env.webAdded+1
- apps/readest-app/.env.web.exampleAdded+3
- apps/readest-app/.gitignoreAdded+62
- apps/readest-app/components.jsonAdded+22
- apps/readest-app/eslint.config.mjsAdded+35
- apps/readest-app/extensions/windows-thumbnail/Cargo.lockAdded+588
- apps/readest-app/extensions/windows-thumbnail/Cargo.tomlAdded+31
- apps/readest-app/extensions/windows-thumbnail/README.mdAdded+134
- apps/readest-app/extensions/windows-thumbnail/src/com_provider.rsAdded+506
- apps/readest-app/extensions/windows-thumbnail/src/extraction.rsAdded+648
- apps/readest-app/extensions/windows-thumbnail/src/mod.rsAdded+13
- apps/readest-app/i18next-scanner.config.jsAdded+60
- apps/readest-app/next.config.mjsAdded+106
- apps/readest-app/open-next.config.tsAdded+6
- apps/readest-app/package.jsonAdded+198
- apps/readest-app/postcss.config.mjsAdded+9
- apps/readest-app/public/.well-known/apple-app-site-associationAdded+17
- apps/readest-app/public/.well-known/assetlinks.jsonAdded+16
- apps/readest-app/public/.well-known/org.flathub.VerifiedApps.txtAdded+1
- apps/readest-app/public/apple-touch-icon.pngAdded
- apps/readest-app/public/favicon.icoAdded
- apps/readest-app/public/fonts/InterVariable-Italic.woff2Added+3
12345678910111213141516171819202122232425262728293031# Dependenciesnode_modules**/node_modules
# Rust build artifactstarget**/target
# Git.git.gitignore
# Build outputs.next**/.nextout**/out
# IDE.idea.vscode*.swp
# OS files.DS_StoreThumbs.db
# Logs*.lognpm-debug.log*
123[*.{ts,tsx}]indent_style = spaceindent_size = 21234*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.avro filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text123456*.7z filter=lfs diff=lfs merge=lfs -text*.woff2 filter=lfs diff=lfs merge=lfs -text*.icns filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.avro filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text
123456789101112131415# These are supported funding model platforms
github: ['readest']patreon: # Replace with a single Patreon usernameopen_collective: # Replace with a single Open Collective usernameko_fi: # Replace with a single Ko-fi usernametidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babelcommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundryliberapay: # Replace with a single Liberapay usernameissuehunt: # Replace with a single IssueHunt usernamelfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundrypolar: # Replace with a single Polar usernamebuy_me_a_coffee: # Replace with a single Buy Me a Coffee usernamethanks_dev: # Replace with a single thanks.dev usernamecustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']1234567891011121314151617181920212223---name: Feature requestabout: Share an idea or suggestiontitle: 'FR: describing your feature request'labels: enhancementassignees: ''---
**Does your feature request involve difficulty for you to complete a task? Please describe.**
> A clear and concise description of what the problem is. Ex. I think it takes too many steps to [...]
**Describe the solution you'd like**
> A clear and concise description of what you'd like to happen.
**Describe alternatives you've considered**
> A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
> Add any additional context or screenshots about the feature request here.1234567891011121314151617181920212223242526272829303132333435---name: Report a bugabout: Report a bug or a functional regressiontitle: 'Example: In DarkMode, a blank square appears in bottom right corner while scrolling'labels: ['type: bug']assignees: ''---
## Bug Description
A clear and concise description of what the current behavior is.Please also add **screenshots** of the existing application.
> **Example:**> In DarkMode, when scrollbar are displayed (for example on Companies page, with enough companies in the list), we see a blank square in the bottom right corner> [screenshot]
## Expected behavior
A clear and concise description of what the expected behavior is.
> **Example:**> The blank square should be transparent (invisible)
## Technical inputs
Operating System:
Readest Version:
> **Example:**> Operating System: Android 14 (WebView 135.0)> Readest Version: 0.9.0> We are displaying custom scrollbars that disappear when the user is not scrolling. See ScrollWrapper.> Probably fixable with CSS12345678910111213# Keep GitHub Actions up to date with GitHub's Dependabot...# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystemversion: 2updates: - package-ecosystem: github-actions directory: / groups: github-actions: patterns: - '*' # Group all Actions updates into a single larger pull request schedule: interval: weekly123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293name: PR checkson: pull_request: branches: [main]permissions: contents: write pull-requests: writejobs: rust_lint: runs-on: ubuntu-latest env: RUSTFLAGS: '-C target-cpu=skylake' steps: - uses: actions/checkout@v6 with: submodules: 'true' - name: Install minimal stable with clippy and rustfmt uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable override: true components: rustfmt, clippy - name: Install system dependencies run: | sudo apt-get update sudo apt-get install -y pkg-config libfontconfig-dev libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libsoup-3.0-dev - name: Format working-directory: apps/readest-app/src-tauri run: cargo fmt --check - name: Clippy Check working-directory: apps/readest-app/src-tauri run: cargo clippy -p Readest --no-deps -- -D warnings
build_web_app: runs-on: ubuntu-latest strategy: matrix: config: - platform: 'web' - platform: 'tauri' steps: - uses: actions/checkout@v6 with: submodules: 'true'
- name: setup pnpm uses: pnpm/action-setup@v4
- name: setup node uses: actions/setup-node@v6 with: node-version: 22 cache: pnpm
- name: cache Next.js build uses: actions/cache@v5 with: path: apps/readest-app/.next/cache key: nextjs-${{ matrix.config.platform }}-${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }} restore-keys: | nextjs-${{ matrix.config.platform }}-${{ github.sha }}- nextjs-${{ matrix.config.platform }}-
- name: install Dependencies working-directory: apps/readest-app run: | pnpm install && pnpm setup-vendors
- name: run format check run: | pnpm format:check || (pnpm format && git diff && exit 1)
- name: run tests working-directory: apps/readest-app run: | pnpm test -- --watch=false
- name: run lint working-directory: apps/readest-app run: | pnpm lint
- name: build the web App if: matrix.config.platform == 'web' working-directory: apps/readest-app run: | pnpm build-web && pnpm check:all
- name: build the Tauri App if: matrix.config.platform == 'tauri' working-directory: apps/readest-app run: | pnpm build && pnpm check:all123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401name: Release Readest
on: workflow_dispatch: release: types: [published]
jobs: get-release: permissions: contents: write runs-on: ubuntu-latest outputs: release_id: ${{ steps.get-release.outputs.release_id }} release_tag: ${{ steps.get-release.outputs.release_tag }} release_note: ${{ steps.get-release-notes.outputs.release_note }} release_version: ${{ steps.get-release-notes.outputs.release_version }}
steps: - uses: actions/checkout@v6 - name: setup node uses: actions/setup-node@v6 - name: get version run: echo "PACKAGE_VERSION=$(node -p "require('./apps/readest-app/package.json').version")" >> $GITHUB_ENV - name: get release id: get-release uses: actions/github-script@v8 with: script: | const { data } = await github.rest.repos.getLatestRelease({ owner: context.repo.owner, repo: context.repo.repo, }) core.setOutput('release_id', data.id); core.setOutput('release_tag', data.tag_name); - name: get release notes id: get-release-notes uses: actions/github-script@v8 with: script: | const fs = require('fs'); const version = require('./apps/readest-app/package.json').version; const releaseNotesFileContent = fs.readFileSync('./apps/readest-app/release-notes.json', 'utf8'); const releaseNotes = JSON.parse(releaseNotesFileContent).releases[version] || {}; const notes = releaseNotes.notes || []; const releaseNote = notes.map((note, index) => `${index + 1}. ${note}`).join(' '); console.log('Formatted release note:', releaseNote); core.setOutput('release_version', version); core.setOutput('release_note', releaseNote);
update-release: permissions: contents: write runs-on: ubuntu-latest needs: get-release
steps: - name: update release id: update-release uses: actions/github-script@v8 env: release_id: ${{ needs.get-release.outputs.release_id }} release_tag: ${{ needs.get-release.outputs.release_tag }} release_note: ${{ needs.get-release.outputs.release_note }} with: script: | const { data } = await github.rest.repos.generateReleaseNotes({ owner: context.repo.owner, repo: context.repo.repo, tag_name: process.env.release_tag, }) const notes = process.env.release_note.split(/\d+\.\s/).filter(Boolean); const formattedNotes = notes.map(note => `* ${note.trim()}`).join("\n"); const body = `## Release Highlight\n${formattedNotes}\n\n${data.body}`; github.rest.repos.updateRelease({ owner: context.repo.owner, repo: context.repo.repo, release_id: process.env.release_id, body: body, draft: false, prerelease: false })
build-koreader-plugin: needs: get-release permissions: contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v6
- name: create KOReader plugin zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | version=${{ needs.get-release.outputs.release_version }} plugin_zip="Readest-${version}-1.koplugin.zip" meta_file="apps/readest.koplugin/_meta.lua" perl -i -pe "s/^}/ version = \"${version}\",\n}/" "${meta_file}"
cd apps zip -r ../${plugin_zip} readest.koplugin cd ..
echo "Uploading ${plugin_zip} to GitHub release" gh release upload ${{ needs.get-release.outputs.release_tag }} ${plugin_zip} --clobber
build-tauri: needs: get-release permissions: contents: write strategy: fail-fast: false matrix: config: - os: ubuntu-latest release: android rust_target: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android - os: ubuntu-22.04 release: linux arch: x86_64 rust_target: x86_64-unknown-linux-gnu - os: ubuntu-22.04-arm release: linux arch: aarch64 rust_target: aarch64-unknown-linux-gnu - os: ubuntu-22.04-arm release: linux arch: armhf rust_target: arm-unknown-linux-gnueabihf args: '--target arm-unknown-linux-gnueabihf --bundles deb' - os: macos-latest release: macos arch: aarch64 rust_target: x86_64-apple-darwin,aarch64-apple-darwin args: '--target universal-apple-darwin' - os: windows-latest release: windows arch: x86_64 rust_target: x86_64-pc-windows-msvc args: '--target x86_64-pc-windows-msvc --bundles nsis' - os: windows-latest release: windows arch: aarch64 rust_target: aarch64-pc-windows-msvc args: '--target aarch64-pc-windows-msvc --bundles nsis'
runs-on: ${{ matrix.config.os }} timeout-minutes: 60 steps: - uses: actions/checkout@v6
- name: initialize git submodules run: git submodule update --init --recursive
- name: setup pnpm uses: pnpm/action-setup@v4
- name: setup node uses: actions/setup-node@v6 with: node-version: 22 cache: pnpm
- name: setup Java (for Android build only) if: matrix.config.release == 'android' uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: '17'
- name: setup Android SDK (for Android build only) if: matrix.config.release == 'android' uses: android-actions/setup-android@v3
- name: install NDK (for Android build only) if: matrix.config.release == 'android' run: sdkmanager "ndk;28.2.13676358"
- name: install dependencies run: pnpm install
- name: copy pdfjs-dist and simplecc-dist to public directory run: pnpm --filter @readest/readest-app setup-vendors
- name: install Rust stable uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.config.rust_target }}
- uses: Swatinem/rust-cache@v2 with: key: ${{ matrix.config.os }}-${{ matrix.config.release }}-${{ matrix.config.arch }}-cargo
- name: install dependencies (ubuntu only) if: contains(matrix.config.os, 'ubuntu') && matrix.config.release != 'android' && matrix.config.arch != 'armhf' run: | sudo apt-get update sudo apt-get install -y pkg-config libfontconfig-dev libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils
- name: install dependencies (ubuntu only - armhf specific) if: contains(matrix.config.os, 'ubuntu') && matrix.config.arch == 'armhf' run: | sudo dpkg --add-architecture armhf sudo apt-get update sudo apt-get install -y pkg-config libfontconfig-dev:armhf libgtk-3-dev:armhf libwebkit2gtk-4.1-dev:armhf libappindicator3-dev:armhf librsvg2-dev:armhf gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf echo 'PKG_CONFIG_ALLOW_CROSS=1' >> $GITHUB_ENV echo 'PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig' >> $GITHUB_ENV echo 'PKG_CONFIG_SYSROOT_DIR=/usr/arm-linux-gnueabihf' >> $GITHUB_ENV echo 'CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc' >> $GITHUB_ENV
- name: create .env.local file for Next.js run: | echo "NEXT_PUBLIC_POSTHOG_KEY=${{ secrets.NEXT_PUBLIC_POSTHOG_KEY }}" >> .env.local echo "NEXT_PUBLIC_POSTHOG_HOST=${{ secrets.NEXT_PUBLIC_POSTHOG_HOST }}" >> .env.local echo "NEXT_PUBLIC_SUPABASE_URL=${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}" >> .env.local echo "NEXT_PUBLIC_SUPABASE_ANON_KEY=${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}" >> .env.local echo "NEXT_PUBLIC_APP_PLATFORM=tauri" >> .env.local cp .env.local apps/readest-app/.env.local
- name: build and upload Android apks if: matrix.config.release == 'android' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/28.2.13676358 TAURI_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} run: | cd apps/readest-app/ rm -rf src-tauri/gen/android pnpm tauri android init pnpm tauri icon ../../data/icons/readest-book.png git checkout .
pushd src-tauri/gen/android echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" > keystore.properties echo "password=${{ secrets.ANDROID_KEY_PASSWORD }}" >> keystore.properties base64 -d <<< "${{ secrets.ANDROID_KEY_BASE64 }}" > $RUNNER_TEMP/keystore.jks echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties
popd version=${{ needs.get-release.outputs.release_version }} apk_path=src-tauri/gen/android/app/build/outputs/apk/universal/release universial_apk=Readest_${version}_universal.apk arm64_apk=Readest_${version}_arm64.apk pnpm tauri android build cp ${apk_path}/app-universal-release.apk $universial_apk pnpm tauri android build -t aarch64 cp ${apk_path}/app-universal-release.apk $arm64_apk
echo "Uploading $universial_apk to GitHub release" gh release upload ${{ needs.get-release.outputs.release_tag }} $universial_apk --clobber echo "Uploading $arm64_apk to GitHub release" gh release upload ${{ needs.get-release.outputs.release_tag }} $arm64_apk --clobber echo "Uploading signatures to GitHub release" pnpm tauri signer sign $universial_apk pnpm tauri signer sign $arm64_apk gh release upload ${{ needs.get-release.outputs.release_tag }} $universial_apk.sig --clobber gh release upload ${{ needs.get-release.outputs.release_tag }} $arm64_apk.sig --clobber
- name: download and update latest.json for Android release if: matrix.config.release == 'android' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd apps/readest-app/ curl -sL https://github.com/readest/readest/releases/latest/download/latest.json -o latest.json
version=${{ needs.get-release.outputs.release_version }} universial_apk_url="https://github.com/readest/readest/releases/download/${{ needs.get-release.outputs.release_tag }}/Readest_${version}_universal.apk" arm64_apk_url="https://github.com/readest/readest/releases/download/${{ needs.get-release.outputs.release_tag }}/Readest_${version}_arm64.apk"
universial_sig=$(cat Readest_${version}_universal.apk.sig) arm64_sig=$(cat Readest_${version}_arm64.apk.sig)
jq --arg url "$universial_apk_url" \ --arg sig "$universial_sig" \ '.platforms["android-universal"] = {signature: $sig, url: $url}' latest.json > tmp.$$.json && mv tmp.$$.json latest.json
jq --arg url "$arm64_apk_url" \ --arg sig "$arm64_sig" \ '.platforms["android-arm64"] = {signature: $sig, url: $url}' latest.json > tmp.$$.json && mv tmp.$$.json latest.json
echo "Uploading updated latest.json to GitHub release" gh release upload ${{ needs.get-release.outputs.release_tag }} latest.json --clobber
- name: Override tauri-cli with custom AppImage format (Linux) if: matrix.config.release == 'linux' run: cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch feat/truly-portable-appimage --force
- uses: tauri-apps/tauri-action@v0 if: matrix.config.release != 'android' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_BUNDLER_NEW_APPIMAGE_FORMAT: 'true' TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} NODE_OPTIONS: '--max-old-space-size=8192' with: projectPath: apps/readest-app releaseId: ${{ needs.get-release.outputs.release_id }} releaseBody: ${{ needs.get-release.outputs.release_note }} args: ${{ matrix.config.args || '' }}
- name: upload release notes to GitHub release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | echo "Uploading release notes to GitHub release" gh release upload ${{ needs.get-release.outputs.release_tag }} apps/readest-app/release-notes.json --clobber
- name: build and upload portable binaries (Windows only) if: matrix.config.os == 'windows-latest' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} shell: bash run: | echo "Building Portable Binaries" pushd apps/readest-app/ echo "NEXT_PUBLIC_PORTABLE_APP=true" >> .env.local pnpm tauri build ${{ matrix.config.args }}
popd echo "Uploading Portable Binaries" arch=${{ matrix.config.arch }} version=${{ needs.get-release.outputs.release_version }}
if [ "$arch" = "x86_64" ]; then bin_file="Readest_${version}_x64-portable.exe" elif [ "$arch" = "aarch64" ]; then bin_file="Readest_${version}_arm64-portable.exe" else echo "Unknown architecture: $arch" exit 1 fi
exe_file="target/${{ matrix.config.rust_target }}/release/readest.exe" # Browsers on Windows won't download zip files that contain exe files # so upload the exe files instead. This is totally stupid. # powershell.exe -Command "Compress-Archive -Path $exe_file -DestinationPath $bin_file -Force" cp $exe_file $bin_file
echo "Uploading $bin_file to GitHub release" gh release upload ${{ needs.get-release.outputs.release_tag }} $bin_file --clobber
echo "Signing portable binary" pushd apps/readest-app/ pnpm tauri signer sign "../../$bin_file" popd echo "Uploading signature to GitHub release" gh release upload ${{ needs.get-release.outputs.release_tag }} $bin_file.sig --clobber
- name: download and update latest.json for Windows portable release if: matrix.config.os == 'windows-latest' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash run: | curl -sL https://github.com/readest/readest/releases/latest/download/latest.json -o latest.json
version=${{ needs.get-release.outputs.release_version }} arch=${{ matrix.config.arch }}
if [ "$arch" = "x86_64" ]; then bin_file="Readest_${version}_x64-portable.exe" platform_key="windows-x86_64-portable" elif [ "$arch" = "aarch64" ]; then bin_file="Readest_${version}_arm64-portable.exe" platform_key="windows-aarch64-portable" else echo "Unknown architecture: $arch" exit 1 fi
portable_url="https://github.com/readest/readest/releases/download/${{ needs.get-release.outputs.release_tag }}/$bin_file" portable_sig=$(cat $bin_file.sig)
jq --arg url "$portable_url" \ --arg sig "$portable_sig" \ --arg key "$platform_key" \ '.platforms[$key] = {signature: $sig, url: $url}' latest.json > tmp.$$.json && mv tmp.$$.json latest.json
echo "Uploading updated latest.json to GitHub release" gh release upload ${{ needs.get-release.outputs.release_tag }} latest.json --clobber
upload-to-r2: needs: [get-release, build-tauri] uses: ./.github/workflows/upload-to-r2.yml with: tag: ${{ needs.get-release.outputs.release_tag }} secrets: inherit123456789101112131415161718name: Retry workflow
on: workflow_dispatch: inputs: run_id: required: truejobs: rerun: runs-on: ubuntu-latest steps: - name: rerun ${{ inputs.run_id }} env: GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ github.token }} run: | gh run watch ${{ inputs.run_id }} > /dev/null 2>&1 gh run rerun ${{ inputs.run_id }} --failed1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677name: Upload Release Assets to R2
on: workflow_call: inputs: tag: required: true type: string
workflow_dispatch: inputs: tag: description: 'Release tag name (e.g., v1.2.3)' required: true type: string
jobs: upload-to-r2: runs-on: ubuntu-latest timeout-minutes: 3 strategy: fail-fast: false env: RELEASE_R2_BUCKET: readest-releases RELEASE_R2_ACCOUNT_ID: ${{ secrets.RELEASE_R2_ACCOUNT_ID }} RELEASE_R2_ACCESS_KEY_ID: ${{ secrets.RELEASE_R2_ACCESS_KEY_ID }} RELEASE_R2_SECRET_ACCESS_KEY: ${{ secrets.RELEASE_R2_SECRET_ACCESS_KEY }}
steps: - name: Download release assets run: | gh release download "${{ inputs.tag }}" --repo readest/readest --dir ./release-assets env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install rclone run: curl https://rclone.org/install.sh | sudo bash
- name: Configure rclone run: | mkdir -p ~/.config/rclone cat > ~/.config/rclone/rclone.conf <<EOF [r2] type = s3 provider = Cloudflare access_key_id = $RELEASE_R2_ACCESS_KEY_ID secret_access_key = $RELEASE_R2_SECRET_ACCESS_KEY endpoint = https://${RELEASE_R2_ACCOUNT_ID}.r2.cloudflarestorage.com EOF
- name: Modify latest.json download URLs run: | GITHUB_BASE_URL="https://github.com/readest/readest/releases/download" READEST_BASE_URL="https://download.readest.com/releases" sed -i "s#${GITHUB_BASE_URL}#${READEST_BASE_URL}#g" ./release-assets/latest.json
- name: Upload to R2 run: | mkdir releases mv ./release-assets/latest.json releases mv ./release-assets/release-notes.json releases rclone copy ./release-assets r2:${RELEASE_R2_BUCKET}/releases/${{ inputs.tag }}/ rclone copy ./releases r2:${RELEASE_R2_BUCKET}/releases/
- name: Upload successful if: success() run: echo "Upload completed successfully"
retry-on-failure: if: failure() && fromJSON(github.run_attempt) < 3 needs: [upload-to-r2] runs-on: ubuntu-latest steps: - env: GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ github.token }} run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}1234567891011121314151617181920212223name: Deploy to vercel on mergeon: push: branches: - mainpermissions: contents: write deployments: write pull-requests: writejobs: build_and_deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: submodules: 'true' - uses: amondnet/vercel-action@v25 with: vercel-token: ${{ secrets.VERCEL_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }} vercel-args: '--prod' vercel-org-id: ${{ secrets.ORG_ID}} vercel-project-id: ${{ secrets.PROJECT_ID}}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.docker/.env
# dependencies/node_modules/.pnp.pnp.js.yarn/install-state.gz
# testing/coverage
# next.js/.next//out/
# production/build
# misc.DS_Store*.pem/certs
# debugnpm-debug.log*yarn-debug.log*yarn-error.log*
# local env files.env*.local
# vercel.vercel
# typescript*.tsbuildinfonext-env.d.ts
# Rust buildtarget
fastlane/report.xml
*.koplugin.zip
# nixresult*.playwright-mcp/123456789101112[submodule "packages/foliate-js"] path = packages/foliate-js url = https://github.com/readest/foliate-js.git[submodule "packages/tauri"] path = packages/tauri url = https://github.com/readest/tauri.git[submodule "packages/tauri-plugins"] path = packages/tauri-plugins url = https://github.com/readest/tauri-plugins-workspace.git[submodule "packages/simplecc-wasm"] path = packages/simplecc-wasm url = https://github.com/readest/simplecc-wasm.git12345678910111213141516171819202122232425262728293031323334# Dependenciesnode_modulespnpm-lock.yaml
# Build Artifacts (Web & Rust).next.open-next.build.taurioutbuilddisttargetfastlane.wrangler
# Autogenerated Tauri filesgen**/autogenerated**/schemas
# Submodules (External Repos)packages
# Vendored Assets (Generated/External Code)apps/readest-app/public/*.jsapps/readest-app/public/vendor
# Environment & Editor.env.env.*.vscode.idea*.log12345678910{ "trailingComma": "all", "printWidth": 100, "semi": true, "tabWidth": 2, "singleQuote": true, "jsxSingleQuote": true, "endOfLine": "lf", "plugins": ["prettier-plugin-tailwindcss"]}12345678{ "recommendations": [ "ms-vscode.vscode-typescript-next", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "rust-lang.rust-analyzer" ]}12345678910111213141516171819202122232425262728293031{ "typescript.tsdk": "node_modules/typescript/lib", "rust-analyzer.linkedProjects": [ "packages/tauri/Cargo.toml", "apps/readest-app/src-tauri/Cargo.toml" ], // "editor.formatOnSave": true, // uncomment to add format on save "typescript.inlayHints.parameterNames.enabled": "all", "typescript.inlayHints.variableTypes.enabled": true, "typescript.inlayHints.propertyDeclarationTypes.enabled": true, "typescript.inlayHints.functionLikeReturnTypes.enabled": true, "typescript.inlayHints.enumMemberValues.enabled": true, "javascript.validate.enable": false, "javascript.format.enable": false, "typescript.format.enable": false, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }, "[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "prettier.requireConfig": true, "prettier.documentSelectors": ["**/*.{js,jsx,ts,tsx,css,json,md,html,yml}"]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104# Contribution Guidelines
When contributing to `Readest`, whether on GitHub or in other community spaces:
- Be respectful, civil, and open-minded.- Before opening a new pull request, try searching through the [issue tracker](https://github.com/readest/readest/issues) for known issues or fixes.- If you want to make code changes based on your personal opinion(s), make sure you open an issue first describing the changes you want to make, and open a pull request only when your suggestions get approved by maintainers.
## How to Contribute
### Prerequisites
In order to not waste your time implementing a change that has already been declined, or is generally not needed, start by [opening an issue](https://github.com/readest/readest/issues/new/choose) describing the problem you would like to solve.
For the best experience to build Readest for yourself, use a recent version of Node.js and Rust. Refer to the [Tauri documentation](https://v2.tauri.app/start/prerequisites/) for details on setting up the development environment prerequisites on different platforms.
Basically you need to install or update the following development tools:
- **Node.js** and **pnpm** for Next.js development- **Rust** and **Cargo** for Tauri development
```bashnvm install v22nvm use v22npm install -g pnpmrustup update```
### Getting Started
To get started with Readest, follow these steps to clone and build the project.
#### 1. Clone the Repository
```bashgit clone https://github.com/readest/readest.gitcd readestgit submodule update --init --recursive```
#### 2. Install Dependencies
```bash# might need to rerun this when code is updatedpnpm install# copy vendors dist libs to public directorypnpm --filter @readest/readest-app setup-vendors```
#### 3. Verify Dependencies Installation
To confirm that all dependencies are correctly installed, run the following command:
```bashpnpm tauri info```
This command will display information about the installed Tauri dependencies and configuration on your platform. Note that the output may vary depending on the operating system and environment setup. Please review the output specific to your platform for any potential issues.
For Windows targets, “Build Tools for Visual Studio 2022” (or a higher edition of Visual Studio) and the “Desktop development with C++” workflow must be installed. For Windows ARM64 targets, the “VS 2022 C++ ARM64 build tools” and "C++ Clang Compiler for Windows" components must be installed. And make sure `clang` can be found in the path by adding `C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\x64\bin` for example in the environment variable `Path`.
#### 4. Build for Development
```bashpnpm tauri dev```
#### 5. Build for Production
```bashpnpm tauri build```
Now you're all setup and can start implementing your changes.
### Implement your changes
This project is a monorepo. The code for the `readest-app` is in the `apps/readest-app` directory. Here are some useful scripts for developing the frontend only without compiling Tauri:
| Command | Description || ---------------- | -------------------------------------------------- || `pnpm dev-web` | Starts the development server for the web app only || `pnpm build-web` | Builds the web app |
Recommended Visual Studio Code plugins for development:
- JavaScript and TypeScript Nightly (ms-vscode.vscode-typescript-next)- VS Code ESLint extension (dbaeumer.vscode-eslint)- Prettier - Code formatter (esbenp.prettier-vscode)- rust-analyzer (rust-lang.rust-analyzer) (for Tauri development only)
### When you're done
Check that your code follows the project's style guidelines by running:
```bashpnpm build```
Please also make a manual, functional test of your changes. When all that's done, it's time to file a pull request to upstream and fill out the title and body appropriately.
## Credits
This documented was inspired by the contributing guidelines for [cloudflare/wrangler2](https://github.com/cloudflare/wrangler2/blob/main/CONTRIBUTING.md).123456789101112131415161718192021222324252627282930313233343536373839404142[workspace]members = [ "apps/readest-app/src-tauri", "packages/tauri/crates/tauri", "packages/tauri/crates/tauri-utils", "packages/tauri/crates/tauri-build", "packages/tauri-plugins/plugins/deep-link", "packages/tauri-plugins/plugins/single-instance"]resolver = "2"
[workspace.dependencies]serde = { version = "1", features = ["derive"] }tracing = "0.1"log = "0.4"tauri = { version = "2", default-features = false }tauri-build = "2"tauri-plugin = "2"tauri-utils = "2"schemars = "0.8"serde_json = "1"thiserror = "2"glob = "0.3"zbus = "5.9"dunce = "1"url = "2"
[workspace.package]authors = ["Bilingify LLC"]homepage = "https://readest.com"license = "AGPL-3.0"repository = "https://github.com/readest/readest"categories = []edition = "2021"rust-version = "1.77.2"
[patch.crates-io]tauri = { path = "packages/tauri/crates/tauri" }tauri-utils = { path = "packages/tauri/crates/tauri-utils" }tauri-build = { path = "packages/tauri/crates/tauri-build" }tauri-plugin-deep-link = { path = "packages/tauri-plugins/plugins/deep-link" }tauri-plugin-single-instance = { path = "packages/tauri-plugins/plugins/single-instance" }12345678910111213141516171819202122232425262728293031323334353637383940FROM docker.io/node:22-slim AS baseENV PNPM_HOME="/pnpm"ENV PATH="$PNPM_HOME:$PATH"RUN corepack enableRUN corepack prepare pnpm@10.29.3 --activateWORKDIR /appCOPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./COPY apps/readest-app/package.json ./apps/readest-app/COPY patches/ ./patches/COPY packages/ ./packages/
FROM base AS dependenciesRUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfileRUN pnpm --filter @readest/readest-app setup-vendors
FROM dependencies AS development-stageCOPY . .WORKDIR /app/apps/readest-appEXPOSE 3000ENTRYPOINT ["pnpm", "dev-web", "-H", "0.0.0.0"]
FROM base AS buildARG NEXT_PUBLIC_SUPABASE_URLARG NEXT_PUBLIC_SUPABASE_ANON_KEYARG NEXT_PUBLIC_APP_PLATFORMARG NEXT_PUBLIC_API_BASE_URLARG NEXT_PUBLIC_OBJECT_STORAGE_TYPEARG NEXT_PUBLIC_STORAGE_FIXED_QUOTAARG NEXT_PUBLIC_TRANSLATION_FIXED_QUOTACOPY --from=dependencies /app/node_modules /app/node_modulesCOPY --from=dependencies /app/apps/readest-app/node_modules /app/apps/readest-app/node_modulesCOPY --from=dependencies /app/apps/readest-app/public/vendor /app/apps/readest-app/public/vendorCOPY --from=dependencies /app/packages/foliate-js/node_modules /app/packages/foliate-js/node_modulesCOPY . .WORKDIR /app/apps/readest-appRUN pnpm build-web
FROM build as production-stageENTRYPOINT ["pnpm", "start-web", "-H", "0.0.0.0"]EXPOSE 3000123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661 GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license forsoftware and other kinds of works, specifically designed to ensurecooperation with the community in the case of network server software.
The licenses for most software and other practical works are designedto take away your freedom to share and change the works. By contrast,our General Public Licenses are intended to guarantee your freedom toshare and change all versions of a program--to make sure it remains freesoftware for all its users.
When we speak of free software, we are referring to freedom, notprice. Our General Public Licenses are designed to make sure that youhave the freedom to distribute copies of free software (and charge forthem if you wish), that you receive source code or can get it if youwant it, that you can change the software or use pieces of it in newfree programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rightswith two steps: (1) assert copyright on the software, and (2) offeryou this License which gives you legal permission to copy, distributeand/or modify the software.
A secondary benefit of defending all users' freedom is thatimprovements made in alternate versions of the program, if theyreceive widespread use, become available for other developers toincorporate. Many developers of free software are heartened andencouraged by the resulting cooperation. However, in the case ofsoftware used on network servers, this result may fail to come about.The GNU General Public License permits making a modified version andletting the public access it on a server without ever releasing itssource code to the public.
The GNU Affero General Public License is designed specifically toensure that, in such cases, the modified source code becomes availableto the community. It requires the operator of a network server toprovide the source code of the modified version running there to theusers of that server. Therefore, public use of a modified version, ona publicly accessible server, gives the public access to the sourcecode of the modified version.
An older license, called the Affero General Public License andpublished by Affero, was designed to accomplish similar goals. This isa different license, not a version of the Affero GPL, but Affero hasreleased a new version of the Affero GPL which permits relicensing underthis license.
The precise terms and conditions for copying, distribution andmodification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds ofworks, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under thisLicense. Each licensee is addressed as "you". "Licensees" and"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the workin a fashion requiring copyright permission, other than the making of anexact copy. The resulting work is called a "modified version" of theearlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work basedon the Program.
To "propagate" a work means to do anything with it that, withoutpermission, would make you directly or secondarily liable forinfringement under applicable copyright law, except executing it on acomputer or modifying a private copy. Propagation includes copying,distribution (with or without modification), making available to thepublic, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables otherparties to make or receive copies. Mere interaction with a user througha computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"to the extent that it includes a convenient and prominently visiblefeature that (1) displays an appropriate copyright notice, and (2)tells the user that there is no warranty for the work (except to theextent that warranties are provided), that licensees may convey thework under this License, and how to view a copy of this License. Ifthe interface presents a list of user commands or options, such as amenu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the workfor making modifications to it. "Object code" means any non-sourceform of a work.
A "Standard Interface" means an interface that either is an officialstandard defined by a recognized standards body, or, in the case ofinterfaces specified for a particular programming language, one thatis widely used among developers working in that language.
The "System Libraries" of an executable work include anything, otherthan the work as a whole, that (a) is included in the normal form ofpackaging a Major Component, but which is not part of that MajorComponent, and (b) serves only to enable use of the work with thatMajor Component, or to implement a Standard Interface for which animplementation is available to the public in source code form. A"Major Component", in this context, means a major essential component(kernel, window system, and so on) of the specific operating system(if any) on which the executable work runs, or a compiler used toproduce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means allthe source code needed to generate, install, and (for an executablework) run the object code and to modify the work, including scripts tocontrol those activities. However, it does not include the work'sSystem Libraries, or general-purpose tools or generally available freeprograms which are used unmodified in performing those activities butwhich are not part of the work. For example, Corresponding Sourceincludes interface definition files associated with source files forthe work, and the source code for shared libraries and dynamicallylinked subprograms that the work is specifically designed to require,such as by intimate data communication or control flow between thosesubprograms and other parts of the work.
The Corresponding Source need not include anything that userscan regenerate automatically from other parts of the CorrespondingSource.
The Corresponding Source for a work in source code form is thatsame work.
2. Basic Permissions.
All rights granted under this License are granted for the term ofcopyright on the Program, and are irrevocable provided the statedconditions are met. This License explicitly affirms your unlimitedpermission to run the unmodified Program. The output from running acovered work is covered by this License only if the output, given itscontent, constitutes a covered work. This License acknowledges yourrights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do notconvey, without conditions so long as your license otherwise remainsin force. You may convey covered works to others for the sole purposeof having them make modifications exclusively for you, or provide youwith facilities for running those works, provided that you comply withthe terms of this License in conveying all material for which you donot control copyright. Those thus making or running the covered worksfor you must do so exclusively on your behalf, under your directionand control, on terms that prohibit them from making any copies ofyour copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely underthe conditions stated below. Sublicensing is not allowed; section 10makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technologicalmeasure under any applicable law fulfilling obligations under article11 of the WIPO copyright treaty adopted on 20 December 1996, orsimilar laws prohibiting or restricting circumvention of suchmeasures.
When you convey a covered work, you waive any legal power to forbidcircumvention of technological measures to the extent such circumventionis effected by exercising rights under this License with respect tothe covered work, and you disclaim any intention to limit operation ormodification of the work as a means of enforcing, against the work'susers, your or third parties' legal rights to forbid circumvention oftechnological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as youreceive it, in any medium, provided that you conspicuously andappropriately publish on each copy an appropriate copyright notice;keep intact all notices stating that this License and anynon-permissive terms added in accord with section 7 apply to the code;keep intact all notices of the absence of any warranty; and give allrecipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications toproduce it from the Program, in the form of source code under theterms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independentworks, which are not by their nature extensions of the covered work,and which are not combined with it such as to form a larger program,in or on a volume of a storage or distribution medium, is called an"aggregate" if the compilation and its resulting copyright are notused to limit the access or legal rights of the compilation's usersbeyond what the individual works permit. Inclusion of a covered workin an aggregate does not cause this License to apply to the otherparts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the termsof sections 4 and 5, provided that you also convey themachine-readable Corresponding Source under the terms of this License,in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excludedfrom the Corresponding Source as a System Library, need not beincluded in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means anytangible personal property which is normally used for personal, family,or household purposes, or (2) anything designed or sold for incorporationinto a dwelling. In determining whether a product is a consumer product,doubtful cases shall be resolved in favor of coverage. For a particularproduct received by a particular user, "normally used" refers to atypical or common use of that class of product, regardless of the statusof the particular user or of the way in which the particular useractually uses, or expects or is expected to use, the product. A productis a consumer product regardless of whether the product has substantialcommercial, industrial or non-consumer uses, unless such uses representthe only significant mode of use of the product.
"Installation Information" for a User Product means any methods,procedures, authorization keys, or other information required to installand execute modified versions of a covered work in that User Product froma modified version of its Corresponding Source. The information mustsuffice to ensure that the continued functioning of the modified objectcode is in no case prevented or interfered with solely becausemodification has been made.
If you convey an object code work under this section in, or with, orspecifically for use in, a User Product, and the conveying occurs aspart of a transaction in which the right of possession and use of theUser Product is transferred to the recipient in perpetuity or for afixed term (regardless of how the transaction is characterized), theCorresponding Source conveyed under this section must be accompaniedby the Installation Information. But this requirement does not applyif neither you nor any third party retains the ability to installmodified object code on the User Product (for example, the work hasbeen installed in ROM).
The requirement to provide Installation Information does not include arequirement to continue to provide support service, warranty, or updatesfor a work that has been modified or installed by the recipient, or forthe User Product in which it has been modified or installed. Access to anetwork may be denied when the modification itself materially andadversely affects the operation of the network or violates the rules andprotocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,in accord with this section must be in a format that is publiclydocumented (and with an implementation available to the public insource code form), and must require no special password or key forunpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of thisLicense by making exceptions from one or more of its conditions.Additional permissions that are applicable to the entire Program shallbe treated as though they were included in this License, to the extentthat they are valid under applicable law. If additional permissionsapply only to part of the Program, that part may be used separatelyunder those permissions, but the entire Program remains governed bythis License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your optionremove any additional permissions from that copy, or from any part ofit. (Additional permissions may be written to require their ownremoval in certain cases when you modify the work.) You may placeadditional permissions on material, added by you to a covered work,for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material youadd to a covered work, you may (if authorized by the copyright holders ofthat material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "furtherrestrictions" within the meaning of section 10. If the Program as youreceived it, or any part of it, contains a notice stating that it isgoverned by this License along with a term that is a furtherrestriction, you may remove that term. If a license document containsa further restriction but permits relicensing or conveying under thisLicense, you may add to a covered work material governed by the termsof that license document, provided that the further restriction doesnot survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, youmust place, in the relevant source files, a statement of theadditional terms that apply to those files, or a notice indicatingwhere to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in theform of a separately written license, or stated as exceptions;the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expresslyprovided under this License. Any attempt otherwise to propagate ormodify it is void, and will automatically terminate your rights underthis License (including any patent licenses granted under the thirdparagraph of section 11).
However, if you cease all violation of this License, then yourlicense from a particular copyright holder is reinstated (a)provisionally, unless and until the copyright holder explicitly andfinally terminates your license, and (b) permanently, if the copyrightholder fails to notify you of the violation by some reasonable meansprior to 60 days after the cessation.
Moreover, your license from a particular copyright holder isreinstated permanently if the copyright holder notifies you of theviolation by some reasonable means, this is the first time you havereceived notice of violation of this License (for any work) from thatcopyright holder, and you cure the violation prior to 30 days afteryour receipt of the notice.
Termination of your rights under this section does not terminate thelicenses of parties who have received copies or rights from you underthis License. If your rights have been terminated and not permanentlyreinstated, you do not qualify to receive new licenses for the samematerial under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive orrun a copy of the Program. Ancillary propagation of a covered workoccurring solely as a consequence of using peer-to-peer transmissionto receive a copy likewise does not require acceptance. However,nothing other than this License grants you permission to propagate ormodify any covered work. These actions infringe copyright if you donot accept this License. Therefore, by modifying or propagating acovered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automaticallyreceives a license from the original licensors, to run, modify andpropagate that work, subject to this License. You are not responsiblefor enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of anorganization, or substantially all assets of one, or subdividing anorganization, or merging organizations. If propagation of a coveredwork results from an entity transaction, each party to thattransaction who receives a copy of the work also receives whateverlicenses to the work the party's predecessor in interest had or couldgive under the previous paragraph, plus a right to possession of theCorresponding Source of the work from the predecessor in interest, ifthe predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of therights granted or affirmed under this License. For example, you maynot impose a license fee, royalty, or other charge for exercise ofrights granted under this License, and you may not initiate litigation(including a cross-claim or counterclaim in a lawsuit) alleging thatany patent claim is infringed by making, using, selling, offering forsale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under thisLicense of the Program or a work on which the Program is based. Thework thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claimsowned or controlled by the contributor, whether already acquired orhereafter acquired, that would be infringed by some manner, permittedby this License, of making, using, or selling its contributor version,but do not include claims that would be infringed only as aconsequence of further modification of the contributor version. Forpurposes of this definition, "control" includes the right to grantpatent sublicenses in a manner consistent with the requirements ofthis License.
Each contributor grants you a non-exclusive, worldwide, royalty-freepatent license under the contributor's essential patent claims, tomake, use, sell, offer for sale, import and otherwise run, modify andpropagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any expressagreement or commitment, however denominated, not to enforce a patent(such as an express permission to practice a patent or covenant not tosue for patent infringement). To "grant" such a patent license to aparty means to make such an agreement or commitment not to enforce apatent against the party.
If you convey a covered work, knowingly relying on a patent license,and the Corresponding Source of the work is not available for anyoneto copy, free of charge and under the terms of this License, through apublicly available network server or other readily accessible means,then you must either (1) cause the Corresponding Source to be soavailable, or (2) arrange to deprive yourself of the benefit of thepatent license for this particular work, or (3) arrange, in a mannerconsistent with the requirements of this License, to extend the patentlicense to downstream recipients. "Knowingly relying" means you haveactual knowledge that, but for the patent license, your conveying thecovered work in a country, or your recipient's use of the covered workin a country, would infringe one or more identifiable patents in thatcountry that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction orarrangement, you convey, or propagate by procuring conveyance of, acovered work, and grant a patent license to some of the partiesreceiving the covered work authorizing them to use, propagate, modifyor convey a specific copy of the covered work, then the patent licenseyou grant is automatically extended to all recipients of the coveredwork and works based on it.
A patent license is "discriminatory" if it does not include withinthe scope of its coverage, prohibits the exercise of, or isconditioned on the non-exercise of one or more of the rights that arespecifically granted under this License. You may not convey a coveredwork if you are a party to an arrangement with a third party that isin the business of distributing software, under which you make paymentto the third party based on the extent of your activity of conveyingthe work, and under which the third party grants, to any of theparties who would receive the covered work from you, a discriminatorypatent license (a) in connection with copies of the covered workconveyed by you (or copies made from those copies), or (b) primarilyfor and in connection with specific products or compilations thatcontain the covered work, unless you entered into that arrangement,or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limitingany implied license or other defenses to infringement that mayotherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement orotherwise) that contradict the conditions of this License, they do notexcuse you from the conditions of this License. If you cannot convey acovered work so as to satisfy simultaneously your obligations under thisLicense and any other pertinent obligations, then as a consequence you maynot convey it at all. For example, if you agree to terms that obligate youto collect a royalty for further conveying from those to whom you conveythe Program, the only way you could satisfy both those terms and thisLicense would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify theProgram, your modified version must prominently offer all usersinteracting with it remotely through a computer network (if your versionsupports such interaction) an opportunity to receive the CorrespondingSource of your version by providing access to the Corresponding Sourcefrom a network server at no charge, through some standard or customarymeans of facilitating copying of software. This Corresponding Sourceshall include the Corresponding Source for any work covered by version 3of the GNU General Public License that is incorporated pursuant to thefollowing paragraph.
Notwithstanding any other provision of this License, you havepermission to link or combine any covered work with a work licensedunder version 3 of the GNU General Public License into a singlecombined work, and to convey the resulting work. The terms of thisLicense will continue to apply to the part which is the covered work,but the work with which it is combined will remain governed by version3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions ofthe GNU Affero General Public License from time to time. Such new versionswill be similar in spirit to the present version, but may differ in detail toaddress new problems or concerns.
Each version is given a distinguishing version number. If theProgram specifies that a certain numbered version of the GNU Affero GeneralPublic License "or any later version" applies to it, you have theoption of following the terms and conditions either of that numberedversion or of any later version published by the Free SoftwareFoundation. If the Program does not specify a version number of theGNU Affero General Public License, you may choose any version ever publishedby the Free Software Foundation.
If the Program specifies that a proxy can decide which futureversions of the GNU Affero General Public License can be used, that proxy'spublic statement of acceptance of a version permanently authorizes youto choose that version for the Program.
Later license versions may give you additional or differentpermissions. However, no additional obligations are imposed on anyauthor or copyright holder as a result of your choosing to follow alater version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BYAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHTHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTYOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAMIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OFALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITINGWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYSTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANYGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THEUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OFDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRDPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OFSUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability providedabove cannot be given local legal effect according to their terms,reviewing courts shall apply local law that most closely approximatesan absolute waiver of all civil liability in connection with theProgram, unless a warranty or assumption of liability accompanies acopy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatestpossible use to the public, the best way to achieve this is to make itfree software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safestto attach them to the start of each source file to most effectivelystate the exclusion of warranty; and each file should have at leastthe "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computernetwork, you should also make sure that it provides a way for users toget its source. For example, if your program is a web application, itsinterface could display a "Source" link that leads users to an archiveof the code. There are many ways you could offer source, and differentsolutions will be better for different programs; see section 13 for thespecific requirements.
You should also get your employer (if you work as a programmer) or school,if any, to sign a "copyright disclaimer" for the program, if necessary.For more information on this, and how to apply and follow the GNU AGPL, see<http://www.gnu.org/licenses/>.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362<div align="center"> <a href="https://readest.com?utm_source=github&utm_medium=referral&utm_campaign=readme" target="_blank"> <img src="https://github.com/readest/readest/blob/main/apps/readest-app/src-tauri/icons/icon.png?raw=true" alt="Readest Logo" width="20%" /> </a> <h1>Readest</h1> <br>
[Readest][link-website] is an open-source ebook reader designed for immersive and deep reading experiences. Built as a modern rewrite of [Foliate](https://github.com/johnfactotum/foliate), it leverages [Next.js 16](https://github.com/vercel/next.js) and [Tauri v2](https://github.com/tauri-apps/tauri) to deliver a smooth, cross-platform experience across macOS, Windows, Linux, Android, iOS, and the Web.
[![Website][badge-website]][link-website][![Web App][badge-web-app]][link-web-readest][![OS][badge-platforms]][link-website]<br>[![Discord][badge-discord]][link-discord][![Reddit][badge-reddit]][link-reddit][![AGPL Licence][badge-license]](LICENSE)[![Language Coverage][badge-language-coverage]][link-locales][![Donate][badge-donate]][link-donate][![Latest release][badge-release]][link-gh-releases][![Last commit][badge-last-commit]][link-gh-commits][![Commits][badge-commit-activity]][link-gh-pulse][![][badge-hellogithub]][link-hellogithub][![Ask DeepWiki][badge-deepwiki]][link-deepwiki]
</div>
<p align="center"> <a href="#features">Features</a> • <a href="#planned-features">Planned Features</a> • <a href="#screenshots">Screenshots</a> • <a href="#downloads">Downloads</a> • <a href="#getting-started">Getting Started</a> • <a href="#troubleshooting">Troubleshooting</a> • <a href="#support">Support</a> • <a href="#license">License</a></p>
<div align="center"> <a href="https://readest.com" target="_blank"> <img src="./data/screenshots/landing_all_platforms.png" alt="Readest Banner" width="100%" /> </a></div>
## Features
<div align="left">✅ Implemented</div>
| **Feature** | **Description** | **Status** || --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------- || **Multi-Format Support** | Support EPUB, MOBI, KF8 (AZW3), FB2, CBZ, TXT, PDF (experimental) | ✅ || **Scroll/Page View Modes** | Switch between scrolling or paginated reading modes. | ✅ || **Full-Text Search** | Search across the entire book to find relevant sections. | ✅ || **Annotations and Highlighting** | Add highlights, bookmarks, and notes to enhance your reading experience and use instant mode for quicker interactions. | ✅ || **Dictionary/Wikipedia Lookup** | Instantly look up words and terms when reading. | ✅ || **[Parallel Read][link-parallel-read]** | Read two books or documents simultaneously in a split-screen view. | ✅ || **Customize Font and Layout** | Adjust font, layout, theme mode, and theme colors for a personalized experience. | ✅ || **Code Syntax Highlighting** | Read software manuals with rich coloring of code examples. | ✅ || **File Association and Open With** | Quickly open files in Readest in your file browser with one-click. | ✅ || **Library Management** | Organize, sort, and manage your entire ebook library. | ✅ || **OPDS/Calibre Integration** | Integrate OPDS/Calibre to access online libraries and catalogs. | ✅ || **Translate with DeepL and Yandex** | From a single sentence to the entire book—translate instantly. | ✅ || **Text-to-Speech (TTS) Support** | Enjoy smooth, multilingual narration—even within a single book. | ✅ || **Sync across Platforms** | Synchronize book files, reading progress, notes, and bookmarks across all supported platforms. | ✅ || **Accessibility** | Provides full keyboard navigation and supports for screen readers such as VoiceOver, TalkBack, NVDA, and Orca. | ✅ || **Visual & Focus Aids** | Reading ruler, paragraph-by-paragraph reading mode, and speed reading features. | ✅ |
## Planned Features
<div align="left">🛠 Building</div><div align="left">🔄 Planned</div>
| **Feature** | **Description** | **Priority** || ------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------ || [**Sync with Koreader**][link-kosync-wiki] | Synchronize reading progress, notes, and bookmarks with [Koreader][link-koreader] devices. | 🛠 || **AI-Powered Summarization** | Generate summaries of books or chapters using AI for quick insights. | 🛠 || **Advanced Reading Stats** | Track reading time, pages read, and more for detailed insights. | 🛠 || **Audiobook Support** | Extend functionality to play and manage audiobooks. | 🔄 || **Handwriting Annotations** | Add support for handwriting annotations using a pen on compatible devices. | 🔄 || **In-Library Full-Text Search** | Search across your entire ebook library to find topics and quotes. | 🔄 |
Stay tuned for continuous improvements and updates! Contributions and suggestions are always welcome—let's build the ultimate reading experience together. 😊
## Screenshots






---
## Downloads
### Mobile Apps
<div align="center"> <a href="https://apps.apple.com/app/id6738622779"> <img alt="Download on the App Store" src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" style="height: 50px;" /></a> <a href="https://play.google.com/store/apps/details?id=com.bilingify.readest"> <img alt="Get it on Google Play" src="https://upload.wikimedia.org/wikipedia/commons/7/78/Google_Play_Store_badge_EN.svg" style="height: 50px;" /></a></div>
### Platform-Specific Downloads
- macOS / iOS / iPadOS : Search and install **Readest** on the [App Store][link-appstore], _also_ available on TestFlight for beta test (send your Apple ID to <readestapp@gmail.com> to request access).- Windows / Linux / Android: Visit and download **Readest** at [https://readest.com][link-website] or the [Releases on GitHub][link-gh-releases].- Linux users can also install [Readest on Flathub][link-flathub].- Web: Visit and use **Readest for Web** at [https://web.readest.com][link-web-readest].
## Requirements
- **Node.js** and **pnpm** for Next.js development- **Rust** and **Cargo** for Tauri development
For the best experience to build Readest for yourself, use a recent version of Node.js and Rust. Refer to the [Tauri documentation](https://v2.tauri.app/start/prerequisites/) for details on setting up the development environment prerequisites on different platforms.
```bashnvm install v22nvm use v22npm install -g pnpmrustup update```
## Getting Started
To get started with Readest, follow these steps to clone and build the project.
### 1. Clone the Repository
```bashgit clone https://github.com/readest/readest.gitcd readest```
### 2. Install Dependencies
```bash# might need to rerun this when code is updatedgit submodule update --init --recursivepnpm install# copy vendors dist libs to public directorypnpm --filter @readest/readest-app setup-vendors```
### 3. Verify Dependencies Installation
To confirm that all dependencies are correctly installed, run the following command:
```bashpnpm tauri info```
This command will display information about the installed Tauri dependencies and configuration on your platform. Note that the output may vary depending on the operating system and environment setup. Please review the output specific to your platform for any potential issues.
For Windows targets, “Build Tools for Visual Studio 2022” (or a higher edition of Visual Studio) and the “Desktop development with C++” workflow must be installed. For Windows ARM64 targets, the “VS 2022 C++ ARM64 build tools” and "C++ Clang Compiler for Windows" components must be installed. And make sure `clang` can be found in the path by adding `C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\x64\bin` for example in the environment variable `Path`.
### 4. Build for Development
```bash# Start development for the Tauri apppnpm tauri dev# or start development for the Web apppnpm dev-web# preview with OpenNext build for the Web apppnpm preview```
For Android:
```bash# Initialize the Android environment (run once)rm apps/readest-app/src-tauri/gen/androidpnpm tauri android initgit checkout apps/readest-app/src-tauri/gen/android
pnpm tauri android dev# or if you want to dev on a real devicepnpm tauri android dev --host```
For iOS:
```bash# Set up the iOS environment (run once)pnpm tauri ios init
pnpm tauri ios dev# or if you want to dev on a real devicepnpm tauri ios dev --host```
### 5. Build for Production
```bashpnpm tauri buildpnpm tauri android buildpnpm tauri ios build```
Please refer to our release script if you experience any issues:https://github.com/readest/readest/blob/main/.github/workflows/release.yml
### 6. Setup dev environment with Nix
If you have Nix installed, you can leverage flake to enter a development shellwith all the necessary dependencies:
```bashnix develop ./ops # enter a dev shell for the web appnix develop ./ops#ios # enter a dev shell for the ios appnix develop ./ops#android # enter a dev shell for the android app```
### 7. More information
Please check the [wiki][link-gh-wiki] of this project for more information on development.
## Troubleshooting
### 1. Readest Won’t Launch on Windows (Missing Edge WebView2 Runtime)
**Symptom**
- When you double-click readest.exe, nothing happens. No window appears, and Task Manager does not show the process.- This can affect both the standard installer and the portable version.
**Cause**
- Microsoft Edge WebView2 Runtime is either missing, outdated, or improperly installed on your system. Readest depends on WebView2 to render the interface on Windows.
**How to Fix**
1. Check if WebView2 is installed - Open “Add or Remove Programs” (a.k.a. Apps & features) on Windows. Look for “Microsoft Edge WebView2 Runtime.”2. Install or Update WebView2 - Download the WebView2 Runtime directly from Microsoft: [link](https://developer.microsoft.com/en-us/microsoft-edge/webview2?form=MA13LH). - If you prefer an offline installer, download the offline package and run it as an Administrator.3. Re-run Readest - After installing/updating WebView2, launch readest.exe again. - If you still encounter problems, reboot your PC and try again.
**Additional Tips**
- If reinstalling once doesn’t work, uninstall Edge WebView2 completely, then reinstall it with Administrator privileges.- Verify your Windows installation has the latest updates from Microsoft.
**Still Stuck?**
- See Issue [readest/readest#358](https://github.com/readest/readest/issues/358) for further details, or head over to our [Discord][link-discord] server and open a support discussion with detailed logs of your environment and the steps you’ve taken.
### 2. AppImage Launches but Only Shows a Taskbar Icon
On some Arch Linux systems—especially those using Wayland—the Readest AppImage may briefly show an icon in the taskbar and then exit without opening a window.
You might see logs such as:
```Could not create default EGL display: EGL_BAD_PARAMETER. Aborting...```
This behavior is usually caused by compatibility issues between the bundled AppImage libraries and the system’s EGL / Wayland environment.
**Workaround 1: Launch with LD_PRELOAD (recommended)**
You can preload the system Wayland client library before launching the AppImage:
```LD_PRELOAD=/usr/lib/libwayland-client.so /path/to/Readest.AppImage```
This workaround has been confirmed to resolve the issue on affected systems.
**Workaround 2: Use the Flatpak Version**
If you prefer a more reliable out-of-the-box experience on Arch Linux, consider using the [Flatpak build on Flathub][link-flathub] instead. The Flatpak runtime helps avoid system library mismatches and tends to behave more consistently across different Wayland and X11 setups.
## Contributors
Readest is open-source, and contributions are welcome! Feel free to open issues, suggest features, or submit pull requests. Please **review our [contributing guidelines](CONTRIBUTING.md) before you start**. We also welcome you to join our [Discord][link-discord] community for either support or contributing guidance.
<a href="https://github.com/readest/readest/graphs/contributors"> <p align="left"> <img width="500" src="https://contrib.rocks/image?repo=readest/readest" alt="A table of avatars from the project's contributors" /> </p></a>
## Support
If Readest has been useful to you, consider supporting its development. You can [become a sponsor on GitHub](https://github.com/sponsors/readest), [donate via Stripe](https://donate.stripe.com/4gMcN5aZdcE52kW3TFgjC01), or [donate with crypto](https://donate.readest.com). Your contribution helps us squash bugs faster, improve performance, and keep building great features.
### Sponsors
<p align="center"> <a title="Browser testing via TestMu AI" href="https://www.testmuai.com/?utm_medium=sponsor&utm_source=readest" target="_blank"> <img src="https://raw.githubusercontent.com/readest/readest/refs/heads/main/data/sponsors/testmu-ai-logo.png" style="vertical-align: middle;" width="250" /> </a></p>
## License
Readest is free software: you can redistribute it and/or modify it under the terms of the [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the [LICENSE](LICENSE) file for details.
The following libraries and frameworks are used in this software:
- [foliate-js](https://github.com/johnfactotum/foliate-js), which is MIT licensed.- [zip.js](https://github.com/gildas-lormeau/zip.js), which is licensed under the BSD-3-Clause license.- [fflate](https://github.com/101arrowz/fflate), which is MIT licensed.- [PDF.js](https://github.com/mozilla/pdf.js), which is licensed under Apache License 2.0.- [daisyUI](https://github.com/saadeghi/daisyui), which is MIT licensed.- [marked](https://github.com/markedjs/marked), which is MIT licensed.- [next.js](https://github.com/vercel/next.js), which is MIT licensed.- [react-icons](https://github.com/react-icons/react-icons), which has various open-source licenses.- [react](https://github.com/facebook/react), which is MIT licensed.- [tauri](https://github.com/tauri-apps/tauri), which is MIT licensed.
The following fonts are utilized in this software, either bundled within the application or provided through web fonts:
[Bitter](https://fonts.google.com/specimen/Bitter), [Fira Code](https://fonts.google.com/specimen/Fira+Code), [Inter](https://fonts.google.com/specimen/Inter), [Literata](https://fonts.google.com/specimen/Literata), [Merriweather](https://fonts.google.com/specimen/Merriweather), [Noto Sans](https://fonts.google.com/specimen/Noto+Sans), [Roboto](https://fonts.google.com/specimen/Roboto), [LXGW WenKai](https://github.com/lxgw/LxgwWenKai), [MiSans](https://hyperos.mi.com/font/en/), [Source Han](https://github.com/adobe-fonts/source-han-sans/), [WenQuanYi Micro Hei](http://wenq.org/wqy2/)
We would also like to thank the [Web Chinese Fonts Plan](https://chinese-font.netlify.app) for offering open-source tools that enable the use of Chinese fonts on the web.
---
<div align="center" style="color: gray;">Happy reading with Readest!</div>
[badge-website]: https://img.shields.io/badge/website-readest.com-orange[badge-web-app]: https://img.shields.io/badge/read%20online-web.readest.com-orange[badge-license]: https://img.shields.io/github/license/readest/readest?color=teal[badge-release]: https://img.shields.io/github/release/readest/readest?color=green[badge-platforms]: https://img.shields.io/badge/platforms-macOS%2C%20Windows%2C%20Linux%2C%20Android%2C%20iOS%2C%20Web%2C%20PWA-green[badge-last-commit]: https://img.shields.io/github/last-commit/readest/readest?color=blue[badge-commit-activity]: https://img.shields.io/github/commit-activity/m/readest/readest?color=blue[badge-discord]: https://img.shields.io/discord/1314226120886976544?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square[badge-hellogithub]: https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=8a5b6ade2aee461a8bd94e59200682a7&claim_uid=eRLUbPOy2qZtDgw&theme=small[badge-donate]: https://donate.readest.com/badge.svg[badge-deepwiki]: https://deepwiki.com/badge.svg[badge-reddit]: https://img.shields.io/reddit/subreddit-subscribers/readest?style=flat&logo=reddit&color=F37E41[badge-language-coverage]: https://img.shields.io/badge/coverage-53%25%20population%20🌍-green[link-donate]: https://donate.readest.com/?tickers=btc%2Ceth%2Csol%2Cusdc[link-appstore]: https://apps.apple.com/app/apple-store/id6738622779?pt=127463130&ct=github&mt=8[link-website]: https://readest.com?utm_source=github&utm_medium=referral&utm_campaign=readme[link-flathub]: https://flathub.org/en/apps/com.bilingify.readest[link-web-readest]: https://web.readest.com[link-gh-releases]: https://github.com/readest/readest/releases[link-gh-commits]: https://github.com/readest/readest/commits/main[link-gh-pulse]: https://github.com/readest/readest/pulse[link-gh-wiki]: https://github.com/readest/readest/wiki[link-discord]: https://discord.gg/gntyVNk3BJ[link-parallel-read]: https://readest.com/#parallel-read[link-koreader]: https://github.com/koreader/koreader[link-hellogithub]: https://hellogithub.com/repository/8a5b6ade2aee461a8bd94e59200682a7[link-deepwiki]: https://deepwiki.com/readest/readest[link-locales]: https://github.com/readest/readest/tree/main/apps/readest-app/public/locales[link-kosync-wiki]: https://github.com/readest/readest/wiki/Sync-with-Koreader-devices[link-reddit]: https://reddit.com/r/readest/123456789101112PDFJS_BUILD_PATH=../../packages/foliate-js/node_modules/pdfjs-dist/legacy/buildPDFJS_FONTS_PATH=../../packages/foliate-js/node_modules/pdfjs-distPDFJS_STYLE_PATH=../../packages/foliate-js/vendor/pdfjs
NEXT_PUBLIC_DEFAULT_POSTHOG_URL_BASE64="aHR0cHM6Ly91cy5pLnBvc3Rob2cuY29t"NEXT_PUBLIC_DEFAULT_POSTHOG_KEY_BASE64="cGhjX2ViNXowbVRxWm8yZm5YYnZGNmE3bFh5TThpTmRSNTNsR1A3VFM3VGh4S08="
NEXT_PUBLIC_DEFAULT_SUPABASE_URL_BASE64="aHR0cHM6Ly9yZWFkZXN0LnN1cGFiYXNlLmNv"NEXT_PUBLIC_DEFAULT_SUPABASE_KEY_BASE64="ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBjM01pT2lKemRYQmhZbUZ6WlNJc0luSmxaaUk2SW5aaWMzbDRablZ6YW1weFpIaHJhbkZzZVhOaklpd2ljbTlzWlNJNkltRnViMjRpTENKcFlYUWlPakUzTXpReE1qTTJOekVzSW1WNGNDSTZNakEwT1RZNU9UWTNNWDAuM1U1VXFhb3VfMVNnclZlMWVvOXJBcGMwdUtqcWhwUWRVWGh2d1VIbVVmZw=="
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_DEV_BASE64="cGtfdGVzdF81MVJmQmdLRTdSWW5pTWsxc0tDV2RUd2hMZzcySzk4eDRWcjlIdDdsRFBONngzcnpZYmhydGtNQnpDdzZKbHFaRVVITVp5eVNjVXhCZXVkcGppWTk0WXNHcDAweFlRRnRRaUU="NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_BASE64="cGtfbGl2ZV81MVFYN3dRRU5ndjJFOUxQRHpZUlE5TlJJeTNjd09EZ1AzSkNFRHRPWlFtdFJWc3Brd053ZE1NNUpIVnVPTmJWcjZ3VGFCMUNZR1pJMmRPVWppTkY0bHJvVjAwalE4TkpkdWk="1234567891011121314151617181920212223242526272829303132NEXT_PUBLIC_POSTHOG_KEY=YOUR_POSTHOG_KEYNEXT_PUBLIC_POSTHOG_HOST=YOUR_POSTHOG_HOST
NEXT_PUBLIC_SUPABASE_URL=YOUR_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY
NEXT_PUBLIC_STORAGE_FIXED_QUOTA=1073741824
NEXT_PUBLIC_API_BASE_URL=https://your-api-base-url.com
SUPABASE_ADMIN_KEY=YOUR_SUPABASE_ADMIN_KEY
DEEPL_PRO_API_KEYS=YOUR_DEEPL_PRO_API_KEYSDEEPL_FREE_API_KEYS=YOUR_DEEPL_FREE_API_KEYS
# r2, s3NEXT_PUBLIC_OBJECT_STORAGE_TYPE=r2
R2_TOKEN_VALUE=YOUR_R2_TOKEN_VALUER2_ACCESS_KEY_ID=YOUR_R2_ACCESS_KEY_IDR2_SECRET_ACCESS_KEY=YOUR_R2_SECRET_ACCESS_KEYR2_BUCKET_NAME=YOUR_R2_BUCKET_NAMER2_ACCOUNT_ID=YOUR_R2_ACCOUNT_IDR2_REGION=YOUR_R2_REGION
S3_ENDPOINT=PLACE_HOLDERS3_ACCESS_KEY_ID=PLACE_HOLDERS3_SECRET_ACCESS_KEY=PLACE_HOLDERS3_BUCKET_NAME=PLACE_HOLDERS3_REGION=PLACE_HOLDER
TEMP_STORAGE_PUBLIC_BUCKET_NAME=PLACE_HOLDER123NEXT_PUBLIC_APP_PLATFORM=tauri
DBUS_ID=com.bilingify.readest12NEXT_PUBLIC_APP_PLATFORM=tauriAI_GATEWAY_API_KEY=your_key_here1NEXT_PUBLIC_APP_PLATFORM=web123NEXT_PUBLIC_APP_PLATFORM=webAI_GATEWAY_API_KEY=your_key_hereNEXT_PUBLIC_AI_GATEWAY_API_KEY=your_key_here1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies/node_modules/.pnp.pnp.js.yarn/install-state.gz
# testing/coverage
# next.js/.next//out/
# production/build
# misc.DS_Store*.pem
# debugnpm-debug.log*yarn-debug.log*yarn-error.log*
# local env files.env*.local
# certs and keys/private_keys
# plistsEntitlements*.plist
# local confstauri.*.conf.json
# vercel.vercel
# open-next.open-next.wrangler
# typescript*.tsbuildinfonext-env.d.ts
#generatedsrc-tauri/gen
# vendor/public/vendor
# Auto Generated PWA files/public/sw.js/public/workbox-*.js/public/fallback-*.js/public/swe-worker-*.js
12345678910111213141516171819202122{ "$schema": "https://ui.shadcn.com/schema.json", "style": "new-york", "rsc": true, "tsx": true, "tailwind": { "config": "tailwind.config.ts", "css": "src/styles/globals.css", "baseColor": "neutral", "cssVariables": true, "prefix": "" }, "iconLibrary": "lucide", "aliases": { "components": "@/components", "utils": "@/utils", "ui": "@/components/ui", "lib": "@/libs", "hooks": "@/hooks" }, "registries": {}}1234567891011121314151617181920212223242526272829303132333435import { defineConfig, globalIgnores } from 'eslint/config';import next from 'eslint-config-next';import nextVitals from 'eslint-config-next/core-web-vitals';import tseslint from 'eslint-config-next/typescript';import jsxA11y from 'eslint-plugin-jsx-a11y';
const eslintConfig = defineConfig([ ...tseslint, ...next, ...nextVitals, { rules: { ...jsxA11y.configs.recommended.rules, '@typescript-eslint/no-unused-vars': [ 'warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', }, ], }, }, globalIgnores([ 'node_modules/**', '.next/**', '.open-next/**', 'out/**', 'build/**', 'public/**', 'next-env.d.ts', ]),]);
export default eslintConfig;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588# This file is automatically @generated by Cargo.# It is not intended for manual editing.version = 4
[[package]]name = "adler2"version = "2.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]name = "anyhow"version = "1.0.100"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
[[package]]name = "arbitrary"version = "1.4.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"dependencies = [ "derive_arbitrary",]
[[package]]name = "autocfg"version = "1.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]name = "base64"version = "0.22.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]name = "bitflags"version = "2.10.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
[[package]]name = "bumpalo"version = "3.19.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
[[package]]name = "bytemuck"version = "1.24.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4"
[[package]]name = "byteorder-lite"version = "0.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]name = "cfg-if"version = "1.0.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]name = "color_quant"version = "1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
[[package]]name = "crc32fast"version = "1.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"dependencies = [ "cfg-if",]
[[package]]name = "derive_arbitrary"version = "1.4.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"dependencies = [ "proc-macro2", "quote", "syn",]
[[package]]name = "directories-next"version = "2.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc"dependencies = [ "cfg-if", "dirs-sys-next",]
[[package]]name = "dirs-sys-next"version = "0.1.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"dependencies = [ "libc", "redox_users", "winapi",]
[[package]]name = "equivalent"version = "1.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]name = "fdeflate"version = "0.3.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"dependencies = [ "simd-adler32",]
[[package]]name = "flate2"version = "1.1.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb"dependencies = [ "crc32fast", "libz-rs-sys", "miniz_oxide",]
[[package]]name = "getrandom"version = "0.2.16"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"dependencies = [ "cfg-if", "libc", "wasi",]
[[package]]name = "gif"version = "0.14.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f954a9e9159ec994f73a30a12b96a702dde78f5547bcb561174597924f7d4162"dependencies = [ "color_quant", "weezl",]
[[package]]name = "hashbrown"version = "0.16.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
[[package]]name = "image"version = "0.25.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a"dependencies = [ "bytemuck", "byteorder-lite", "color_quant", "gif", "image-webp", "moxcms", "num-traits", "png", "zune-core", "zune-jpeg",]
[[package]]name = "image-webp"version = "0.2.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3"dependencies = [ "byteorder-lite", "quick-error",]
[[package]]name = "indexmap"version = "2.12.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2"dependencies = [ "equivalent", "hashbrown",]
[[package]]name = "libc"version = "0.2.177"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
[[package]]name = "libredox"version = "0.1.10"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb"dependencies = [ "bitflags", "libc",]
[[package]]name = "libz-rs-sys"version = "0.5.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd"dependencies = [ "zlib-rs",]
[[package]]name = "log"version = "0.4.28"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
[[package]]name = "md5"version = "0.8.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0"
[[package]]name = "memchr"version = "2.7.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
[[package]]name = "miniz_oxide"version = "0.8.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"dependencies = [ "adler2", "simd-adler32",]
[[package]]name = "moxcms"version = "0.7.10"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "80986bbbcf925ebd3be54c26613d861255284584501595cf418320c078945608"dependencies = [ "num-traits", "pxfm",]
[[package]]name = "num-traits"version = "0.2.19"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"dependencies = [ "autocfg",]
[[package]]name = "once_cell"version = "1.21.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]name = "png"version = "0.18.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0"dependencies = [ "bitflags", "crc32fast", "fdeflate", "flate2", "miniz_oxide",]
[[package]]name = "proc-macro2"version = "1.0.103"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"dependencies = [ "unicode-ident",]
[[package]]name = "pxfm"version = "0.1.26"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b3502d6155304a4173a5f2c34b52b7ed0dd085890326cb50fd625fdf39e86b3b"dependencies = [ "num-traits",]
[[package]]name = "quick-error"version = "2.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
[[package]]name = "quote"version = "1.0.42"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"dependencies = [ "proc-macro2",]
[[package]]name = "redox_users"version = "0.4.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"dependencies = [ "getrandom", "libredox", "thiserror",]
[[package]]name = "simd-adler32"version = "0.3.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]name = "syn"version = "2.0.111"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87"dependencies = [ "proc-macro2", "quote", "unicode-ident",]
[[package]]name = "thiserror"version = "1.0.69"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"dependencies = [ "thiserror-impl",]
[[package]]name = "thiserror-impl"version = "1.0.69"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"dependencies = [ "proc-macro2", "quote", "syn",]
[[package]]name = "unicode-ident"version = "1.0.22"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
[[package]]name = "wasi"version = "0.11.1+wasi-snapshot-preview1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]name = "weezl"version = "0.1.12"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88"
[[package]]name = "winapi"version = "0.3.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu",]
[[package]]name = "winapi-i686-pc-windows-gnu"version = "0.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]name = "winapi-x86_64-pc-windows-gnu"version = "0.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]name = "windows"version = "0.62.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"dependencies = [ "windows-collections", "windows-core", "windows-future", "windows-numerics",]
[[package]]name = "windows-collections"version = "0.3.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"dependencies = [ "windows-core",]
[[package]]name = "windows-core"version = "0.62.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"dependencies = [ "windows-implement", "windows-interface", "windows-link", "windows-result", "windows-strings",]
[[package]]name = "windows-future"version = "0.3.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"dependencies = [ "windows-core", "windows-link", "windows-threading",]
[[package]]name = "windows-implement"version = "0.60.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"dependencies = [ "proc-macro2", "quote", "syn",]
[[package]]name = "windows-interface"version = "0.59.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"dependencies = [ "proc-macro2", "quote", "syn",]
[[package]]name = "windows-link"version = "0.2.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]name = "windows-numerics"version = "0.3.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"dependencies = [ "windows-core", "windows-link",]
[[package]]name = "windows-result"version = "0.4.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"dependencies = [ "windows-link",]
[[package]]name = "windows-strings"version = "0.5.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"dependencies = [ "windows-link",]
[[package]]name = "windows-threading"version = "0.2.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"dependencies = [ "windows-link",]
[[package]]name = "windows_thumbnail"version = "0.1.0"dependencies = [ "anyhow", "base64", "directories-next", "image", "md5", "once_cell", "windows", "windows-core", "zip",]
[[package]]name = "zip"version = "6.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b"dependencies = [ "arbitrary", "crc32fast", "flate2", "indexmap", "memchr", "zopfli",]
[[package]]name = "zlib-rs"version = "0.5.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2"
[[package]]name = "zopfli"version = "0.8.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"dependencies = [ "bumpalo", "crc32fast", "log", "simd-adler32",]
[[package]]name = "zune-core"version = "0.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "111f7d9820f05fd715df3144e254d6fc02ee4088b0644c0ffd0efc9e6d9d2773"
[[package]]name = "zune-jpeg"version = "0.5.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "dc6fb7703e32e9a07fb3f757360338b3a567a5054f21b5f52a666752e333d58e"dependencies = [ "zune-core",]12345678910111213141516171819202122232425262728293031[package]name = "windows_thumbnail"version = "0.1.0"edition = "2021"publish = false
[workspace]
[lib]name = "windows_thumbnail"path = "src/mod.rs"crate-type = ["cdylib"]
[dependencies]anyhow = "1"base64 = "0.22"directories-next = "2.0"image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif", "webp"] }md5 = "0.8"once_cell = "1.19"zip = { version = "6.0", default-features = false, features = ["deflate"] }windows = { version = "0.62", features = [ "Win32_Foundation", "Win32_Graphics_Gdi", "Win32_Security", "Win32_System_Com", "Win32_System_LibraryLoader", "Win32_System_Registry", "Win32_UI_Shell",] }windows-core = "0.62"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134# Windows Thumbnail Provider for Readest
This crate provides Windows Explorer thumbnail support for eBook files when Readest is set as the default application.
## Features
- **Automatic Cover Extraction**: Extracts cover images from EPUB, MOBI, AZW, AZW3, FB2, CBZ, CBR files- **Readest Branding**: Adds a small Readest icon overlay at the bottom-right corner- **Smart Caching**: Caches generated thumbnails for faster subsequent loads- **File Association Aware**: Only shows thumbnails when Readest is the default app for the file type- **COM Integration**: Full Windows Shell extension implementation via `IThumbnailProvider`
## Supported Formats
| Format | Extension | Cover Source || ---------- | ----------------------- | ---------------------------- || EPUB | `.epub` | OPF manifest cover reference || MOBI/AZW | `.mobi`, `.azw`, `.prc` | EXTH cover offset || AZW3/KF8 | `.azw3`, `.kf8` | KF8 format cover || FB2 | `.fb2` | `<binary>` coverpage element || Comic Book | `.cbz`, `.cbr` | First image in archive || Plain Text | `.txt` | Generated placeholder |
## Building
### Library Only
```bashcargo build --release```
### COM DLL (for Windows Explorer integration)
```bashcargo build --release --features com```
### CLI Tool
```bashcargo build --release --features cli```
## Installation
The thumbnail provider DLL is automatically registered when Readest is installed via the NSIS installer.
### Manual Registration (for development)
```powershell# Register the DLLregsvr32 /s target\release\windows_thumbnail.dll
# Unregister the DLLregsvr32 /s /u target\release\windows_thumbnail.dll
# Refresh Explorer to see changesie4uinit.exe -show```
After registration, you may need to restart Windows Explorer or log out/in for changes to take effect.
## Usage (Development / Manual testing)
For local development and testing, build the Windows DLL (or the library) from the Readest Tauri app folder and register it manually. The legacy CLI test harness used to live in the separate `packages/tauri` workspace, but the thumbnail handler implementation now lives inside Readest's Tauri app.
Build the DLL (for Windows explorer integration):
```powershellcd apps/readest-app/src-tauricargo build --release --manifest-path Cargo.toml --features com```
The standalone CLI test harness is no longer distributed with the app. To test the thumbnail provider locally, build and register the DLL as shown above and use a small test harness that imports `readestlib`'s thumbnail code or use Explorer after registering the handler.
Manual registration for development (register the generated DLL):
```powershell# Register the DLLregsvr32 /s target\release\windows_thumbnail.dll
# Unregister the DLLregsvr32 /s /u target\release\windows_thumbnail.dll
# Refresh Explorer to see changesie4uinit.exe -show```
This generates a thumbnail with the Readest overlay at the specified size.
## Architecture
```┌─────────────────────────────────────────────────────────────────┐│ Windows Explorer │├─────────────────────────────────────────────────────────────────┤│ │ ││ IThumbnailProvider ───┼──► ThumbnailProvider ││ │ │ ││ │ ▼ ││ │ Check File Association ││ │ (is Readest the default?) ││ │ │ ││ │ ▼ (if yes) ││ │ Extract Cover Image ││ │ │ ││ │ ▼ ││ │ Add Readest Overlay ││ │ │ ││ │ ▼ ││ │ Return HBITMAP ││ │ │└─────────────────────────────────────────────────────────────────┘```
## COM Details
- **CLSID**: `{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}`- **Shell Thumbnail Handler GUID**: `{e357fccd-a995-4576-b01f-234630154e96}`- **Threading Model**: Apartment
## How It Works
1. When Windows Explorer needs a thumbnail, it queries the registered shell extension2. The COM DLL implements `IInitializeWithItem` to receive the file path3. It checks if Readest.exe is the default application for that file type using `AssocQueryStringW`4. If Readest is the default, it extracts the cover and generates the thumbnail5. If Readest is NOT the default, it returns `S_FALSE` to let Windows use other handlers
This ensures thumbnails only appear for files the user has associated with Readest.
## License
MIT License - See LICENSE file for details.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506/// Windows COM Thumbnail Provider for Readest////// Implements IThumbnailProvider and IInitializeWithItem for Windows Shell integration./// This allows Windows Explorer to show book covers as thumbnails for eBook files.////// **Important**: Thumbnails are only shown when Readest.exe is the default application/// for the file type.////// ## CLSID: {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}use std::cell::UnsafeCell;use std::ffi::c_void;use std::path::PathBuf;use std::sync::atomic::{AtomicIsize, AtomicU32, Ordering};
use windows::core::{IUnknown, Interface, GUID, HRESULT, PCWSTR, PWSTR};use windows::Win32::Foundation::{ CLASS_E_NOAGGREGATION, E_FAIL, E_INVALIDARG, E_NOINTERFACE, HMODULE, S_FALSE, S_OK,};use windows::Win32::Graphics::Gdi::{ CreateDIBSection, BITMAPINFO, BITMAPINFOHEADER, BI_RGB, DIB_RGB_COLORS, HBITMAP,};use windows::Win32::System::Com::{CoTaskMemFree, IClassFactory, IClassFactory_Impl};use windows::Win32::System::LibraryLoader::GetModuleFileNameW;use windows::Win32::System::Registry::{ RegCloseKey, RegCreateKeyExW, RegDeleteTreeW, RegSetValueExW, HKEY, HKEY_CLASSES_ROOT, KEY_WRITE, REG_OPTION_NON_VOLATILE, REG_SZ,};use windows::Win32::UI::Shell::{ AssocQueryStringW, IInitializeWithItem, IInitializeWithItem_Impl, IShellItem, IThumbnailProvider, IThumbnailProvider_Impl, ASSOCF_NONE, ASSOCSTR_EXECUTABLE, SIGDN_FILESYSPATH, WTSAT_ARGB, WTS_ALPHATYPE,};use windows_core::BOOL;use windows_core::{implement, Ref};
use super::cached_thumbnail_for_path;
// ─────────────────────────────────────────────────────────────────────────────// CLSID for Readest Thumbnail Provider// ─────────────────────────────────────────────────────────────────────────────
/// CLSID: {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}pub const CLSID_READEST_THUMBNAIL: GUID = GUID::from_u128(0xA1B2C3D4_E5F6_7890_ABCD_EF1234567890);
/// Supported file extensionspub const SUPPORTED_EXTENSIONS: &[&str] = &[ ".epub", ".mobi", ".azw", ".azw3", ".kf8", ".prc", ".fb2", ".cbz", ".cbr", ".txt",];
// DLL reference countingstatic DLL_REF_COUNT: AtomicU32 = AtomicU32::new(0);static DLL_MODULE_PTR: AtomicIsize = AtomicIsize::new(0);
fn dll_add_ref() { DLL_REF_COUNT.fetch_add(1, Ordering::SeqCst);}fn dll_release() { DLL_REF_COUNT.fetch_sub(1, Ordering::SeqCst);}
fn set_dll_module(h: HMODULE) { DLL_MODULE_PTR.store(h.0 as isize, Ordering::SeqCst);}
fn get_dll_module() -> Option<HMODULE> { let ptr = DLL_MODULE_PTR.load(Ordering::SeqCst); if ptr == 0 { None } else { Some(HMODULE(ptr as *mut c_void)) }}
// ─────────────────────────────────────────────────────────────────────────────// File Association Check// ─────────────────────────────────────────────────────────────────────────────
/// Check if Readest.exe is the default application for a given file extension.fn is_readest_default_for_extension(ext: &str) -> bool { let ext_wide: Vec<u16> = ext.encode_utf16().chain(std::iter::once(0)).collect(); let mut buffer = [0u16; 260]; let mut buffer_size = buffer.len() as u32;
unsafe { let result = AssocQueryStringW( ASSOCF_NONE, ASSOCSTR_EXECUTABLE, PCWSTR(ext_wide.as_ptr()), None, Some(PWSTR(buffer.as_mut_ptr())), &mut buffer_size, );
if result.is_ok() { let len = buffer.iter().position(|&c| c == 0).unwrap_or(buffer.len()); let path = String::from_utf16_lossy(&buffer[..len]).to_lowercase(); return path.contains("readest"); } }
false}
/// Check if Readest is the default app for a specific file path.fn is_readest_default_for_file(path: &PathBuf) -> bool { if let Some(ext) = path.extension().and_then(|e| e.to_str()) { let ext_with_dot = format!(".{}", ext.to_lowercase()); return is_readest_default_for_extension(&ext_with_dot); } false}
// ─────────────────────────────────────────────────────────────────────────────// ThumbnailProvider// ────────────────────────────────────────────────��────────────────────────────
/// Interior mutability wrapper for COM single-threaded apartmentstruct ComCell<T>(UnsafeCell<T>);
impl<T> ComCell<T> { fn new(value: T) -> Self { Self(UnsafeCell::new(value)) } fn get(&self) -> &T { unsafe { &*self.0.get() } } fn set(&self, value: T) { unsafe { *self.0.get() = value; } }}
// SAFETY: COM thumbnail providers run in single-threaded apartment (STA)unsafe impl<T> Sync for ComCell<T> {}unsafe impl<T> Send for ComCell<T> {}
#[implement(IThumbnailProvider, IInitializeWithItem)]pub struct ThumbnailProvider { file_path: ComCell<Option<PathBuf>>, file_ext: ComCell<Option<String>>, should_provide: ComCell<bool>,}
impl ThumbnailProvider { pub fn new() -> Self { dll_add_ref(); Self { file_path: ComCell::new(None), file_ext: ComCell::new(None), should_provide: ComCell::new(false), } }}
impl Default for ThumbnailProvider { fn default() -> Self { Self::new() }}
impl Drop for ThumbnailProvider { fn drop(&mut self) { dll_release(); }}
impl IInitializeWithItem_Impl for ThumbnailProvider_Impl { fn Initialize(&self, psi: Ref<'_, IShellItem>, _grfmode: u32) -> windows::core::Result<()> { let item = psi.ok()?;
unsafe { let path_pwstr = item.GetDisplayName(SIGDN_FILESYSPATH)?;
let mut len = 0usize; let mut ptr = path_pwstr.0; while *ptr != 0 { len += 1; ptr = ptr.add(1); }
let slice = std::slice::from_raw_parts(path_pwstr.0, len); let path_str = String::from_utf16_lossy(slice); let path = PathBuf::from(&path_str);
CoTaskMemFree(Some(path_pwstr.0 as *const c_void));
let is_default = is_readest_default_for_file(&path); self.should_provide.set(is_default);
if !is_default { return Ok(()); }
let ext = path .extension() .and_then(|e| e.to_str()) .map(|s| s.to_lowercase()) .unwrap_or_default();
self.file_path.set(Some(path)); self.file_ext.set(Some(ext)); } Ok(()) }}
impl IThumbnailProvider_Impl for ThumbnailProvider_Impl { fn GetThumbnail( &self, cx: u32, phbmp: *mut HBITMAP, pdwalpha: *mut WTS_ALPHATYPE, ) -> windows::core::Result<()> { if !*self.should_provide.get() { return Err(E_FAIL.into()); }
let path = self.file_path.get().as_ref().ok_or(E_FAIL)?; let ext = self.file_ext.get().as_ref().ok_or(E_FAIL)?;
let png_bytes = cached_thumbnail_for_path(path, ext, cx).map_err(|_| E_FAIL)?; let img = image::load_from_memory(&png_bytes).map_err(|_| E_FAIL)?; let rgba = img.to_rgba8(); let (width, height) = (rgba.width(), rgba.height());
let bmi = BITMAPINFO { bmiHeader: BITMAPINFOHEADER { biSize: std::mem::size_of::<BITMAPINFOHEADER>() as u32, biWidth: width as i32, biHeight: -(height as i32), biPlanes: 1, biBitCount: 32, biCompression: BI_RGB.0, ..Default::default() }, ..Default::default() };
let mut bits: *mut c_void = std::ptr::null_mut();
unsafe { let hbmp = CreateDIBSection(None, &bmi, DIB_RGB_COLORS, &mut bits, None, 0) .map_err(|_| E_FAIL)?; if bits.is_null() { return Err(E_FAIL.into()); }
// RGBA -> BGRA let dst = std::slice::from_raw_parts_mut(bits as *mut u8, (width * height * 4) as usize); let src = rgba.as_raw(); for i in 0..(width * height) as usize { let si = i * 4; dst[si] = src[si + 2]; // B dst[si + 1] = src[si + 1]; // G dst[si + 2] = src[si]; // R dst[si + 3] = src[si + 3]; // A }
*phbmp = hbmp; *pdwalpha = WTSAT_ARGB; } Ok(()) }}
// ─────────────────────────────────────────────────────────────────────────────// ClassFactory// ─────────────────────────────────────────────────────────────────────────────
#[implement(IClassFactory)]pub struct ThumbnailProviderFactory;
impl ThumbnailProviderFactory { pub fn new() -> Self { dll_add_ref(); Self }}
impl Default for ThumbnailProviderFactory { fn default() -> Self { Self::new() }}
impl Drop for ThumbnailProviderFactory { fn drop(&mut self) { dll_release(); }}
impl IClassFactory_Impl for ThumbnailProviderFactory_Impl { fn CreateInstance( &self, punkouter: Ref<'_, IUnknown>, riid: *const GUID, ppvobject: *mut *mut c_void, ) -> windows::core::Result<()> { unsafe { if ppvobject.is_null() { return Err(E_INVALIDARG.into()); } *ppvobject = std::ptr::null_mut(); if !punkouter.is_null() { return Err(CLASS_E_NOAGGREGATION.into()); }
let provider: IThumbnailProvider = ThumbnailProvider::new().into(); provider.query(&*riid, ppvobject).ok() } }
fn LockServer(&self, flock: BOOL) -> windows::core::Result<()> { if flock.as_bool() { dll_add_ref(); } else { dll_release(); } Ok(()) }}
// ─────────────────────────────────────────────────────────────────────────────// DLL Exports// ─────────────────────────────────────────────────────────────────────────────
#[no_mangle]pub extern "system" fn DllMain(hinstance: HMODULE, reason: u32, _reserved: *mut c_void) -> BOOL { const DLL_PROCESS_ATTACH: u32 = 1; if reason == DLL_PROCESS_ATTACH { set_dll_module(hinstance); } BOOL::from(true)}
#[no_mangle]pub extern "system" fn DllCanUnloadNow() -> HRESULT { if DLL_REF_COUNT.load(Ordering::SeqCst) == 0 { S_OK } else { S_FALSE }}
#[no_mangle]pub unsafe extern "system" fn DllGetClassObject( rclsid: *const GUID, riid: *const GUID, ppv: *mut *mut c_void,) -> HRESULT { if ppv.is_null() || rclsid.is_null() || riid.is_null() { return E_INVALIDARG; } *ppv = std::ptr::null_mut();
if *rclsid != CLSID_READEST_THUMBNAIL { return E_NOINTERFACE; } if *riid != IClassFactory::IID && *riid != IUnknown::IID { return E_NOINTERFACE; }
let factory: IClassFactory = ThumbnailProviderFactory::new().into(); factory.query(&*riid, ppv)}
#[no_mangle]pub unsafe extern "system" fn DllRegisterServer() -> HRESULT { match register_server_impl() { Ok(()) => S_OK, Err(e) => e, }}
#[no_mangle]pub unsafe extern "system" fn DllUnregisterServer() -> HRESULT { let _ = unregister_server_impl(); S_OK}
// ─────────────────────────────────────────────────────────────────────────────// Registry helpers// ─────────────────────────────────────────────────────────────────────────────
fn get_dll_path() -> Option<String> { let module = get_dll_module()?; let mut buffer = [0u16; 260]; unsafe { let len = GetModuleFileNameW(Some(module), &mut buffer); if len == 0 { None } else { Some(String::from_utf16_lossy(&buffer[..len as usize])) } }}
fn clsid_string() -> String { format!( "{{{:08X}-{:04X}-{:04X}-{:02X}{:02X}-{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}}}", CLSID_READEST_THUMBNAIL.data1, CLSID_READEST_THUMBNAIL.data2, CLSID_READEST_THUMBNAIL.data3, CLSID_READEST_THUMBNAIL.data4[0], CLSID_READEST_THUMBNAIL.data4[1], CLSID_READEST_THUMBNAIL.data4[2], CLSID_READEST_THUMBNAIL.data4[3], CLSID_READEST_THUMBNAIL.data4[4], CLSID_READEST_THUMBNAIL.data4[5], CLSID_READEST_THUMBNAIL.data4[6], CLSID_READEST_THUMBNAIL.data4[7] )}
fn to_wide(s: &str) -> Vec<u16> { s.encode_utf16().chain(std::iter::once(0)).collect()}
unsafe fn set_reg_value(key: HKEY, name: &str, value: &str) -> Result<(), HRESULT> { let name_w = to_wide(name); let value_w = to_wide(value); let bytes: &[u8] = std::slice::from_raw_parts(value_w.as_ptr() as *const u8, value_w.len() * 2); if RegSetValueExW(key, PCWSTR(name_w.as_ptr()), Some(0), REG_SZ, Some(bytes)).is_err() { Err(E_FAIL) } else { Ok(()) }}
unsafe fn create_reg_key(parent: HKEY, subkey: &str) -> Result<HKEY, HRESULT> { let subkey_w = to_wide(subkey); let mut hkey = HKEY::default(); let result = RegCreateKeyExW( parent, PCWSTR(subkey_w.as_ptr()), Some(0), None, REG_OPTION_NON_VOLATILE, KEY_WRITE, None, &mut hkey, None, ); if result.is_err() { Err(E_FAIL) } else { Ok(hkey) }}
unsafe fn register_server_impl() -> Result<(), HRESULT> { let dll_path = get_dll_path().ok_or(E_FAIL)?; let clsid = clsid_string();
// CLSID key let clsid_key = create_reg_key(HKEY_CLASSES_ROOT, &format!("CLSID\\{}", clsid))?; set_reg_value(clsid_key, "", "Readest Thumbnail Provider")?;
// CRITICAL: DisableProcessIsolation = 1 let disable_isolation_name = to_wide("DisableProcessIsolation"); let value: u32 = 1; let _ = windows::Win32::System::Registry::RegSetValueExW( clsid_key, PCWSTR(disable_isolation_name.as_ptr()), Some(0), windows::Win32::System::Registry::REG_DWORD, Some(std::slice::from_raw_parts( &value as *const u32 as *const u8, 4, )), );
let inproc_key = create_reg_key(clsid_key, "InprocServer32")?; set_reg_value(inproc_key, "", &dll_path)?; set_reg_value(inproc_key, "ThreadingModel", "Apartment")?; let _ = RegCloseKey(inproc_key); let _ = RegCloseKey(clsid_key);
// Register ShellEx thumbnail handler for each extension for ext in SUPPORTED_EXTENSIONS { let ext_shellex_path = format!("{}\\ShellEx\\{{e357fccd-a995-4576-b01f-234630154e96}}", ext); if let Ok(ext_shellex_key) = create_reg_key(HKEY_CLASSES_ROOT, &ext_shellex_path) { let _ = set_reg_value(ext_shellex_key, "", &clsid); let _ = RegCloseKey(ext_shellex_key); } } Ok(())}
unsafe fn unregister_server_impl() -> Result<(), HRESULT> { let clsid = clsid_string(); let clsid_path = to_wide(&format!("CLSID\\{}", clsid)); let _ = RegDeleteTreeW(HKEY_CLASSES_ROOT, PCWSTR(clsid_path.as_ptr()));
for ext in SUPPORTED_EXTENSIONS { let ext_path = to_wide(&format!( "{}\\ShellEx\\{{e357fccd-a995-4576-b01f-234630154e96}}", ext )); let _ = RegDeleteTreeW(HKEY_CLASSES_ROOT, PCWSTR(ext_path.as_ptr())); } Ok(())}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648/// Cover image extraction for various eBook formats////// Supports: EPUB, MOBI/AZW3/KF8, FB2, CBZ/CBR, TXTuse anyhow::{anyhow, Result};use base64::engine::general_purpose;use base64::Engine as _;use directories_next::ProjectDirs;use image::{imageops, DynamicImage, Rgba};use md5::Context;use once_cell::sync::Lazy;use std::io::{Cursor, Read, Seek, SeekFrom};use std::path::Path;use zip::ZipArchive;
/// Thumbnail cache directory (per-user)static CACHE_DIR: Lazy<Option<std::path::PathBuf>> = Lazy::new(|| { ProjectDirs::from("app", "Readest", "").map(|pd| { let dir = pd.cache_dir().join("thumbnails"); let _ = std::fs::create_dir_all(&dir); dir })});
// ─────────────────────────────────────────────────────────────────────────────// EPUB extraction// ─────────────────────────────────────────────────────────────────────────────
/// Extract cover image bytes from an EPUB file.pub fn extract_epub_cover_bytes<R: Read + Seek>(reader: R) -> Result<Vec<u8>> { let mut archive = ZipArchive::new(reader)?;
// Pass 1: Look for files with "cover" in the name let mut candidates: Vec<(usize, String, u64)> = Vec::new(); for i in 0..archive.len() { let file = archive.by_index(i)?; let name = file.name().to_lowercase(); let size = file.size(); drop(file);
if is_image_extension(&name) && (name.contains("cover") || name.contains("front")) { candidates.push((i, name, size)); } }
// Sort by priority: exact "cover" match first, then by size if !candidates.is_empty() { candidates.sort_by(|a, b| { let a_exact = a.1.contains("cover.") || a.1.ends_with("cover"); let b_exact = b.1.contains("cover.") || b.1.ends_with("cover"); match (a_exact, b_exact) { (true, false) => std::cmp::Ordering::Less, (false, true) => std::cmp::Ordering::Greater, _ => b.2.cmp(&a.2), } });
let idx = candidates[0].0; let mut file = archive.by_index(idx)?; let mut buf = Vec::new(); file.read_to_end(&mut buf)?; return Ok(buf); }
// Pass 2: Parse container.xml to find OPF, then parse OPF for cover let container_xml = read_zip_file_to_string(&mut archive, "META-INF/container.xml"); if let Ok(xml) = container_xml { if let Some(rootfile) = extract_attribute(&xml, "rootfile", "full-path") { let opf_content = read_zip_file_to_string(&mut archive, &rootfile); if let Ok(opf) = opf_content { if let Some(cover_id) = find_cover_id_in_opf(&opf) { if let Some(href) = find_href_by_id_in_opf(&opf, &cover_id) { let base = Path::new(&rootfile).parent().unwrap_or(Path::new("")); let cover_path = base.join(&href).to_string_lossy().replace('\\', "/"); if let Ok(bytes) = read_zip_file_to_bytes(&mut archive, &cover_path) { return Ok(bytes); } } } if let Some(href) = find_first_image_in_manifest(&opf) { let base = Path::new(&rootfile).parent().unwrap_or(Path::new("")); let cover_path = base.join(&href).to_string_lossy().replace('\\', "/"); if let Ok(bytes) = read_zip_file_to_bytes(&mut archive, &cover_path) { return Ok(bytes); } } } } }
// Pass 3: Just grab the largest image file let mut largest: Option<(usize, u64)> = None; for i in 0..archive.len() { let file = archive.by_index(i)?; let name = file.name().to_lowercase(); let size = file.size(); drop(file);
if is_image_extension(&name) && (largest.is_none() || size > largest.unwrap().1) { largest = Some((i, size)); } }
if let Some((idx, _)) = largest { let mut file = archive.by_index(idx)?; let mut buf = Vec::new(); file.read_to_end(&mut buf)?; return Ok(buf); }
Err(anyhow!("No cover image found in EPUB"))}
// ─────────────────────────────────────────────────────────────────────────────// MOBI/AZW3/KF8 extraction// ─────────────────────────────────────────────────��───────────────────────────
/// Extract cover image from MOBI/AZW3/KF8 files.pub fn extract_mobi_cover_bytes<R: Read + Seek>(mut reader: R) -> Result<Vec<u8>> { let mut header = [0u8; 78]; reader.read_exact(&mut header)?;
if &header[60..68] != b"BOOKMOBI" { return Err(anyhow!("Not a valid MOBI file")); }
let num_records = u16::from_be_bytes([header[76], header[77]]) as usize;
let mut record_offsets: Vec<u32> = Vec::with_capacity(num_records); for _ in 0..num_records { let mut rec = [0u8; 8]; reader.read_exact(&mut rec)?; record_offsets.push(u32::from_be_bytes([rec[0], rec[1], rec[2], rec[3]])); }
if record_offsets.is_empty() { return Err(anyhow!("No records in MOBI file")); }
reader.seek(SeekFrom::Start(record_offsets[0] as u64))?; let mut mobi_header = [0u8; 256]; reader.read_exact(&mut mobi_header)?;
if &mobi_header[16..20] != b"MOBI" { return Err(anyhow!("Invalid MOBI header")); }
let header_length = u32::from_be_bytes([ mobi_header[20], mobi_header[21], mobi_header[22], mobi_header[23], ]) as usize;
let exth_flags = u32::from_be_bytes([ mobi_header[128], mobi_header[129], mobi_header[130], mobi_header[131], ]); if exth_flags & 0x40 == 0 { return Err(anyhow!("No EXTH header in MOBI file")); }
let exth_offset = record_offsets[0] as u64 + 16 + header_length as u64; reader.seek(SeekFrom::Start(exth_offset))?;
let mut exth_magic = [0u8; 4]; reader.read_exact(&mut exth_magic)?; if &exth_magic != b"EXTH" { return Err(anyhow!("EXTH header not found")); }
let mut exth_len_bytes = [0u8; 4]; reader.read_exact(&mut exth_len_bytes)?;
let mut exth_count_bytes = [0u8; 4]; reader.read_exact(&mut exth_count_bytes)?; let exth_count = u32::from_be_bytes(exth_count_bytes) as usize;
let mut cover_offset: Option<u32> = None; let first_img_idx = u32::from_be_bytes([ mobi_header[108], mobi_header[109], mobi_header[110], mobi_header[111], ]);
for _ in 0..exth_count { let mut rec_header = [0u8; 8]; if reader.read_exact(&mut rec_header).is_err() { break; } let rec_type = u32::from_be_bytes([rec_header[0], rec_header[1], rec_header[2], rec_header[3]]); let rec_len = u32::from_be_bytes([rec_header[4], rec_header[5], rec_header[6], rec_header[7]]) as usize;
let data_len = rec_len.saturating_sub(8); let mut data = vec![0u8; data_len]; if reader.read_exact(&mut data).is_err() { break; }
if rec_type == 201 && data_len >= 4 { cover_offset = Some(u32::from_be_bytes([data[0], data[1], data[2], data[3]])); } }
let cover_record_idx = if let Some(offset) = cover_offset { first_img_idx + offset } else { first_img_idx };
if cover_record_idx as usize >= record_offsets.len() { return Err(anyhow!("Cover record index out of bounds")); }
let start = record_offsets[cover_record_idx as usize] as u64; let end = if (cover_record_idx as usize + 1) < record_offsets.len() { record_offsets[cover_record_idx as usize + 1] as u64 } else { reader.seek(SeekFrom::End(0))?; reader.stream_position()? };
let len = (end - start) as usize; reader.seek(SeekFrom::Start(start))?; let mut cover_data = vec![0u8; len]; reader.read_exact(&mut cover_data)?;
if cover_data.starts_with(&[0xFF, 0xD8, 0xFF]) || cover_data.starts_with(&[0x89, 0x50, 0x4E, 0x47]) || cover_data.starts_with(b"GIF") { return Ok(cover_data); }
Err(anyhow!("No valid cover image found in MOBI"))}
// ─────────────────────────────────────────────────────────────────────────────// CBZ extraction// ─────────────────────────────────────────────────────────────────────────────
/// Extract cover image from CBZ (comic book ZIP) file.pub fn extract_cbz_cover_bytes<R: Read + Seek>(reader: R) -> Result<Vec<u8>> { let mut archive = ZipArchive::new(reader)?;
let mut images: Vec<(usize, String)> = Vec::new(); for i in 0..archive.len() { let file = archive.by_index(i)?; let name = file.name().to_string(); drop(file);
if is_image_extension(&name.to_lowercase()) { images.push((i, name)); } }
images.sort_by(|a, b| a.1.cmp(&b.1));
if let Some((idx, _)) = images.first() { let mut file = archive.by_index(*idx)?; let mut buf = Vec::new(); file.read_to_end(&mut buf)?; return Ok(buf); }
Err(anyhow!("No images found in CBZ"))}
// ─────────────────────────────────────────────────────────────────────────────// FB2 extraction// ─────────────────────────────────────────────────────────────────────────────
/// Extract cover image from FB2 (FictionBook) file.pub fn extract_fb2_cover_bytes<R: Read>(mut reader: R) -> Result<Vec<u8>> { let mut content = String::new(); reader.read_to_string(&mut content)?;
let cover_id = if let Some(start) = content.find("<coverpage>") { let end = content[start..].find("</coverpage>").unwrap_or(500); let coverpage = &content[start..start + end]; if let Some(href_pos) = coverpage.find("href=\"#") { let id_start = href_pos + 7; let id_end = coverpage[id_start..].find('"').unwrap_or(50); Some(coverpage[id_start..id_start + id_end].to_string()) } else if let Some(href_pos) = coverpage.find("l:href=\"#") { let id_start = href_pos + 9; let id_end = coverpage[id_start..].find('"').unwrap_or(50); Some(coverpage[id_start..id_start + id_end].to_string()) } else { None } } else { None };
let search_pattern = if let Some(ref id) = cover_id { format!("<binary id=\"{}\"", id) } else { "<binary".to_string() };
if let Some(pos) = content.find(&search_pattern) { if let Some(tag_end) = content[pos..].find('>') { let data_start = pos + tag_end + 1; if let Some(data_end) = content[data_start..].find("</binary>") { let b64_data = content[data_start..data_start + data_end].trim(); let b64_clean: String = b64_data.chars().filter(|c| !c.is_whitespace()).collect(); let bytes = general_purpose::STANDARD.decode(&b64_clean)?; return Ok(bytes); } } }
if cover_id.is_some() { if let Some(pos) = content.find("<binary") { if let Some(tag_end) = content[pos..].find('>') { let data_start = pos + tag_end + 1; if let Some(data_end) = content[data_start..].find("</binary>") { let b64_data = content[data_start..data_start + data_end].trim(); let b64_clean: String = b64_data.chars().filter(|c| !c.is_whitespace()).collect(); let bytes = general_purpose::STANDARD.decode(&b64_clean)?; return Ok(bytes); } } } }
Err(anyhow!("No cover image found in FB2"))}
// ─────────────────────────────────────────────────────────────────────────────// TXT "cover" (placeholder)// ─────────────────────────────────────────────────────────────────────────────
/// Generate a placeholder thumbnail for TXT files.pub fn extract_txt_cover_bytes<R: Read>(mut reader: R, size: u32) -> Result<Vec<u8>> { let mut buf = vec![0u8; 4096]; let _n = reader.read(&mut buf)?;
let mut img = image::RgbaImage::from_pixel(size, size, Rgba([245, 245, 245, 255]));
for x in 0..size { img.put_pixel(x, 0, Rgba([200, 200, 200, 255])); img.put_pixel(x, size - 1, Rgba([200, 200, 200, 255])); } for y in 0..size { img.put_pixel(0, y, Rgba([200, 200, 200, 255])); img.put_pixel(size - 1, y, Rgba([200, 200, 200, 255])); }
let mut out = Vec::new(); DynamicImage::ImageRgba8(img).write_to(&mut Cursor::new(&mut out), image::ImageFormat::Png)?; Ok(out)}
// ─────────────────────────────────────────────────────────────────────────────// Unified extraction by extension// ─────────────────────────────────────────────────────────────────────────────
/// Extract cover image bytes based on file extension.pub fn extract_cover_bytes_by_ext(path: &Path, ext: &str) -> Result<Vec<u8>> { let file = std::fs::File::open(path)?; match ext.to_lowercase().as_str() { "epub" => extract_epub_cover_bytes(file), "mobi" | "azw" | "azw3" | "kf8" | "prc" => extract_mobi_cover_bytes(file), "cbz" | "cbr" => extract_cbz_cover_bytes(file), "fb2" => extract_fb2_cover_bytes(file), "txt" => extract_txt_cover_bytes(file, 256), _ => Err(anyhow!("Unsupported format: {}", ext)), }}
// ─────────────────────────────────────────────────────────────────────────────// Thumbnail creation with overlay// ─────────────────────────────────────────────────────────────────────────────
/// Create a thumbnail from cover image bytes with Readest icon overlay.pub fn create_thumbnail_with_overlay(cover_bytes: &[u8], requested_size: u32) -> Result<Vec<u8>> { let img = image::load_from_memory(cover_bytes)?; let thumbnail = img.thumbnail(requested_size, requested_size);
let overlay_img = load_overlay_icon();
let mut base = thumbnail.to_rgba8(); let (base_w, base_h) = (base.width(), base.height());
if let Some(ov) = overlay_img { let overlay_size = (requested_size / 5).clamp(24, 48); let ov_resized = ov.resize(overlay_size, overlay_size, imageops::FilterType::Lanczos3); let ovb = ov_resized.to_rgba8(); let (ov_w, ov_h) = (ovb.width(), ovb.height());
let x = base_w.saturating_sub(ov_w + 4); let y = base_h.saturating_sub(ov_h + 4);
for oy in 0..ov_h { for ox in 0..ov_w { let dst_x = x + ox; let dst_y = y + oy;
if dst_x < base_w && dst_y < base_h { let src_pixel = ovb.get_pixel(ox, oy); let alpha = src_pixel.0[3] as f32 / 255.0;
if alpha > 0.0 { let dst_pixel = base.get_pixel(dst_x, dst_y); let mut result = dst_pixel.0;
for c in 0..3 { let fg = src_pixel.0[c] as f32; let bg = result[c] as f32; result[c] = (fg * alpha + bg * (1.0 - alpha)) as u8; } result[3] = 255;
base.put_pixel(dst_x, dst_y, Rgba(result)); } } } } }
let mut out = Vec::new(); DynamicImage::ImageRgba8(base).write_to(&mut Cursor::new(&mut out), image::ImageFormat::Png)?; Ok(out)}
/// Load the Readest overlay icon.fn load_overlay_icon() -> Option<DynamicImage> { // Try embedded icon let icon_bytes = include_bytes!("../../../public/icon.png"); if let Ok(img) = image::load_from_memory(icon_bytes) { return Some(img); }
// Fallback: try loading from filesystem if let Ok(exe) = std::env::current_exe() { let candidates = [ exe.parent().map(|p| p.join("icon.png")), exe.parent().map(|p| p.join("resources").join("icon.png")), exe.parent() .and_then(|p| p.parent()) .map(|p| p.join("resources").join("icon.png")), ];
for candidate in candidates.into_iter().flatten() { if candidate.exists() { if let Ok(bytes) = std::fs::read(&candidate) { if let Ok(img) = image::load_from_memory(&bytes) { return Some(img); } } } } }
None}
// ─────────────────────────────────────────────────────────────────────────────// Caching// ─────────────────────────────────────────────────────────────────────────────
/// Generate a thumbnail with disk caching.pub fn cached_thumbnail_for_path(path: &Path, ext: &str, size: u32) -> Result<Vec<u8>> { // Compute cache key by hashing file parts for stability without loading entire file let mut hasher = Context::new(); hasher.consume(ext.as_bytes()); hasher.consume(&size.to_le_bytes());
let file = std::fs::File::open(path)?; let metadata = file.metadata()?; let file_len = metadata.len();
// Read partial chunks like the TypeScript partialMD5 implementation const STEP: u64 = 1024; const SIZE: u64 = 1024; let mut file = file;
for i in -1i32..=10 { let pos = if i == -1 { 256u64 } else { STEP << (2 * i as u32) }; let start = pos.min(file_len); let end = (start + SIZE).min(file_len);
if start >= file_len { break; }
file.seek(SeekFrom::Start(start))?; let mut buf = vec![0u8; (end - start) as usize]; file.read_exact(&mut buf)?; hasher.consume(&buf); }
let digest = hasher.finalize(); let key = format!("{:x}.png", digest);
if let Some(ref dir) = *CACHE_DIR { let cache_path = dir.join(&key); if cache_path.exists() { if let Ok(cached) = std::fs::read(&cache_path) { return Ok(cached); } } }
let cover = extract_cover_bytes_by_ext(path, ext)?; let thumbnail = create_thumbnail_with_overlay(&cover, size)?;
if let Some(ref dir) = *CACHE_DIR { let cache_path = dir.join(&key); let _ = std::fs::write(&cache_path, &thumbnail); }
Ok(thumbnail)}
// ─────────────────────────────────────────────────────────────────────────────// Helper functions// ─────────────────────────────────────────────────────────────────────────────
fn is_image_extension(name: &str) -> bool { name.ends_with(".jpg") || name.ends_with(".jpeg") || name.ends_with(".png") || name.ends_with(".gif") || name.ends_with(".webp") || name.ends_with(".bmp")}
fn read_zip_file_to_string<R: Read + Seek>( archive: &mut ZipArchive<R>, name: &str,) -> Result<String> { let mut file = archive.by_name(name)?; let mut content = String::new(); file.read_to_string(&mut content)?; Ok(content)}
fn read_zip_file_to_bytes<R: Read + Seek>( archive: &mut ZipArchive<R>, name: &str,) -> Result<Vec<u8>> { let mut file = archive.by_name(name)?; let mut buf = Vec::new(); file.read_to_end(&mut buf)?; Ok(buf)}
fn extract_attribute(xml: &str, tag: &str, attr: &str) -> Option<String> { let pattern = format!("<{}", tag); if let Some(tag_pos) = xml.find(&pattern) { let tag_end = xml[tag_pos..].find('>').unwrap_or(500) + tag_pos; let tag_content = &xml[tag_pos..tag_end];
let attr_pattern = format!("{}=\"", attr); if let Some(attr_pos) = tag_content.find(&attr_pattern) { let value_start = attr_pos + attr_pattern.len(); if let Some(value_end) = tag_content[value_start..].find('"') { return Some(tag_content[value_start..value_start + value_end].to_string()); } } } None}
fn find_cover_id_in_opf(opf: &str) -> Option<String> { if let Some(pos) = opf.find("name=\"cover\"") { let window_start = pos.saturating_sub(50); let window_end = (pos + 100).min(opf.len()); let window = &opf[window_start..window_end];
if let Some(content_pos) = window.find("content=\"") { let start = content_pos + 9; if let Some(end) = window[start..].find('"') { return Some(window[start..start + end].to_string()); } } }
if let Some(pos) = opf.find("properties=\"cover-image\"") { let window_start = pos.saturating_sub(200); let window_end = pos; let window = &opf[window_start..window_end];
if let Some(id_pos) = window.rfind("id=\"") { let start = id_pos + 4; if let Some(end) = window[start..].find('"') { return Some(window[start..start + end].to_string()); } } }
None}
fn find_href_by_id_in_opf(opf: &str, id: &str) -> Option<String> { let pattern = format!("id=\"{}\"", id); if let Some(pos) = opf.find(&pattern) { let window_start = pos.saturating_sub(10); let window_end = (pos + 200).min(opf.len()); let window = &opf[window_start..window_end];
if let Some(href_pos) = window.find("href=\"") { let start = href_pos + 6; if let Some(end) = window[start..].find('"') { return Some(window[start..start + end].to_string()); } } } None}
fn find_first_image_in_manifest(opf: &str) -> Option<String> { let manifest_start = opf.find("<manifest")?; let manifest_end = opf[manifest_start..] .find("</manifest>") .map(|e| manifest_start + e)?; let manifest = &opf[manifest_start..manifest_end];
for media_type in ["image/jpeg", "image/png", "image/gif", "image/webp"] { let pattern = format!("media-type=\"{}\"", media_type); if let Some(pos) = manifest.find(&pattern) { let window_start = pos.saturating_sub(200); let window = &manifest[window_start..pos];
if let Some(href_pos) = window.rfind("href=\"") { let start = href_pos + 6; if let Some(end) = window[start..].find('"') { return Some(window[start..start + end].to_string()); } } } }
None}12345678910111213//! Windows Thumbnail Provider for Readest//!//! This module provides Windows Explorer thumbnail support for eBook files.//! Thumbnails are only shown when Readest is set as the default application.//!//! Supported formats: EPUB, MOBI, AZW, AZW3, KF8, FB2, CBZ, CBR
#![allow(non_snake_case)]
mod com_provider;mod extraction;
pub use extraction::*;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960module.exports = { input: ['src/**/*.{js,jsx,ts,tsx}', '!src/**/*.test.{js,jsx,ts,tsx}'], output: '.', options: { debug: false, sort: false, func: { list: ['_'], extensions: ['.js', '.jsx', '.ts', '.tsx'], }, lngs: [ 'de', 'ja', 'es', 'fa', 'fr', 'it', 'el', 'ko', 'uk', 'nl', 'sv', 'pl', 'pt', 'ru', 'tr', 'hi', 'id', 'vi', 'ms', 'he', 'ar', 'th', 'bo', 'bn', 'ta', 'si', 'zh-CN', 'zh-TW', ], ns: ['translation'], defaultNs: 'translation', defaultValue: '__STRING_NOT_TRANSLATED__', resource: { loadPath: './public/locales/{{lng}}/{{ns}}.json', savePath: './public/locales/{{lng}}/{{ns}}.json', jsonIndent: 2, lineEnding: '\n', }, keySeparator: false, nsSeparator: false, interpolation: { prefix: '{{', suffix: '}}', }, metadata: {}, allowDynamicKeys: true, removeUnusedKeys: true, },};123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106import withSerwistInit from '@serwist/next';import withBundleAnalyzer from '@next/bundle-analyzer';
const isDev = process.env['NODE_ENV'] === 'development';const appPlatform = process.env['NEXT_PUBLIC_APP_PLATFORM'];
if (isDev) { const { initOpenNextCloudflareForDev } = await import('@opennextjs/cloudflare'); initOpenNextCloudflareForDev();}
const exportOutput = appPlatform !== 'web' && !isDev;
/** @type {import('next').NextConfig} */const nextConfig = { // Ensure Next.js uses SSG instead of SSR // https://nextjs.org/docs/pages/building-your-application/deploying/static-exports output: exportOutput ? 'export' : undefined, pageExtensions: exportOutput ? ['jsx', 'tsx'] : ['js', 'jsx', 'ts', 'tsx'], // Note: This feature is required to use the Next.js Image component in SSG mode. // See https://nextjs.org/docs/messages/export-image-api for different workarounds. images: { unoptimized: true, }, devIndicators: false, // Configure assetPrefix or else the server won't properly resolve your assets. assetPrefix: '', reactStrictMode: true, serverExternalPackages: ['isows'], webpack: (config) => { config.resolve.alias = { ...config.resolve.alias, nunjucks: 'nunjucks/browser/nunjucks.js', }; return config; }, turbopack: { resolveAlias: { nunjucks: 'nunjucks/browser/nunjucks.js', }, }, transpilePackages: [ 'ai', 'ai-sdk-ollama', '@ai-sdk/react', '@assistant-ui/react', '@assistant-ui/react-ai-sdk', '@assistant-ui/react-markdown', 'streamdown', ...(isDev ? [] : [ 'i18next-browser-languagedetector', 'react-i18next', 'i18next', '@tauri-apps', 'highlight.js', 'foliate-js', 'marked', ]), ], async headers() { return [ { source: '/.well-known/apple-app-site-association', headers: [ { key: 'Content-Type', value: 'application/json', }, ], }, { source: '/_next/static/:path*', headers: [ { key: 'Cache-Control', value: isDev ? 'public, max-age=0, must-revalidate' : 'public, max-age=31536000, immutable', }, ], }, ]; },};
const pwaDisabled = isDev || appPlatform !== 'web';
const withPWA = pwaDisabled ? (config) => config : withSerwistInit({ swSrc: 'src/sw.ts', swDest: 'public/sw.js', cacheOnNavigation: true, reloadOnOnline: true, disable: false, register: true, scope: '/', });
const withAnalyzer = withBundleAnalyzer({ enabled: process.env.ANALYZE === 'true',});
export default withPWA(withAnalyzer(nextConfig));123456import { defineCloudflareConfig } from '@opennextjs/cloudflare';import r2IncrementalCache from '@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache';
export default defineCloudflareConfig({ incrementalCache: r2IncrementalCache,});123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198{ "name": "@readest/readest-app", "version": "0.9.100", "private": true, "scripts": { "dev": "dotenv -e .env.tauri -- next dev", "build": "dotenv -e .env.tauri -- next build", "start": "dotenv -e .env.tauri -- next start", "dev-web": "dotenv -e .env.web -- next dev", "build-web": "dotenv -e .env.web -- next build", "start-web": "dotenv -e .env.web -- next start", "build-tauri": "dotenv -e .env.tauri -- next build", "i18n:extract": "i18next-scanner", "lint": "eslint .", "test": "dotenv -e .env -e .env.test.local vitest", "tauri": "tauri", "clippy": "cargo clippy -p Readest --no-deps -- -D warnings", "format": "pnpm -w format", "format:check": "pnpm -w format:check", "prepare-public-vendor": "mkdirp ./public/vendor/pdfjs ./public/vendor/simplecc", "copy-pdfjs-js": "cpx \"../../packages/foliate-js/node_modules/pdfjs-dist/legacy/build/{pdf.worker.min.mjs,pdf.min.mjs,pdf.d.mts}\" ./public/vendor/pdfjs", "copy-pdfjs-wasm": "cpx \"../../packages/foliate-js/node_modules/pdfjs-dist/wasm/{openjpeg.wasm,qcms_bg.wasm}\" ./public/vendor/pdfjs", "copy-pdfjs-fonts": "cpx \"../../packages/foliate-js/node_modules/pdfjs-dist/{cmaps,standard_fonts}/*\" ./public/vendor/pdfjs", "copy-flatten-pdfjs-annotation-layer-css": "npx postcss \"../../packages/foliate-js/vendor/pdfjs/annotation_layer_builder.css\" --no-map -u postcss-nested > ./public/vendor/pdfjs/annotation_layer_builder.css", "copy-flatten-pdfjs-text-layer-css": "npx postcss \"../../packages/foliate-js/vendor/pdfjs/text_layer_builder.css\" --no-map -u postcss-nested > ./public/vendor/pdfjs/text_layer_builder.css", "copy-flatten-pdfjs-css": "pnpm copy-flatten-pdfjs-annotation-layer-css && pnpm copy-flatten-pdfjs-text-layer-css", "copy-pdfjs": "pnpm copy-pdfjs-js && pnpm copy-pdfjs-wasm && pnpm copy-pdfjs-fonts && pnpm copy-flatten-pdfjs-css", "copy-simplecc": "cpx \"../../packages/simplecc-wasm/dist/web/*\" ./public/vendor/simplecc", "setup-pdfjs": "pnpm prepare-public-vendor && pnpm copy-pdfjs", "setup-simplecc": "pnpm prepare-public-vendor && pnpm copy-simplecc", "setup-vendors": "pnpm setup-pdfjs && pnpm setup-simplecc", "build-win-x64": "dotenv -e .env.tauri.local -- tauri build --target i686-pc-windows-msvc --bundles nsis", "build-win-arm64": "dotenv -e .env.tauri.local -- tauri build --target aarch64-pc-windows-msvc --bundles nsis", "build-linux-x64": "dotenv -e .env.tauri.local -- tauri build --target x86_64-unknown-linux-gnu --bundles appimage", "build-macos-universial": "dotenv -e .env.tauri.local -e .env.apple-nonstore.local -- tauri build -t universal-apple-darwin --bundles dmg", "build-macos-universial-appstore": "dotenv -e .env.tauri.local -e .env.apple-appstore.local -- tauri build -t universal-apple-darwin --bundles app --config src-tauri/tauri.appstore.conf.json", "build-macos-universial-appstore-dev": "dotenv -e .env.tauri.local -e .env.apple-appstore-dev.local -- tauri build -t universal-apple-darwin --bundles app --config src-tauri/tauri.appstore-dev.conf.json", "build-ios": "dotenv -e .env.ios-appstore-dev.local -- tauri ios build", "build-ios-appstore": "dotenv -e .env.ios-appstore.local -- tauri ios build --export-method app-store-connect", "release-macos-universial-appstore": "dotenv -e .env.tauri.local -e .env.apple-appstore.local -- bash scripts/release-mac-appstore.sh", "release-ios-appstore": "dotenv -e .env.ios-appstore.local -- bash scripts/release-ios-appstore.sh", "release-google-play": "dotenv -e .env.google-play.local -- bash scripts/release-google-play.sh", "config-wrangler": "sed -i \"s/\\${TRANSLATIONS_KV_ID}/$TRANSLATIONS_KV_ID/g\" wrangler.toml", "preview": "pnpm patch-build-webpack && NEXT_PUBLIC_APP_PLATFORM=web opennextjs-cloudflare build && pnpm restore-build-original && opennextjs-cloudflare preview --ip 0.0.0.0 --port 3001", "deploy": "pnpm patch-build-webpack && NEXT_PUBLIC_APP_PLATFORM=web opennextjs-cloudflare build && pnpm restore-build-original && opennextjs-cloudflare deploy", "upload": "pnpm patch-build-webpack && NEXT_PUBLIC_APP_PLATFORM=web opennextjs-cloudflare build && pnpm restore-build-original && opennextjs-cloudflare upload", "cf-typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts", "patch-build-webpack": "if [ \"$(uname)\" = \"Darwin\" ]; then sed -i '' 's/next build\"/next build --webpack\"/' package.json; else sed -i 's/next build\"/next build --webpack\"/' package.json; fi", "restore-build-original": "if [ \"$(uname)\" = \"Darwin\" ]; then sed -i '' 's/next build --webpack\"/next build\"/' package.json; else sed -i 's/next build --webpack\"/next build\"/' package.json; fi", "update-metadata": "bash ./scripts/sync-release-notes.sh release-notes.json ../../data/metainfo/appdata.xml", "check:optional-chaining": "count=$(grep -rno '\\?\\.[a-zA-Z_$]' .next/static/chunks/* out/_next/static/chunks/* | wc -l); if [ \"$count\" -gt 0 ]; then echo '❌ Optional chaining found in output!'; exit 1; else echo '✅ No optional chaining found.'; fi", "check:translations": "count=$(grep -rno '__STRING_NOT_TRANSLATED__' public/locales/* | wc -l); if [ \"$count\" -gt 0 ]; then echo '❌ Untranslated strings found!'; exit 1; else echo '✅ All strings translated.'; fi", "check:lookbehind-regex": "count=$(grep -rnoE '\\(\\?<[!=]' .next/static/chunks/* out/_next/static/chunks/* | wc -l); if [ \"$count\" -gt 0 ]; then echo '❌ Lookbehind regex found in output!'; exit 1; else echo '✅ No lookbehind regex found.'; fi", "check:all": "pnpm check:translations && pnpm check:lookbehind-regex", "build-check": "pnpm build && pnpm build-web && pnpm check:all" }, "dependencies": { "@ai-sdk/react": "^3.0.49", "@assistant-ui/react": "0.11.56", "@assistant-ui/react-ai-sdk": "1.1.21", "@assistant-ui/react-markdown": "0.11.9", "@aws-sdk/client-s3": "^3.735.0", "@aws-sdk/s3-request-presigner": "^3.735.0", "@choochmeque/tauri-plugin-sharekit-api": "^0.3.0", "@fabianlars/tauri-plugin-oauth": "2", "@opennextjs/cloudflare": "^1.15.1", "@radix-ui/react-collapsible": "^1.1.12", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-hover-card": "^1.1.15", "@radix-ui/react-scroll-area": "^1.2.10", "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.8", "@radix-ui/react-slot": "^1.2.4", "@radix-ui/react-tabs": "^1.1.13", "@radix-ui/react-tooltip": "^1.2.8", "@serwist/next": "^9.4.2", "@stripe/react-stripe-js": "^3.7.0", "@stripe/stripe-js": "^7.4.0", "@supabase/auth-ui-react": "^0.4.7", "@supabase/auth-ui-shared": "^0.1.8", "@supabase/supabase-js": "^2.76.1", "@tauri-apps/api": "2.9.1", "@tauri-apps/plugin-cli": "^2.4.1", "@tauri-apps/plugin-deep-link": "^2.4.6", "@tauri-apps/plugin-dialog": "^2.6.0", "@tauri-apps/plugin-fs": "^2.4.5", "@tauri-apps/plugin-haptics": "^2.3.2", "@tauri-apps/plugin-http": "^2.5.6", "@tauri-apps/plugin-log": "^2.8.0", "@tauri-apps/plugin-opener": "^2.5.3", "@tauri-apps/plugin-os": "^2.3.2", "@tauri-apps/plugin-process": "^2.3.1", "@tauri-apps/plugin-shell": "~2.3.4", "@tauri-apps/plugin-updater": "^2.9.0", "@tauri-apps/plugin-websocket": "~2.4.2", "@zip.js/zip.js": "^2.8.16", "abortcontroller-polyfill": "^1.7.8", "ai": "^6.0.47", "ai-sdk-ollama": "^3.2.0", "app-store-server-api": "^0.17.1", "aws4fetch": "^1.0.20", "buffer": "^6.0.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", "cors": "^2.8.5", "dayjs": "^1.11.13", "dompurify": "^3.3.0", "foliate-js": "workspace:*", "franc-min": "^6.2.0", "fzf": "^0.5.2", "google-auth-library": "^10.5.0", "googleapis": "^164.1.0", "highlight.js": "^11.11.1", "i18next": "^24.2.0", "i18next-browser-languagedetector": "^8.0.2", "i18next-http-backend": "^3.0.1", "iso-639-2": "^3.0.2", "iso-639-3": "^3.0.1", "isomorphic-ws": "^5.0.0", "js-md5": "^0.8.3", "jwt-decode": "^4.0.0", "lucide-react": "^0.562.0", "lunr": "^2.3.9", "marked": "^15.0.12", "nanoid": "^5.1.6", "next": "16.1.6", "nunjucks": "^3.2.4", "overlayscrollbars": "^2.11.4", "overlayscrollbars-react": "^0.5.6", "posthog-js": "^1.246.0", "react": "19.2.0", "react-color": "^2.19.3", "react-dom": "19.2.0", "react-i18next": "^15.2.0", "react-icons": "^5.4.0", "react-responsive": "^10.0.0", "react-virtuoso": "^4.17.0", "react-window": "^1.8.11", "remark-gfm": "^4.0.1", "semver": "^7.7.1", "streamdown": "^1.6.10", "stripe": "^18.2.1", "styled-jsx": "^5.1.7", "tailwind-merge": "^3.4.0", "tinycolor2": "^1.6.0", "uuid": "^11.1.0", "ws": "^8.18.3", "zod": "^4.0.8", "zustand": "5.0.10" }, "devDependencies": { "@next/bundle-analyzer": "^15.4.2", "@tailwindcss/typography": "^0.5.16", "@tauri-apps/cli": "2.9.6", "@testing-library/dom": "^10.4.0", "@testing-library/react": "^16.3.0", "@types/cors": "^2.8.17", "@types/cssbeautify": "^0.3.5", "@types/lunr": "^2.3.7", "@types/node": "^22.15.31", "@types/nunjucks": "^3.2.6", "@types/react": "^19.0.0", "@types/react-color": "^3.0.13", "@types/react-dom": "^19.0.0", "@types/react-window": "^1.8.8", "@types/semver": "^7.7.0", "@types/tinycolor2": "^1.4.6", "@types/uuid": "^10.0.0", "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^8.48.0", "@typescript-eslint/parser": "^8.48.0", "@vitejs/plugin-react": "^5.1.1", "autoprefixer": "^10.4.20", "caniuse-lite": "^1.0.30001746", "cpx2": "^8.0.0", "daisyui": "^4.12.24", "dotenv-cli": "^7.4.4", "eslint": "^9.16.0", "eslint-config-next": "16.0.0", "eslint-plugin-jsx-a11y": "^6.10.2", "i18next-scanner": "^4.6.0", "jsdom": "^26.1.0", "mkdirp": "^3.0.1", "node-env-run": "^4.0.2", "postcss": "^8.4.49", "postcss-cli": "^11.0.0", "postcss-nested": "^7.0.2", "raw-loader": "^4.0.2", "serwist": "^9.3.0", "tailwindcss": "^3.4.18", "typescript": "^5.7.2", "vite-tsconfig-paths": "^5.1.4", "vitest": "^4.0.15", "wrangler": "^4.60.0" }}123456789/** @type {import('postcss-load-config').Config} */const config = { plugins: { tailwindcss: {}, autoprefixer: {}, },};
export default config;1234567891011121314151617{ "applinks": { "details": [ { "appIDs": [ "J5W48D69VR.com.bilingify.readest" ], "components": [ { "/": "/auth/*", "comment": "Matches any URL whose path starts with /auth/" } ] } ] }}12345678910111213141516[ { "relation": [ "delegate_permission/common.handle_all_urls", "delegate_permission/common.get_login_creds" ], "target": { "namespace": "android_app", "package_name": "com.bilingify.readest", "sha256_cert_fingerprints": [ "65:2D:11:67:76:12:29:14:18:42:CB:3D:18:50:B6:E4:7E:46:E1:2F:4B:E4:7F:5A:6C:14:B6:D7:12:74:1E:82", "E0:E7:60:55:80:8D:3A:DE:A0:D1:CF:7C:20:85:40:A3:DD:4B:E6:4D:17:5C:0F:DE:26:57:7D:9C:5B:29:5F:51" ] } }]1ed533042-5626-4704-b5f2-fa3bbd1136ed123version https://git-lfs.github.com/spec/v1oid sha256:e564f652916db6c139570fefb9524a77c4d48f30c92928de9db19b6b5c7a262asize 387976.dockerignoreAdded+31
.editorconfigAdded+3
.gitattributes+2
.github/FUNDING.ymlAdded+15
.github/ISSUE_TEMPLATE/feature-request.mdAdded+23
.github/ISSUE_TEMPLATE/report-bug.mdAdded+35
.github/dependabot.ymlAdded+13
.github/workflows/pull-request.ymlAdded+93
.github/workflows/release.ymlAdded+401
.github/workflows/retry-workflow.ymlAdded+18
.github/workflows/upload-to-r2.ymlAdded+77
.github/workflows/vercel-merge.ymlAdded+23
.gitignoreAdded+49
.gitmodulesAdded+12
.prettierignoreAdded+34
.prettierrc.jsonAdded+10
.vscode/extensions.jsonAdded+8
.vscode/settings.jsonAdded+31
CONTRIBUTING.mdAdded+104
Cargo.lockAdded
Cargo.tomlAdded+42
DockerfileAdded+40
LICENSEAdded+661
README.mdAdded+362
apps/readest-app/.envAdded+12
apps/readest-app/.env.local.exampleAdded+32
apps/readest-app/.env.tauriAdded+3
apps/readest-app/.env.tauri.exampleAdded+2
apps/readest-app/.env.webAdded+1
apps/readest-app/.env.web.exampleAdded+3
apps/readest-app/.gitignoreAdded+62
apps/readest-app/components.jsonAdded+22
apps/readest-app/eslint.config.mjsAdded+35
apps/readest-app/extensions/windows-thumbnail/Cargo.lockAdded+588
apps/readest-app/extensions/windows-thumbnail/Cargo.tomlAdded+31
apps/readest-app/extensions/windows-thumbnail/README.mdAdded+134
apps/readest-app/extensions/windows-thumbnail/src/com_provider.rsAdded+506
apps/readest-app/extensions/windows-thumbnail/src/extraction.rsAdded+648
apps/readest-app/extensions/windows-thumbnail/src/mod.rsAdded+13
apps/readest-app/i18next-scanner.config.jsAdded+60
apps/readest-app/next.config.mjsAdded+106
apps/readest-app/open-next.config.tsAdded+6
apps/readest-app/package.jsonAdded+198
apps/readest-app/postcss.config.mjsAdded+9
apps/readest-app/public/.well-known/apple-app-site-associationAdded+17
apps/readest-app/public/.well-known/assetlinks.jsonAdded+16
apps/readest-app/public/.well-known/org.flathub.VerifiedApps.txtAdded+1
apps/readest-app/public/apple-touch-icon.pngAdded
Large File Pointer Details
- SHA256: bf7c5003595f80353d7223b2383473ef0c21522cb30385cd327bcc9242b45f6d
- Pointer size: 130 Bytes
- Size of remote file: 70.5 kB
apps/readest-app/public/favicon.icoAdded
apps/readest-app/public/fonts/InterVariable-Italic.woff2Added+3