From 5679f074829ba7c88ab3eded21f2997b0e29cadd Mon Sep 17 00:00:00 2001
From: ljeagle <77149863@qq.com>
Date: Mon, 21 Oct 2024 21:38:02 +0800
Subject: [PATCH] release zotero-chatpdf v0.0.1
---
README.md | 154 +-
addon/chrome/content/icons/favicon.png | Bin 2217 -> 0 bytes
addon/chrome/content/md.css | 2 +-
addon/install.rdf | 2 +-
addon/manifest.json | 8 +-
addon/prefs.js | 23 +-
imgs/apikey.png | Bin 38282 -> 0 bytes
imgs/background.png | Bin 28642 -> 0 bytes
imgs/background.svg | 1 -
imgs/demo.png | Bin 64606 -> 0 bytes
imgs/demo2.png | Bin 217529 -> 0 bytes
imgs/prompt.png | Bin 43197 -> 0 bytes
package.json | 26 +-
scripts/start.js | 1 +
src/hooks.ts | 141 +-
src/modules/Meet/BetterNotes.ts | 18 +-
src/modules/Meet/OpenAI.ts | 340 ----
src/modules/Meet/Zotero.ts | 177 ++-
src/modules/Meet/api.ts | 45 +-
src/modules/base.ts | 20 +-
src/modules/utils.ts | 4 -
src/modules/views.ts | 1989 ++++++++++++++++++++++--
tags/Readme.md | 2 +-
update.json | 6 +-
update.rdf | 6 +-
25 files changed, 2259 insertions(+), 706 deletions(-)
delete mode 100644 addon/chrome/content/icons/favicon.png
delete mode 100644 imgs/apikey.png
delete mode 100644 imgs/background.png
delete mode 100644 imgs/background.svg
delete mode 100644 imgs/demo.png
delete mode 100644 imgs/demo2.png
delete mode 100644 imgs/prompt.png
delete mode 100644 src/modules/Meet/OpenAI.ts
diff --git a/README.md b/README.md
index 8ecc4e3..fff6555 100644
--- a/README.md
+++ b/README.md
@@ -1,131 +1,59 @@
-
-
+
+Zotero-ChatPDF
+
+Zotero-ChatPDF is an advanced tool that integrates seamlessly with Zotero, enabling effortless interaction with PDF documents through state-of-the-art (SOTA) large language models (LLMs). It offers users the ability to ask questions, extract insights, and converse with PDFs directly, providing a powerful research assistant for scholars, researchers, and anyone who deals with large amounts of text in PDF format.
+# Key Features
+Effortless PDF Interaction: Chat with your PDFs directly in Zotero, asking questions and receiving detailed answers in natural language.
+
+SOTA Language Models: Powered by cutting-edge LLMs, such as gpt-4o, claude-3.5-sonnet and gemini-1.5-pro, offering highly accurate and contextually relevant responses.
+For Mac users, there are some excellent free and open-source models built in, such as llama3.1, gemma2, phi-3.5, etc. Now after free registration, they can be automatically downloaded, installed and used with just one click on the plugin page, and the model data is all locally stored, ensuring absolute privacy and security of the data
-# Awesome GPT
+Annotations and Highlights: Extract annotations and highlights from your PDFs and use them for deeper analysis and conversation.
+Full-text Search: Automatically scan and index the full text of PDFs to enable more precise question-answering.
-👋
+Seamless Zotero Integration: Syncs directly with your Zotero library, making it easy to manage and query your documents without leaving the Zotero interface.
+
-Welcome to share your command tag [here](https://github.com/MuiseDestiny/zotero-gpt/discussions/3) using [Meet API](src/modules/Meet/api.ts).
+# How to Use
+Installation: Download [here](), Open Zotero. In the top menu bar, click on `Tools > Add-ons`.
+
+ Click on the gear icon at the top right of the window. Click on `Install Add-on From File` and open the downloaded plugin file zotero-chatpdf.xpi.
-[![Using Zotero Plugin Template](https://img.shields.io/badge/Using-Zotero%20Plugin%20Template-blue?style=flat-round&logo=github)](https://github.com/windingwind/zotero-plugin-template)
-[![Latest release](https://img.shields.io/github/v/release/MuiseDestiny/zotero-gpt)](https://github.com/MuiseDestiny/zotero-gpt/releases)
-![Release Date](https://img.shields.io/github/release-date/MuiseDestiny/zotero-gpt?color=9cf)
-[![License](https://img.shields.io/github/license/MuiseDestiny/zotero-gpt)](https://github.com/MuiseDestiny/zotero-gpt/blob/master/LICENSE)
-![Downloads latest release](https://img.shields.io/github/downloads/MuiseDestiny/zotero-gpt/latest/total?color=yellow)
+Startup: In Zotero, press the keys to start the plugin, MacOS(command + enter), Windows(ctrl + enter).
+Select LLM models: For Windows users, after registering the OpenAI, Claude, and Gemini models can all be accessed and switched by one click.
-
+ For Mac users, after registering llama3.1, gemma2, phi-3.5 and mistral can all be used by just one click in plugin without extra need to install many additional tools or softwares.
+ Now the registration is open and free!
+
+Chat with PDFs: Open any PDF and start asking questions. Zotero-ChatPDF will process the document and provide insightful responses.
-
+Manage Insights: Save, export, or share the extracted insights, answers, and annotations from your conversations.
+Quit: Press esc key to exit.
-
----
-
-## 🚀 Main Features
-Features about GPT:
-- [x] 🔗 **Integrate with Zotero**: You can use the plugin to search and ask items in the library based on the selected text or the PDF file.
-- [x] 🧠 Use GPT to generate reply text: support `gpt-3.5-turbo` and `gpt-4`
-- [x] 🏷️ [Command tags](https://github.com/MuiseDestiny/zotero-gpt#command-tags): **Click once** to accelerate your research.
- - [x] 💬 Ask questions about current **PDF file** (full-text or selected text).
- - [x] 💬 Ask questions about **selected paper** (Abstract).
- - [x] 📝 **Summarize the selected paper** into several highly condensed sentences.
- - [x] 🔍 **Search items** in the library based on the selected text.
- - [x] ... ...
-- [x] ⚙️ **Advanced settings for GPT**: You can set the [api key](https://platform.openai.com/account/api-keys), [model name](https://platform.openai.com/docs/api-reference/chat/create#chat/create-model), [api url](https://platform.openai.com/docs/api-reference/chat/create), [temperature](https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature).
-- [x] 📚 **Integrate with Better Notes**: You can directly open this plugin when using [Better Notes](https://github.com/windingwind/zotero-better-notes).
-
-Features about UI:
-- [x] 🎨 **Real-time markdown rendering** for reply text: Latex and mathjax are supported.
-- [x] 🔍 **Zoom in and out** of the reply text or the size of the plugin window.
-- [x] 🖱️ **Move the plugin window to any position** on the screen.
-- [x] 📋 **Copy the reply text** to the clipboard.
-- [x] ⚠️ Detailed **error message** will be displayed when the request fails.
-- [x] 🔧 Compatible with **Zotero 6** and **Zotero 7**.
-- [x] 🎉 Discover more exciting features that are not listed here.
-
-
-## How to use
-- [x] Get `.xpi` file
- - [ ] [download latest](https://github.com/MuiseDestiny/zotero-gpt/releases/latest/download/zotero-gpt.xpi) release `.xpi` file
- - [ ] or build this project [1] to generate a `.xpi` file
-- [x] Install `.xpi` file in Zotero [2]
-- [x] Open Zotero GPT [3]
-- [x] Set your `OpenAI` secret key [4]
-
-### [1] Build the project
-Here is an example on how to build this project. For more information on how to build, please visit this project: [https://github.com/windingwind/zotero-plugin-template](https://github.com/windingwind/zotero-plugin-template)
+# Build the plugin
+If you like to build the plugin by yourself, do as the below commands:
```bash
-git clone https://github.com/MuiseDestiny/zotero-gpt.git
-cd zotero-gpt
+git clone https://github.com/ljeagle/zotero-chatpdf.git
+cd zotero-chatpdf
npm install
npm run build
```
-The generated `.xpi` file in the build directory is the extension that you can install in Zotero.
-
-### [2] Install the extension in Zotero
-Open Zotero. In the top menu bar, click on `Tools > Add-ons`.
-Click on the gear icon at the top right of the window. Click on `Install Add-on From File` and open the generated `.xpi` file in the build directory from the previous step.
-
-### [3] Open/Exit Zotero GPT
-
-|Action|Shortcut|
-|--|--|
-|Open|