add .gitignore and updated readme to include commands to run
This commit is contained in:
parent
f882d1ea0e
commit
8da7784104
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Build outputs
|
||||
*.xpi
|
||||
*.zip
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
26
README.md
26
README.md
@ -19,10 +19,17 @@ Executes arbitrary JavaScript within Zotero's context.
|
||||
**Body:**
|
||||
```json
|
||||
{
|
||||
"code": "return await Zotero.Items.getAll();"
|
||||
"code": "return await Zotero.Items.getAll(1, true, false);"
|
||||
}
|
||||
```
|
||||
|
||||
**Example Test:**
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:23119/zotero-js-bridge/execute \\
|
||||
-H 'Content-Type: application/json' \\
|
||||
-d '{"code": "return await Zotero.Items.getAll(1, true, false);"}'
|
||||
```
|
||||
|
||||
### `/zotero-js-bridge/findPDFsForItems`
|
||||
|
||||
A specialized endpoint to trigger Zotero's "Find Available PDFs" feature for a specific list of item IDs.
|
||||
@ -35,7 +42,22 @@ A specialized endpoint to trigger Zotero's "Find Available PDFs" feature for a s
|
||||
}
|
||||
```
|
||||
|
||||
## Development
|
||||
**Example Test:**
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:23119/zotero-js-bridge/findPDFsForItems \\
|
||||
-H 'Content-Type: application/json' \\
|
||||
-d '{"itemIds": [123]}'
|
||||
```
|
||||
|
||||
## Development and Building
|
||||
|
||||
To build the project into an installable Zotero add-on (`.xpi` file), run the following command from the root of this repository:
|
||||
|
||||
```bash
|
||||
rm -f zotero-js-bridge.xpi && zip -r zotero-js-bridge.xpi manifest.json bootstrap.js README.md
|
||||
```
|
||||
|
||||
Then drag and drop the `zotero-js-bridge.xpi` file into the Zotero Add-ons manager to install it.
|
||||
|
||||
- `manifest.json`: Zotero plugin manifest.
|
||||
- `bootstrap.js`: Handles plugin lifecycle and endpoint registration.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user