### Install and Run Development Server Source: https://github.com/jefferyhcool/bilinote/blob/master/BillNote_extension/README.md Install dependencies and start the development server in watch mode. The output will be generated in the ./extension/ directory. ```bash cd BillNote_extension pnpm install pnpm dev # watch 模式,产物输出到 ./extension/ ``` -------------------------------- ### Install Frontend Dependencies and Run Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Install Node.js dependencies for the frontend using pnpm and start the Vite development server. Access the application at http://localhost:3015. ```bash cd BillNote_frontend pnpm install pnpm dev ``` -------------------------------- ### Install Backend Dependencies and Run Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Install Python dependencies for the backend using pip and then run the FastAPI application. Ensure you are in the 'backend' directory. ```bash cd backend pip install -r requirements.txt python main.py ``` -------------------------------- ### Frontend Development Command Source: https://github.com/jefferyhcool/bilinote/blob/master/CONTRIBUTING.md Commands to install dependencies and start the React frontend development server. ```bash pnpm install && pnpm dev ``` -------------------------------- ### Build and Run BiliNote with Docker Compose Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Use docker-compose to build and run BiliNote locally. Copy the example environment file to .env before building. For GPU acceleration, use the docker-compose.gpu.yml file. ```bash cp .env.example .env docker-compose up --build -d ``` ```bash docker-compose -f docker-compose.gpu.yml up --build -d ``` -------------------------------- ### Run BiliNote with Docker Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Pull the pre-built Docker image and run a container for BiliNote. Ensure Docker is installed. Access the application at http://localhost. ```bash docker pull ghcr.io/jefferyhcool/bilinote:latest docker run -d -p 80:80 \ -v bilinote-data:/app/backend/data \ --name bilinote \ ghcr.io/jefferyhcool/bilinote:latest ``` -------------------------------- ### Backend Development Command Source: https://github.com/jefferyhcool/bilinote/blob/master/CONTRIBUTING.md Command to install dependencies and run the Python backend server. ```bash pip install -r requirements.txt && python main.py ``` -------------------------------- ### Install FFmpeg on Ubuntu/Debian Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Install FFmpeg on Ubuntu or Debian-based Linux distributions using apt. FFmpeg is required for audio processing and transcoding when deploying from source. ```bash sudo apt install ffmpeg ``` -------------------------------- ### Clone BiliNote Repository Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Clone the BiliNote project from GitHub and navigate into the project directory. Copy the example environment file to .env to configure the application. ```bash git clone https://github.com/JefferyHcool/BiliNote.git cd BiliNote mv .env.example .env ``` -------------------------------- ### Install FFmpeg on Mac Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Install FFmpeg on macOS using Homebrew. FFmpeg is required for audio processing and transcoding when deploying from source. ```bash brew install ffmpeg ``` -------------------------------- ### Branch Naming Conventions Source: https://github.com/jefferyhcool/bilinote/blob/master/CONTRIBUTING.md Examples of valid branch names for different types of development work, including features, fixes, releases, and hotfixes. ```bash feature/-<事项> fix/-<事项> release/<版本号> hotfix/-<事项> ``` ```bash # 功能开发 feature/extension-side-panel feature/youtube-subtitle-innertube feature/backend-rag-chat # 开发期修复 fix/extension-task-status-unwrap fix/bilibili-cookie-injection fix/mlx-whisper-repo-id # 发版 release/2.1.0 release/2.2.0 # 线上热修 hotfix/backend-cors-regex hotfix/frontend-provider-switch ``` -------------------------------- ### Commit Message Format Source: https://github.com/jefferyhcool/bilinote/blob/master/CONTRIBUTING.md Standard format for commit messages, including type, scope, and subject, with examples and explanations of each component. ```bash type(scope): subject ``` ```bash feat(extension): 侧边栏接入思维导图(markmap)与 RAG 问答 fix(bilibili): 修正字幕优先链路在未登录态下的回退 docs(contributing): 新增贡献指南 chore(ci): 优化 docker 构建缓存 ``` -------------------------------- ### Run BiliNote with Docker Compose (Standard and GPU) Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Deploy BiliNote using docker-compose. Use the standard docker-compose.yml for general deployment or docker-compose.gpu.yml for GPU-accelerated deployment, which requires an NVIDIA GPU. ```bash # Standard deployment docker-compose up -d # GPU acceleration deployment (requires NVIDIA GPU) docker-compose -f docker-compose.gpu.yml up -d ``` -------------------------------- ### View BiliNote Backend Logs Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Monitor the backend logs of the BiliNote container to diagnose startup issues or errors. Look for startup progress indicators or failure messages. ```bash docker logs -f bilinote-backend ``` -------------------------------- ### Version Release Process Source: https://github.com/jefferyhcool/bilinote/blob/master/CONTRIBUTING.md Commands and steps for creating a release branch, preparing the release, tagging, and merging back to master and develop. ```bash # 1. 从 develop 切 release git checkout develop && git pull origin develop git checkout -b release/<版本号> # 2. 在 release 分支上:更新 README 版本号、写 CHANGELOG.md、必要的小修 git commit -am "docs: <版本号> CHANGELOG + README 版本" git push -u origin release/<版本号> # 3. 进入冻结期,PR base=master 合并;同时 PR base=develop 回灌 # 4. master 上打 tag git checkout master && git pull git tag -a v<版本号> -m "BiliNote v<版本号>" && git push origin v<版本号> # 5. release 分支已合入两边,删除 git push origin --delete release/<版本号> ``` -------------------------------- ### Build Extension for Release Source: https://github.com/jefferyhcool/bilinote/blob/master/BillNote_extension/README.md Commands to build the extension for different distribution platforms. The output is placed in the ./extension/ directory or packaged into archives. ```bash pnpm build # 产物 → ./extension/ pnpm pack:zip # 打包 → ./extension.zip (上传 Chrome Web Store) pnpm pack:crx # 打包 → ./extension.crx pnpm pack:xpi # 打包 → ./extension.xpi (Firefox) ``` -------------------------------- ### Load Unpacked Extension in Chrome Source: https://github.com/jefferyhcool/bilinote/blob/master/BillNote_extension/README.md Steps to load the development build of the extension into Chrome. Ensure the backend server is running separately. ```bash 1. `chrome://extensions/` → 打开右上"开发者模式" 2. 点"加载已解压的扩展程序",选 `BillNote_extension/extension/` 目录 3. 启动后端:`cd backend && python main.py`(默认 8483) 4. 浏览器开任意支持的视频页(B 站 / YouTube / 抖音 / 快手),点工具栏 BiliNote 图标 5. 首次使用先打开"设置",填后端地址 → 选供应商 + 模型 ``` -------------------------------- ### Daily Feature Development Workflow Source: https://github.com/jefferyhcool/bilinote/blob/master/CONTRIBUTING.md Steps for checking out the develop branch, creating a new feature branch, developing, committing, pushing, and cleaning up. ```bash git checkout develop git pull origin develop git checkout -b feature/-<事项> # … 开发 + 自测 + commit … git push -u origin feature/-<事项> # 在 GitHub 上发起 PR:base = develop,compare = 你的分支 git branch -d feature/-<事项> git push origin --delete feature/-<事项> ``` -------------------------------- ### Create Release Branch Source: https://github.com/jefferyhcool/bilinote/blob/master/RELEASING.md Checkout the develop branch, pull the latest changes, and create a new release branch. ```bash git checkout develop && git pull origin develop git checkout -b release/X.Y.Z ``` -------------------------------- ### Pull and Run BiliNote Docker Image Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Pull the latest BiliNote Docker image and run it as a detached container, mapping port 80 and mounting a volume for data persistence. Access the application at http://localhost. ```bash # Pull the latest image docker pull ghcr.io/jefferyhcool/bilinote:latest # Run the container docker run -d -p 80:80 \ -v bilinote-data:/app/backend/data \ --name bilinote \ ghcr.io/jefferyhcool/bilinote:latest ``` -------------------------------- ### Tag Release and Push Source: https://github.com/jefferyhcool/bilinote/blob/master/RELEASING.md Checkout the master branch, pull latest changes, create an annotated tag for the release, and push the tag to origin. This automatically triggers the release-extension workflow. ```bash git checkout master && git pull origin master git tag -a vX.Y.Z -m "BiliNote vX.Y.Z 主线: - ... 详见 CHANGELOG.md" git push origin vX.Y.Z ``` -------------------------------- ### Build BiliNote with a Custom Base Registry Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Temporarily override the base registry during the Docker build process using the BASE_REGISTRY build-arg. This can be useful if the default registry is inaccessible. Alternatively, set it permanently in the .env file. ```bash BASE_REGISTRY=docker.m.daocloud.io docker-compose build docker-compose up -d ``` ```bash echo 'BASE_REGISTRY=docker.m.daocloud.io' >> .env ``` -------------------------------- ### Commit Documentation Changes Source: https://github.com/jefferyhcool/bilinote/blob/master/RELEASING.md Commit changes to CHANGELOG.md and README.md for the new release version. ```bash git commit -am "docs: vX.Y.Z CHANGELOG + README 版本" git push -u origin release/X.Y.Z ``` -------------------------------- ### Configure Docker Daemon for Image Acceleration Source: https://github.com/jefferyhcool/bilinote/blob/master/README.md Modify the Docker daemon configuration to use a registry mirror, which can resolve issues with pulling images from docker.io. This is a permanent solution. Restart Docker after applying changes. ```json { "registry-mirrors": ["https://docker.m.daocloud.io"] } ``` -------------------------------- ### Hotfix Workflow Source: https://github.com/jefferyhcool/bilinote/blob/master/CONTRIBUTING.md Steps for creating a hotfix branch from master, applying fixes, creating a pull request to master, tagging, and merging back to develop. ```bash git checkout master && git pull git checkout -b hotfix/-<事项> # … 修 + commit … # PR base=master,合入后立刻打 patch tag(如 v2.1.1)发版 # 同一改动同时 PR base=develop 回灌 ``` -------------------------------- ### Create Hotfix Branch Source: https://github.com/jefferyhcool/bilinote/blob/master/RELEASING.md For urgent online issues, create a hotfix branch from master, fix the issue, and create PRs to merge into both master and develop. ```bash git checkout master && git pull git checkout -b hotfix/-<事项> ``` -------------------------------- ### Workflow Secrets for Automated Publishing Source: https://github.com/jefferyhcool/bilinote/blob/master/RELEASING.md Configure necessary secrets in GitHub Actions for automated publishing to Chrome, Edge, and Firefox stores. ```text CHROME_EXTENSION_ID CHROME_CLIENT_ID CHROME_CLIENT_SECRET CHROME_REFRESH_TOKEN EDGE_PRODUCT_ID EDGE_CLIENT_ID EDGE_API_KEY FIREFOX_ADDON_UUID FIREFOX_API_KEY FIREFOX_API_SECRET ``` -------------------------------- ### Clean up Git Hooks Source: https://github.com/jefferyhcool/bilinote/blob/master/CONTRIBUTING.md Use these commands to remove or bypass leftover Git hooks from older versions of the project. This is necessary if you encounter commits being blocked by hooks. ```bash # One-time cleanup rm .git/hooks/pre-commit # Or temporarily bypass this commit SKIP_SIMPLE_GIT_HOOKS=1 git commit -m "..." ``` -------------------------------- ### Delete Release Branch Source: https://github.com/jefferyhcool/bilinote/blob/master/RELEASING.md After the release branch has been merged into master and develop, delete the local and remote release branch. ```bash git push origin --delete release/X.Y.Z git branch -d release/X.Y.Z ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.