MIT License

项目介绍

AhmadHassan-BTed/JinaClip 是一个托管在 GitHub 上的开源项目,主要使用 JavaScript 编写,采用 MIT License 许可证,目前获得 4.2k 个 Star、0 次 Fork。

仓库全名
AhmadHassan-BTed/JinaClip
开源许可证
MIT License
Star 数
4.2k

README 摘要

Jina Reader — Local Edition (v7) Professional-Grade • Local-First • Privacy-Centric Transform any webpage into high-fidelity, LLM-friendly Markdown entirely within the browser. Designed for AI Workflows. Engineered for Privacy. The Philosophy In an era of cloud-dependency and rate-limited APIs, Jina Reader (Local) represents a pivot back to local-first computing. This project eliminates the middleman, removing the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

JinaClip 用什么语言开发?

主要使用 JavaScript 编写,采用 MIT License 许可证,目前有 4.2k 个 Star。

JinaClip 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 JinaClip 的源码?

可以直接克隆仓库:git clone https://github.com/AhmadHassan-BTed/JinaClip.git,默认分支为 main;安装与运行步骤见仓库 README。

JinaClip 最近还在维护吗?

仓库最近一次更新为 6月30日,当前没有未关闭的 Issue;Star 数为 4.2k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Professional-grade, local-first browser extension that transforms any webpage into high-fidelity, LLM-friendly Markdown entirely within the browser's runtime. Zero-cloud, privacy-centric, and designed specifically for AI workflows.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

CSS
HTML
JavaScript

README

Jina Reader — Local Edition (v7)

Professional-Grade • Local-First • Privacy-Centric

Transform any webpage into high-fidelity, LLM-friendly Markdown entirely within the browser.

License: MIT Engine: Local-First Privacy: Zero-Cloud Author: Ahmad Hassan


Designed for AI Workflows. Engineered for Privacy.

The Philosophy

In an era of cloud-dependency and rate-limited APIs, Jina Reader (Local) represents a pivot back to local-first computing. This project eliminates the middleman, removing the need for r.jina.ai cloud calls by implementing the entire extraction and transformation pipeline directly in the browser’s runtime. Content remains local, speed is absolute, and usage is infinite.


Architectural Excellence

The system is built on a modular, Service-Oriented Architecture (SOA) designed to handle the complexities of the modern web (Shadow DOM, dynamic iframes, and SPA layouts).

1. High-Level System Flow

The following diagram illustrates the lifecycle of a single “Copy” request, from the user’s action to the final clipboard entry.

graph TD User([User Action: Click/Hotkeys/Menu]) --> Orchestrator[Background Orchestrator] Orchestrator --> Config[Config Service] Config --> Service[LocalReaderService v7] subgraph "Target Tab Context" Service -- Script Injection --> Engine[v7 Intelligence Engine] Engine -- DOM Scoring --> Root[Content Root Discovery] Root -- Cleaning --> Clone[Sanitized Clone] Clone -- Conversion --> MD[Markdown/JSON/HTML] end MD -- Message Passing --> Service Service -- Clipboard API --> OS[System Clipboard] Service -- Notification API --> User

2. The v7 Intelligence Engine

At the heart of the project is the Heuristic Scoring Engine. Instead of “guessing” where the content is, it calculates a text-to-link density ratio and penalizes interactive “noise” (dashboards, buttons, navs).

sequenceDiagram participant P as Web Page participant E as Intelligence Engine participant S as Scoring Module participant C as Converter E->>P: Traverse DOM Tree P-->>E: Candidate Elements (div, main, article) E->>S: Compute (Text Density - Link Density) S-->>E: Final Scores E->>P: Flatten Shadow DOM & Iframes E->>C: Execute Pro-Grade Markdown Conversion C-->>E: LLM-Friendly Payload

Feature Matrix

Feature Local Engine (v7) Cloud Reader
Privacy 100% Local Cloud Processed
Rate Limits Infinite Strictly Limited
Cost $0 Token Based
Shadow DOM ✅ Supported ❌ Limited
Table Formatting ✅ Pro Grade ✅ Basic
Full Pageshots ✅ Stitched Canvas ❌ N/A

Repository Structure

p:/extensions/JinaClip - Copy Page for LLM/
├── scripts/
│   └── build.js          # Professional packaging pipeline
├── src/
│   ├── background/
│   │   └── index.js      # Lifecycle & Event Orchestration
│   ├── services/
│   │   └── localReader.js # Core Extraction & Transformation Engine (v7)
│   ├── utils/
│   │   └── logger.js      # System-wide observability
│   └── config/
│       ├── constants.js   # Immutable definitions
│       └── defaultSettings.js
├── icons/                # High-fidelity visual assets
└── manifest.json         # Extension Manifest (MV3)

Technical Pipeline: Full Page Capture

The “Pageshot” feature utilizes a multi-stage stitching pipeline to capture full-length articles without loss of detail.

  1. Dimension Analysis: Calculates scrollHeight and viewHeight.
  2. Synchronized Scrolling: Executes discrete jumps with paint-settle delays.
  3. Canvas Orchestration: Assembles visible segments in a OffscreenCanvas.
  4. Data Delivery: Converts the final buffer to a high-quality Markdown-wrapped Base64 string.

Installation & Development

Onboarding for Contributors

The codebase is written in vanilla ES6+ to ensure zero-coupling and maximum longevity.

  1. Clone & Setup:
    git clone <repo-url>
    npm install
    
  2. Build for Production:
    npm run build
    
  3. Browser Loading:
    • Open chrome://extensions/
    • Load the dist/ folder as an “Unpacked Extension.”

Professional Usage

  • Quick Action: Left-click the extension icon for a standard Markdown copy.
  • Precision Extraction: Right-click the icon to select specific formats (JSON, HTML, Text).
  • Automation: Use the Global Shortcut Alt+Shift+J for immediate capture.

Credits & License

This project was architected and developed by Ahmad Hassan (B-Ted) as a part of the movement toward high-performance, local-first AI tools.

Distributed under the MIT License. Contributions that align with the core philosophy of “Clean Code & User Privacy” are welcomed.


"The best way to read the web is locally."

评论

暂无评论