- red-alert-listener.conf.json is being searched under current working directory by default (can be changed by stating the path (can be relative) to the configuration file via
-c
flag). - JRE 22 (or newer)
- Must have an Israeli IP address.
- JAR can be downloaded through
Packages → io.github.ashr123.red-alert-listener → Assets → red-alert-listener-<version>-jar-with-dependencies.jar
-
Display alerts as the Home Front Command produces them.
-
Make alert sound if the event contains areas of interest defined in red-alert-listener.conf.json.
-
Supports all official languages:
- Hebrew (code
HE
) - English (code
EN
) - Russian (code
RU
) - Arabic (code
AR
)
- Hebrew (code
-
districts.json
(like districts-en.json example) created fromget-remote-districts-as-json-to-file
command is of the following shape (in TypeScript terms):const data: Record<string /*translated area name*/, Record<string /*duration in seconds to arrive to protected place (as string)*/, Record<string /*district name in Hebrew*/, string /*district translation*/>>> = require('districts-en.json');
Or in Java terms:
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.KeyDeserializer; import com.fasterxml.jackson.databind.json.JsonMapper; import com.fasterxml.jackson.databind.util.StdConverter; import java.io.IOException; import java.time.Duration; static class DurationFromSecondsKeyDeserializer extends KeyDeserializer { @Override public Duration deserializeKey(String key, DeserializationContext ctxt) { return Duration.ofSeconds(Long.parseLong(key)); } } public static void main(String... args) throws IOException { final Map<String /*translated area name*/, Map<Duration /*duration in seconds to arrive to protected place*/, Map<String /*district name in Hebrew*/, String /*district translation*/>>> data = new JsonMapper() .registerModule(new SimpleModule() .addKeyDeserializer(Duration.class, new DurationFromSecondsKeyDeserializer())) .readValue( new File("districts-en.json"), new TypeReference<>() { } ); }
Legal districts (and their translation) can be found by:
- Running
java -jar <downloaded-jar-file>.jar get-remote-districts-as-json -l <language code> | egrep -i "<district1>|<district2>[|...]"
- Saving those districts to file like
this:
java -jar <downloaded-jar-file>.jar get-remote-districts-as-json-to-file -l <language code> [-o <your-file-name>.json]
(the default file name isdistricts.json
) and search in it as you may like.
- On Raspberry Pi 4 with Ubuntu 22.10, alert sound isn't working.