First commit on the local Gitea server, made after moving the tree off the Windows machine. Build outputs, node_modules and the AI models stay out (see .gitignore); everything the installer build needs is tracked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5.1 KiB
Accordance API Integration Guide
This guide explains how to use the Accordance Bible Software API integration to enhance popup cards for underlined words in the Bible App.
Overview
The Accordance integration allows your Bible App to query Accordance Bible Software for enhanced word information, including:
- Strong's numbers
- Lexical forms
- Morphology information
- Definitions
- Usage notes
- Cross-references
- Commentary references
- Original language details
Setup
1. Configure Accordance OSC Settings
The integration uses OSC (Open Sound Control) to communicate with Accordance. Your osc-config.json file is already configured:
{
"address": "0.0.0.0",
"port": 3333,
"allow": ["10.6.3.222"],
"allowPrefixes": ["10."],
"token": "?WaT3rs2016!"
}
Note: You may need to add an accordancePort field to specify the port Accordance listens on (commonly 3334). Update your config:
{
"address": "0.0.0.0",
"port": 3333,
"accordancePort": 3334,
"allow": ["10.6.3.222"],
"allowPrefixes": ["10."],
"token": "?WaT3rs2016!"
}
2. Enable Accordance OSC in Accordance
- Open Accordance Bible Software
- Go to Preferences/Settings
- Enable OSC support (if available)
- Configure the OSC port (default is often 3334)
- Ensure Accordance is running when using the Bible App
3. Verify Integration
The integration will automatically check if Accordance is available when you click on underlined words. If Accordance is not running or not configured, the app will fall back to the standard word information.
How It Works
Word Click Flow
- User clicks on an underlined word in the Bible text
- The app fetches basic word information (Greek/Hebrew) from local dictionaries
- If Accordance is available, the app queries Accordance via OSC for additional information
- The popup card displays:
- Standard Greek/Hebrew information
- Enhanced Accordance data (if available)
API Endpoints
The integration adds two server endpoints:
- GET
/api/accordance/status- Check if Accordance is available - POST
/api/accordance/word- Query Accordance for word information
Client-Side Module
The accordance-api.js module provides:
queryAccordanceWord(word, reference)- Query Accordance for a specific wordenhanceWordInfoWithAccordance(wordInfo, word, reference)- Enhance existing word info with Accordance datacheckAccordanceAvailability()- Check if Accordance integration is available
Customizing Accordance OSC Commands
Based on the Accordance API forum discussion, you may need to adjust the OSC message format in server.js. The current implementation uses:
/accordance/word [word] [reference]
You may need to modify this based on Accordance's actual OSC API. Check the Accordance documentation or forum for the correct OSC address patterns.
Example OSC Message Format
{
address: '/accordance/word',
args: [
{ type: 's', value: 'love' },
{ type: 's', value: 'John 3:16' }
]
}
Popup Display
When Accordance data is available, the popup card will show an "Accordance" section with:
- Strong's: Strong's number (e.g., G25)
- Lexical Form: Base form of the word
- Morphology: Grammatical information
- Definition: Detailed definition
- Usage: Usage notes
- Original Language: Original language text
- Cross References: Related verses
- Commentaries: Commentary references
Troubleshooting
Accordance Data Not Appearing
- Check Accordance is running: Ensure Accordance Bible Software is running
- Verify OSC port: Check that Accordance's OSC port matches your config
- Check network: Ensure both apps can communicate (same machine or network)
- Review console: Check browser console for Accordance API errors
- Test status endpoint: Visit
/api/accordance/statusto verify configuration
OSC Connection Issues
- Ensure the OSC module is installed:
npm i osc - Check firewall settings if using network communication
- Verify IP addresses in
osc-config.jsonmatch your network setup
Future Enhancements
Based on the Accordance API forum discussion, potential enhancements include:
- Real-time Instant Details: Display Accordance's Instant Details panel data
- Commentary Integration: Show commentary excerpts directly in popups
- Cross-Reference Navigation: Make cross-references clickable
- Multiple Resource Support: Query multiple Accordance resources simultaneously
- Caching: Cache Accordance responses for better performance
References
- Accordance API Forum Discussion: https://forums.accordancebible.com/topic/37607-accordance-api-a-user-driven-vision-for-the-future/
- OSC Protocol Documentation: Standard OSC protocol for inter-application communication
Support
For issues or questions:
- Check the browser console for error messages
- Verify Accordance is running and OSC is enabled
- Review the server logs for OSC communication errors
- Consult Accordance documentation for OSC API details