Skip to content

SweetJonnySauce/EDDN-Scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EDDN Scraper

Python utility that listens to the Elite Dangerous Data Network (EDDN) Journal feed, filters messages with user-defined criteria, and forwards grouped notifications to a Discord webhook and/or the terminal.

Prerequisites

  • Python 3.9 or newer.
  • The dependencies listed in requirements.txt (pip install -r requirements.txt).
  • A Discord webhook URL (optional if you only want terminal output).

Getting Started

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp config.example.yaml config.yaml

Edit config.yaml to set your Discord webhook, disable outputs you do not need, and tailor the filters you want to run.

Configuration Overview

  • eddn.relay: Relay endpoint to subscribe to (defaults to the public EDDN relay).
  • logging.level: Log verbosity (INFO, DEBUG, WARNING, ...).
  • debug.terminal_output: Default true; force terminal output when true, suppress it entirely when false; remove the key if you want to defer to output.terminal.enabled.
  • formatting.normalize_station_placeholders: Converts placeholder station names such as $EXT_PANEL_ColonisationShip into user-friendly labels (e.g., Colonization Ship) before they appear in captures, terminal output, and messages.
  • output.terminal.enabled: Prints matched events to the terminal with a readable block layout.
  • output.discord.*: Controls batching behaviour for webhook delivery. Messages are grouped according to batch_interval_seconds and max_batch_size, deduplicated across all filters within dedupe_window_seconds, and dispatched to respect Discord limits.
  • watchlists.systems / watchlists.stations: Lists of watched locations. Each entry can be a string or a mapping with name and optional alias; aliases feed the human-readable names used in terminal output, friendly messages, and Discord summaries.
  • filters: A list of match rules. Each rule is evaluated against the decoded EDDN payload. Use path values such as message.event or header.uploaderID, set op to one of eq, in, contains, regex, exists, gt, or lt, and provide value when the operator requires it. Optional captures let you list label/path pairs whose extracted values appear alongside matches, send_to_discord toggles whether matches for that filter are queued for the webhook, send_full_msg_to_terminal: true prints the entire Journal payload only when the log level is DEBUG (otherwise a note indicates full message output is disabled), and message_template can produce a friendly sentence using capture labels or built-in fields ({filter}, {event}, {system}, {body}, {commander}, {timestamp}), with timestamps rendered to minute-level UTC. To reuse a watchlist inside a condition, set value to {"watchlist": "systems"} (or stations). Leaving a condition’s value empty (for example an empty list for events) causes that condition to be ignored. When logging is set to DEBUG, the composed notification message, any captured fields, and each Discord batch payload are summarised to the terminal before the detailed block.

Filters are evaluated against the original payload, so the full message is still available in the Discord notifications or terminal logs if you want to add more context.

Running the Listener

python eddn_listener.py --config config.yaml

The listener runs until interrupted. Press Ctrl+C to stop it gracefully.

Notes

  • The script defaults to the Journal schema, but you can listen for other schemas by adjusting the schema substring in each filter.
  • Discord notifications are skipped entirely if no webhook URL is configured or if enabled is set to false.
  • The ZeroMQ socket polls in one-second intervals by default; you can tweak this via eddn.poll_timeout_ms if you need faster flushing at the expense of slightly higher CPU usage.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages