{"id":15289084,"url":"https://github.com/andimiller/killmail-router","last_synced_at":"2025-03-24T05:43:12.762Z","repository":{"id":248435441,"uuid":"828572780","full_name":"andimiller/killmail-router","owner":"andimiller","description":"discord killmail router","archived":false,"fork":false,"pushed_at":"2024-08-03T22:49:30.000Z","size":194,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T11:30:23.367Z","etag":null,"topics":["eve-online","scala","zkillboard"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andimiller.png","metadata":{"files":{"readme":"docs/readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-14T14:55:29.000Z","updated_at":"2024-08-03T22:49:33.000Z","dependencies_parsed_at":"2024-08-03T23:37:28.220Z","dependency_job_id":"09322bd4-ea0a-460d-bdcc-0979a24126a4","html_url":"https://github.com/andimiller/killmail-router","commit_stats":null,"previous_names":["andimiller/killmail-router"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andimiller%2Fkillmail-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andimiller%2Fkillmail-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andimiller%2Fkillmail-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andimiller%2Fkillmail-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andimiller","download_url":"https://codeload.github.com/andimiller/killmail-router/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217791,"owners_count":20579297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eve-online","scala","zkillboard"],"created_at":"2024-09-30T15:59:14.906Z","updated_at":"2025-03-24T05:43:12.733Z","avatar_url":"https://github.com/andimiller.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# killmail-router \n\nA microservice for routing [zkillboard](https://zkillbord.com) killmails to [discord](https://discord.com) webhooks, based on configurable filters.\n\n## Configuration\n\nYou configure the service with a config file like this:\n\n```yaml\nroutes:\n- name: my-corp\n  filter: |-\n    (let\n      [\n        (my-corp (== root.corporation_id 123456))\n      ]\n      (or\n        (apply root.killmail.victim my-corp)\n        (exists root.killmail.attackers my-corp)\n      )\n    )\n  webhook: https://discord.com/api/webhooks/YOUR-WEBHOOK-HERE\n  template: https://zkillboard.com/kill/${root.killID}\n```\n\n## Running\n\nAnd it can be run with docker, kubernetes or anything else that can handle docker containers:\n\n```sh\ndocker run -it --mount type=bind,source=./config.yml,target=/config.yml  andimiller/killmail-router:@VERSION@ /config.yml your-zkillboard-queue-id\n```\n\n## Filters\n\nPaths work like so:\n```lisp\nroot          ; just the JSON object as it is\nroot.key      ; look at a specific key\nroot[1]       ; look at a specific array item\nroot.a.b.c[2] ; combine them all together\n```\n\nThe following lisp filters are available:\n\n```lisp\n; Basic filters\n(== root.killmail.corporation_id 1234)     ; check if the JSON path in the killmail is equal to this value\n(\u003c root.zkb.points 10)                     ; check if the JSON path has a numerical value above 10\n(\u003c root.zkb.points 10)                     ; check if the JSON path has a numerical value below 10\n(contains root.zkb.labels \"pvp\")           ; check if an array at a JSON path contains a value\n\n; Combination filters\n(not (== root.killmaio.corporation_id 1234))       ; negate another filter, check if it's not true\n(and \n  (\u003e root.zkb.points 5)\n  (\u003c root.zkb.points 20)\n) ; combine two filters, require them both to be true\n(or \n  (== killmail.corporation_id 1234)\n  (== killmail.corporation_id 1234)\n) ; combine two filters, require one of them to be true\n\n; Meta programming\n(apply root.killmail (== root.solar_system_id 123456))             ; apply an expression to a specific subpath\n(exists root.killmail.attackers (== root.corporation_id 123456))   ; check if any items in an array satisfy an expression \n(let\n  [\n    (my-corp (== root.corporation_id 123456))   ; define an expression called my-corp\n  ]\n  (\n    (apply root.killmail.victim my-corp)        ; use it by name in the body of the let\n    (exists root.killmail.attackers my-corp)    \n  )\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandimiller%2Fkillmail-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandimiller%2Fkillmail-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandimiller%2Fkillmail-router/lists"}