Elite: Dangerous Journal Event Handler
Project description
Elite Relay
Elite: Dangerous Journal Event Handler
[!IMPORTANT] This document is a work-in-progress and may contain incomplete information.
Introduction
elite-relay is a small program that tracks events recorded in your Elite: Dangerous journal file
and allows you respond to them in certain ways, including:
- Sending an HTTP request with the event data, e.g. firing a webhook to a service like Home Assistant or Zapier.
- Copying text to your clipboard, e.g. the name of the star system you just jumped to.
- Opening a templated URL in your browser, e.g. opening an Inara.cz "search nearest" page when jumping to a new system.
Event handlers ("plugins") are defined in .edr/config.yaml located in your home directory. See "Configuring plugins"
for more information, or check out some examples in examples.yaml.
Installation
Using the MSI installer
The easiest way to install elite-relay is via the MSI installer included in the latest release.
Simply download the file and open it, the program will then be installed to your $FOLDER folder. Open the main.exe file
to start it.
Using pip
Alternatively, you may install elite-relay via Python's pip package manager (or any other Python package manager of your choosing):
pip install --upgrade elite-relay
You can now run elite-relay in a terminal to start the program.
Configuring plugins
Event handlers ("plugins") are defined in .edr/config.yaml located in your home directory. There are a few basic options
that apply to all plugins, as well as plugin-specific options that are defined under the options key. Let's start with a
basic example that will copy the name of the star system to our clipboard whenever an FSDJump event occurs:
plugins:
- plugin: clipboard
action: copy
filters:
- key: type
eq: FSDJump
options:
text: ${data.StarSystem}
Let's break it down:
Global options
Plugins & actions
The plugin: clipboard key tells the program which "plugin" to use when responding to an event. All plugins are comprised
of different "actions," in this example it's copy.
Filters
Filters allow us to only respond to events that we care about. In this example we only want to copy text to our clipboard
whenever the FSDJump event type is recorded, hence the filters block above:
filters:
- key: type
eq: FSDJump
In this instance we're telling the program to only respond to events where the type is exactly equal to FSDJump.
Filters can also use regular expressions (regex) for more complex filtering operations. To use
regex filtering enable it by setting regex: true in the filter; now the expression in the eq key will be evaluated
as regex. For example if we wanted to narrow our filter further by only triggering on systems that begin with "HIP" we
could do the following:
filters:
- key: type
eq: FSDJump
- key: data.StarSystem
eq: ^HIP (.*)$
regex: true
Filter keys may also use JMESPath syntax to reference deeply-nested information within the event data. For example, if we wanted to trigger if the first power in the system is "Li Yong-Rui" we would do:
filters:
- key: type
eq: FSDJump
- key: data.Powers[0]
eq: Li Yong-Rui
Plugin-specific options
The options key above provides plugin-specific options that are documented alongside the code for each plugin
in the plugins directory.
In this example the clipboard.copy action has a required option for the text we wish to copy. The text is templated,
meaning that we can reference data within the event to copy. In this instance ${data.StarSystem} will be converted to
the name of the actual star system we just jumped to:
options:
text: ${data.StarSystem}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elite_relay-0.2.1.tar.gz.
File metadata
- Download URL: elite_relay-0.2.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1419030c204c8693ca2fab17c1e5208abb33b16e474707130632b6954b054150
|
|
| MD5 |
5cc689275c54e2d38cca907148451672
|
|
| BLAKE2b-256 |
304519477ebb5b12c49036728f6ff3c07e9dff38f744eb104b2e9c5d991ff1d2
|
File details
Details for the file elite_relay-0.2.1-py3-none-any.whl.
File metadata
- Download URL: elite_relay-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0172564b77dbc804d04e0d32da4155c8645b48f31e0d6c3a1dc7e176298759e6
|
|
| MD5 |
30957b1dd117ba3ed584460bb4c20d92
|
|
| BLAKE2b-256 |
45fbcb4e0bd25c9fe841838820e2a6172c99529025472b56fea63bf830bf18e2
|