Skip to content

A Discord bot that monitors SDRTrunk recordings and transcriptions, providing real-time updates of radio communications in a clean, organized format.

License

Notifications You must be signed in to change notification settings

cryptofyre/Swimtrunks

Repository files navigation

Swimtrunks

A Discord bot that monitors SDRTrunk recordings and transcriptions, providing real-time updates of radio communications in a clean, organized format.

๐ŸŒŸ Features

  • Real-time monitoring of SDRTrunk recordings
  • Efficient private detail censoring
  • Automatic transcription posting
  • Department color coding and categorization
  • Department-based emoji indicators
  • System status monitoring
  • Detailed logging system
  • Graceful startup and shutdown handling
  • SQLite database integration

๐Ÿ“‹ Prerequisites

  • Node.js v18 or higher
  • SDRTrunk with recording capability
  • My sdrTrunkTranscriber fork
  • SQLite database setup from SDRTrunk
  • Discord bot token and channel

๐Ÿ”ง Dependencies

{
  "dependencies": {
    "discord.js": "^14.x",
    "sqlite3": "^5.x",
    "chalk": "^4.1.2",
    "systeminformation": "^5.x",
    "xml2js": "^0.6.x"
  }
}

๐Ÿš€ Installation

  1. Clone the repository:
git clone https://github.com/cryptofyre/swimtrunks.git
cd swimtrunks
  1. Install dependencies:
npm install
  1. Create config.json:
{
    "discord": {
        "token": "YOUR_BOT_TOKEN",
        "channelId": "YOUR_CHANNEL_ID"
    },
    "database": {
        "path": "/path/to/sdrtrunk/recordings.db"
    },
    "playlist": {
        "path": "/path/to/sdrtrunk/playlist/default.xml"
    },
    "polling": {
        "interval": 5000,
        "batchSize": 5
    },
    "logging": {
        "level": "info",
        "timestamps": true,
        "colors": true
    }
}

๐Ÿ“ Configuration

  • discord.token: Your Discord bot token
  • discord.channelId: Channel ID where messages will be sent
  • database.path: Path to SDRTrunk's SQLite database
  • playlist.path: Path to SDRTrunk's playlist XML
  • polling.interval: How often to check for new recordings (ms)
  • polling.batchSize: Maximum number of recordings to process at once
  • logging: Logging configuration options

๐ŸŽฏ Usage

Start the bot:

node main.js

๐Ÿšจ Department Colors

The bot automatically color-codes departments:

  • ๐Ÿ‘ฎ Law Enforcement: Blue
  • ๐Ÿš’ Fire Department: Red
  • ๐Ÿšจ Emergency Management: Orange
  • ๐Ÿ”ง Public Works: Green
  • ๐ŸŽ“ Schools: Purple
  • ๐Ÿ“ก Radio/Events: Yellow
  • โœˆ๏ธ Airport Operations: Light Blue
  • ๐Ÿ”” Other: Default Blue

๐Ÿ“Š System Monitoring

The bot provides system information on startup:

  • System specifications
  • Resource usage
  • SDRTrunk status
  • Transcriber status
  • Memory utilization

๐Ÿ“œ License

This project is licensed under GPL-3.0. See the LICENSE file for details.

๐Ÿ‘ฅ Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

โš ๏ธ Important Notes

  • Never commit your config.json with sensitive information
  • Ensure proper file permissions for database and XML access
  • Monitor the logs for any potential issues
  • Keep your dependencies updated

๐Ÿค Support

For support, please open an issue in the GitHub repository.

About

A Discord bot that monitors SDRTrunk recordings and transcriptions, providing real-time updates of radio communications in a clean, organized format.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project