mirror of
https://github.com/github/awesome-copilot.git
synced 2026-04-11 02:35:55 +00:00
Address Copilot code review feedback
- Fix browser leak in render_url_to_pdf (try/finally around Playwright) - Remove setup.sh references from SKILL.md (not bundled in plugin) - Use consistent <path-to>/eyeball.py paths in SKILL.md - Update plugin README install instructions for awesome-copilot - Add Windows pywin32 install step to SKILL.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -22,44 +22,25 @@ If the analysis says "Section 9.3 allows termination for cause with a 30-day cur
|
|||||||
|
|
||||||
### Install the plugin
|
### Install the plugin
|
||||||
|
|
||||||
Point your CLI at this repo and ask it to install the plugin for you, with this prompt:
|
Install via the Copilot CLI plugin system. In a Copilot CLI conversation:
|
||||||
|
|
||||||
```
|
```
|
||||||
Install the plugin at github.com/dvelton/eyeball for me.
|
install the eyeball plugin from github/awesome-copilot
|
||||||
```
|
|
||||||
|
|
||||||
Or:
|
|
||||||
|
|
||||||
Install via the Copilot CLI plugin system, or clone the repo:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/dvelton/eyeball.git
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install dependencies
|
### Install dependencies
|
||||||
|
|
||||||
**macOS / Linux:**
|
After installing the plugin, install the Python dependencies:
|
||||||
|
|
||||||
```bash
|
|
||||||
cd eyeball
|
|
||||||
bash setup.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
**Windows (PowerShell):**
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
cd eyeball
|
|
||||||
.\setup.ps1
|
|
||||||
```
|
|
||||||
|
|
||||||
**Manual install (any platform):**
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install pymupdf pillow python-docx playwright
|
pip install pymupdf pillow python-docx playwright
|
||||||
python -m playwright install chromium
|
python -m playwright install chromium
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows, `pywin32` is also needed for Microsoft Word automation and is installed automatically by the setup script.
|
On Windows, also install pywin32 for Word automation:
|
||||||
|
```bash
|
||||||
|
pip install pywin32
|
||||||
|
```
|
||||||
|
|
||||||
### Verify setup
|
### Verify setup
|
||||||
|
|
||||||
|
|||||||
@@ -42,17 +42,17 @@ Before first use, check that dependencies are installed:
|
|||||||
python3 <path-to>/eyeball.py setup-check
|
python3 <path-to>/eyeball.py setup-check
|
||||||
```
|
```
|
||||||
|
|
||||||
If anything is missing, run the setup script from the eyeball plugin directory:
|
If anything is missing, install the required dependencies:
|
||||||
```bash
|
|
||||||
bash <path-to>/setup.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Or install manually:
|
|
||||||
```bash
|
```bash
|
||||||
pip3 install pymupdf pillow python-docx playwright
|
pip3 install pymupdf pillow python-docx playwright
|
||||||
python3 -m playwright install chromium
|
python3 -m playwright install chromium
|
||||||
```
|
```
|
||||||
|
|
||||||
|
On Windows, also install pywin32 for Word automation:
|
||||||
|
```bash
|
||||||
|
pip install pywin32
|
||||||
|
```
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
Follow these steps exactly. The order matters.
|
Follow these steps exactly. The order matters.
|
||||||
@@ -62,7 +62,7 @@ Follow these steps exactly. The order matters.
|
|||||||
Before writing any analysis, extract and read the full text of the source document:
|
Before writing any analysis, extract and read the full text of the source document:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 eyeball.py extract-text --source "<path-or-url>"
|
python3 <path-to>/eyeball.py extract-text --source "<path-or-url>"
|
||||||
```
|
```
|
||||||
|
|
||||||
Read the output carefully. Identify actual section numbers, headings, page numbers, and key language.
|
Read the output carefully. Identify actual section numbers, headings, page numbers, and key language.
|
||||||
@@ -118,7 +118,7 @@ RIGHT -- includes the section number for precision, targets the correct page:
|
|||||||
Construct a JSON array of sections and call the build command:
|
Construct a JSON array of sections and call the build command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 eyeball.py build \
|
python3 <path-to>/eyeball.py build \
|
||||||
--source "<path-or-url>" \
|
--source "<path-or-url>" \
|
||||||
--output ~/Desktop/<title>.docx \
|
--output ~/Desktop/<title>.docx \
|
||||||
--title "Analysis Title" \
|
--title "Analysis Title" \
|
||||||
|
|||||||
@@ -241,6 +241,8 @@ def render_url_to_pdf(url, output_pdf_path):
|
|||||||
)
|
)
|
||||||
|
|
||||||
with sync_playwright() as p:
|
with sync_playwright() as p:
|
||||||
|
browser = None
|
||||||
|
try:
|
||||||
browser = p.chromium.launch(headless=True)
|
browser = p.chromium.launch(headless=True)
|
||||||
page = browser.new_page()
|
page = browser.new_page()
|
||||||
page.goto(url, wait_until="networkidle", timeout=30000)
|
page.goto(url, wait_until="networkidle", timeout=30000)
|
||||||
@@ -260,6 +262,8 @@ def render_url_to_pdf(url, output_pdf_path):
|
|||||||
margin={"top": "0.5in", "bottom": "0.5in",
|
margin={"top": "0.5in", "bottom": "0.5in",
|
||||||
"left": "0.75in", "right": "0.75in"}
|
"left": "0.75in", "right": "0.75in"}
|
||||||
)
|
)
|
||||||
|
finally:
|
||||||
|
if browser is not None:
|
||||||
browser.close()
|
browser.close()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user