Update README.md

This commit is contained in:
intergalacticalvariable 2024-09-29 12:20:25 +02:00 committed by GitHub
parent 3ecb275e35
commit 5e947f4cfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,13 +1,15 @@
# 📚 Reader: Local Deployment Edition # 📚 Reader: Local Deployment Edition
🌟 **Live Demo:**
Example: [https://reader.berlin.cx/https://github.com/intergalacticalvariable/reader/edit/main/README.md](https://reader.berlin.cx/https://github.com/intergalacticalvariable/reader/)
This is an adapted version of [Jina AI's Reader](https://github.com/jina-ai/reader) for local deployment using Docker. This is an adapted version of [Jina AI's Reader](https://github.com/jina-ai/reader) for local deployment using Docker.
## 🎯 What it does ## 🎯 What it does
It converts any URL to an LLM-friendly input with `http://127.0.0.1:3000/https://google.com`. Get improved output for your agent and RAG systems at no cost. This tool helps you prepare web content for Large Language Models, making it easier to process and analyze online information. It converts any URL to an LLM-friendly input with `http://127.0.0.1:3000/https://google.com`. Get improved output for your agent and RAG systems at no cost. This tool helps you prepare web content for Large Language Models, making it easier to process and analyze online information.
## 🚀 Key Features ## 🚀 Key Features
- 🏠 Runs locally using Docker - 🏠 Runs locally using Docker
- 🔑 No API keys required - works out of the box! - 🔑 No API keys required - works out of the box!
- 🖼️ Saves screenshots locally instead of uploading to Google Cloud Storage - 🖼️ Saves screenshots locally instead of uploading to Google Cloud Storage
@ -15,61 +17,49 @@ It converts any URL to an LLM-friendly input with `http://127.0.0.1:3000/https:/
- 🌐 Converts web content to LLM-friendly formats - 🌐 Converts web content to LLM-friendly formats
## ⚠️ Limitations ## ⚠️ Limitations
- 📄 Currently does not support parsing PDFs - 📄 Currently does not support parsing PDFs
## 🐳 Docker Deployment ## 🐳 Docker Deployment
### Option 1: Using the pre-built image ### Option 1: Using the pre-built image
1. Pull the latest image: 1. Pull the latest image:
```bash ```bash
docker pull ghcr.io/intergalacticalvariable/reader:latest docker pull ghcr.io/intergalacticalvariable/reader:latest
``` ```
2. Run the container: 2. Run the container:
```bash ```bash
docker run -d -p 3000:3000 -v /path/to/local-storage:/app/local-storage --name reader-container ghcr.io/intergalacticalvariable/reader:latest docker run -d -p 3000:3000 -v /path/to/local-storage:/app/local-storage --name reader-container ghcr.io/intergalacticalvariable/reader:latest
``` ```
Replace `/path/to/local-storage` with the directory where you want to store screenshots. Replace `/path/to/local-storage` with the directory where you want to store screenshots.
This command does the following: This command does the following:
- Maps port 3000 of the container to port 3000 on your host - Maps port 3000 of the container to port 3000 on your host
- Mounts a volume for local storage - Mounts a volume for local storage
- Names the container `reader-container` - Names the container `reader-container`
3. To stop the container: 3. To stop the container:
```bash ```bash
docker stop reader-container docker stop reader-container
``` ```
4. To start the container again: 4. To start the container again:
```bash ```bash
docker start reader-container docker start reader-container
``` ```
### Option 2: Building the image locally ### Option 2: Building the image locally
1. Clone the repository: 1. Clone the repository:
```bash ```bash
git clone https://github.com/intergalacticalvariable/reader.git git clone https://github.com/intergalacticalvariable/reader.git
cd reader cd reader
``` ```
2. Build the Docker image: 2. Build the Docker image:
```bash ```bash
docker build -t reader . docker build -t reader .
``` ```
3. Run the container: 3. Run the container:
```bash ```bash
docker run -p 3000:3000 -v /path/to/local-storage:/app/local-storage reader docker run -p 3000:3000 -v /path/to/local-storage:/app/local-storage reader
``` ```
## 🖥️ Usage ## 🖥️ Usage
Once the Docker container is running, you can use curl to make requests. Here are examples for different response types: Once the Docker container is running, you can use curl to make requests. Here are examples for different response types:
1. 📝 Markdown (bypasses readability processing): 1. 📝 Markdown (bypasses readability processing):
@ -91,20 +81,16 @@ Once the Docker container is running, you can use curl to make requests. Here ar
```bash ```bash
curl -H "X-Respond-With: screenshot" 'http://127.0.0.1:3000/https://google.com' curl -H "X-Respond-With: screenshot" 'http://127.0.0.1:3000/https://google.com'
``` ```
5. 📸 Full-Page Screenshot (returns the URL of the webpage's screenshot): 5. 📸 Full-Page Screenshot (returns the URL of the webpage's screenshot):
```bash ```bash
curl -H "X-Respond-With: pageshot" 'http://127.0.0.1:3000/https://google.com' curl -H "X-Respond-With: pageshot" 'http://127.0.0.1:3000/https://google.com'
``` ```
## 🙏 Acknowledgements ## 🙏 Acknowledgements
This project is based on the excellent work done by multiple contributors: This project is based on the excellent work done by multiple contributors:
1. The original [Jina AI Reader project](https://github.com/jina-ai/reader), which provided the foundation for this tool. 1. The original [Jina AI Reader project](https://github.com/jina-ai/reader), which provided the foundation for this tool.
2. [Harsh Gupta's adaptation](https://github.com/hargup/reader), which served as the immediate basis for this local deployment version. 2. [Harsh Gupta's adaptation](https://github.com/hargup/reader), which served as the immediate basis for this local deployment version.
## 📜 License ## 📜 License
This project is licensed under Apache-2.0 same as the original Jina AI Reader project. This project is licensed under Apache-2.0 same as the original Jina AI Reader project.