2024-10-26 22:55:25 +02:00
# DEVONthink
2024-10-26 23:40:07 +02:00
Code for various AppleScripts I've written or modified for DEVONthink Pro 3
## 🔗 Bates Source Link - Citation Generator
Creates formatted citations from DEVONthink documents, with smart Bates number support.
## Usage
1. Open document in DEVONthink
2. Select text to quote
3. Run script
4. Paste formatted citation
## Output Examples
Bates-numbered documents:
```markdown
2024-10-27 01:03:25 +02:00
"The environmental impact study shows..." [FWS 4326 ](x-devonthink-item://... )
2024-10-26 23:40:07 +02:00
```
Regular documents:
```markdown
"The data indicates..." [Report Title at 5 ](x-devonthink-item://... )
```
## Features
2024-10-27 01:03:25 +02:00
- Copies selected text to clipboard
- Calculates Bates number using if filename has Bates start or range in it
- Appends deeplink to selected text in document to clipboard
- Formats clipboard in Markdown
2024-10-26 23:40:07 +02:00
- Works with both Bates and regular documents
## Installation
1. Open DEVONthink
2. Go to Scripts menu
3. Select "Open Scripts Folder"
4. Add script to folder
## Keyboard Shortcut (Optional)
1. System Settings → Keyboard → Keyboard Shortcuts
2. Select "App Shortcuts" → "+"
3. Choose DEVONthink
4. Enter exact script name
5. Assign desired shortcut
## Requirements
- DEVONthink Pro
- macOS
- Perl (for URL encoding)
2024-10-27 01:03:25 +02:00
- For Bates numbering, documents should be titled in one of these formats:
- `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 )
2024-10-26 23:40:07 +02:00
## Notes
- Works best with consistent Bates number formatting
- Creates markdown-compatible citations
- Copies result to clipboard
- Perfect for legal research and document analysis