Update README.md
This commit is contained in:
parent
d6e7347927
commit
4942c1533d
1 changed files with 37 additions and 47 deletions
84
README.md
84
README.md
|
@ -4,70 +4,60 @@ Code for various AppleScripts I've written or modified for DEVONthink Pro 3
|
||||||
|
|
||||||
## 🔗 Bates Source Link - Citation Generator
|
## 🔗 Bates Source Link - Citation Generator
|
||||||
|
|
||||||
Creates formatted citations from DEVONthink documents, with smart Bates number support.
|
Creates Markdown-formatted citations from DEVONthink documents, with deeplinks and Bates number support. Perfect for reviewing administrative records in DEVONthink.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. Open document in DEVONthink
|
1. Open document in DEVONthink
|
||||||
2. Select text to quote
|
2. Select text to quote
|
||||||
3. Run script
|
3. Run script
|
||||||
4. Paste formatted citation
|
4. Paste formatted citation into a Markdown editor
|
||||||
|
|
||||||
## Output Examples
|
|
||||||
|
|
||||||
Bates-numbered documents:
|
|
||||||
```markdown
|
|
||||||
"The environmental impact study shows..." [FWS 4326](x-devonthink-item://...)
|
|
||||||
```
|
|
||||||
|
|
||||||
Regular documents:
|
|
||||||
```markdown
|
|
||||||
"The data indicates..." [Report Title at 5](x-devonthink-item://...)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Copies selected text to clipboard
|
- Copies selected text to clipboard
|
||||||
- Calculates Bates number using if filename has Bates start or range in it
|
- Calculates and generates a Bates cite using if filename is compatible (see below), e.g., `FWS 134` (if the selected text is on page 3 of a file that is named, e.g., `FWS_000131.pdf`)
|
||||||
- Appends deeplink to selected text in document to clipboard
|
- For non-Bates numbered documents, it generates a standardized cite, e.g., `IPCC Report at 5` (if the selected text is on page 5 of a file that is named `IPCC Report.pdf`)
|
||||||
- Formats clipboard in Markdown
|
- Appends Markdown-formatted deeplink to selected text in document to clipboard, using the generated page number (Bates or non-Bates) (see Output Examples below)
|
||||||
- Works with both Bates and regular documents
|
|
||||||
|
## Bates-compatible Filenames
|
||||||
|
|
||||||
|
The script will parse several different Bates-numbered filenaming conventions, including, for example:
|
||||||
|
- `FWS 000533.pdf`
|
||||||
|
- `FWS-000533.pdf`
|
||||||
|
- `FWS_000533.pdf`
|
||||||
|
- `NMFS 002561-002985.pdf`
|
||||||
|
- `BLM 45.pdf`
|
||||||
|
- `BLM_45-62.pdf`
|
||||||
|
|
||||||
|
Use my `bates` script to quickly rename a batch of PDFs (e.g. a complete administrative record) to be compatible with this script while preserving original names in metadata. [Find it here →](https://sij.ai/sij/pathScripts)
|
||||||
|
|
||||||
|
## Output Examples
|
||||||
|
|
||||||
|
```
|
||||||
|
"The environmental impact study shows..." [FWS 4326](x-devonthink-item://...)
|
||||||
|
"The data indicates..." [Report Title at 5](x-devonthink-item://...)
|
||||||
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Open DEVONthink
|
1. Open `Applications/Script Editor.app`
|
||||||
2. Go to Scripts menu
|
2. Paste in the script and save it as `Bates Source Link.scpt`
|
||||||
3. Select "Open Scripts Folder"
|
3. Open DEVONthink
|
||||||
4. Add script to folder
|
4. Scripts menu → Open Scripts Folder
|
||||||
|
5. Copy or move script to `Menu` subfolder
|
||||||
|
|
||||||
## Keyboard Shortcut (Optional)
|
## Assign a Keyboard Shortcut (Recommended)
|
||||||
|
|
||||||
1. System Settings → Keyboard → Keyboard Shortcuts
|
1. System Settings → Keyboard → Keyboard Shortcuts → App Shortcuts
|
||||||
2. Select "App Shortcuts" → "+"
|
2. Select `DEVONthink 3.app` and click `+`
|
||||||
3. Choose DEVONthink
|
3. Enter exact script name as it appears in the `Scripts` menu in DEVONthink, i.e., `Bates Source Link`
|
||||||
4. Enter exact script name
|
4. Assign desired shortcut, such as:
|
||||||
5. Assign desired shortcut
|
- `⌥ + C` (Option C)
|
||||||
|
- `⇧ ⌥ + C` (Option Shift C)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- DEVONthink Pro
|
|
||||||
- macOS
|
- macOS
|
||||||
- Perl (for URL encoding)
|
- Perl (for URL encoding)
|
||||||
- For Bates numbering, documents should be titled in one of these formats:
|
- DEVONthink Pro
|
||||||
- `FWS 000533`
|
|
||||||
- `FWS 000533-000564`
|
|
||||||
- `FWS-000533`
|
|
||||||
- `FWS_000533`
|
|
||||||
- `NMFS 002561-002985`
|
|
||||||
- `BLM 45`
|
|
||||||
- `BLM_45-62`
|
|
||||||
- etc.
|
|
||||||
|
|
||||||
I wrote a separate Python script, `bates`, to quickly rename a folder of PDFs to be compatible with this script. [Find it here →](https://sij.ai/sij/pathScripts)
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
- Works best with consistent Bates number formatting
|
|
||||||
- Creates markdown-compatible citations
|
|
||||||
- Copies result to clipboard
|
|
||||||
- Perfect for legal research and document analysis
|
|
Loading…
Reference in a new issue