{"id":19680168,"url":"https://github.com/drewolson/bridge-diagrams","last_synced_at":"2025-10-04T05:25:04.357Z","repository":{"id":66427594,"uuid":"420510911","full_name":"drewolson/bridge-diagrams","owner":"drewolson","description":"Generate plain text bridge diagrams","archived":false,"fork":false,"pushed_at":"2024-11-26T01:02:18.000Z","size":126,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-26T02:18:10.023Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drewolson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-10-23T20:01:06.000Z","updated_at":"2024-11-26T01:02:22.000Z","dependencies_parsed_at":"2023-10-15T19:27:03.859Z","dependency_job_id":null,"html_url":"https://github.com/drewolson/bridge-diagrams","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewolson%2Fbridge-diagrams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewolson%2Fbridge-diagrams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewolson%2Fbridge-diagrams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewolson%2Fbridge-diagrams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drewolson","download_url":"https://codeload.github.com/drewolson/bridge-diagrams/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233297610,"owners_count":18654838,"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":[],"created_at":"2024-11-11T18:04:14.653Z","updated_at":"2025-10-04T05:24:59.316Z","avatar_url":"https://github.com/drewolson.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bridge Diagrams\n\nA CLI, Discord bot, and Slack bot for generating plain-text bridge diagrams.\n\n## Build\n\n```\n$ stack build\n```\n\n## Test\n\n```\n$ stack test\n```\n\n## Run\n\n### CLI\n\nThe CLI reads input from `stdin`:\n\n```\n$ stack run bridge-cli-exe -- --help\n```\n\n```\n$ stack run bridge-cli-exe \u003c\u003c\u003c 'akxxx qtx - qjxxx'\n♠AKxxx\n♥QTx\n♦\n♣QJxxx\n\n$ stack run bridge-cli-exe \u003c\u003c\u003c 't987 6543 - 76532; akqj akqj ak kj9; - - q8765432 aqt84; 65432 t9872 jt9 -, r/r, imps'\nVul: R/R   ♠T987\nIMPs       ♥6543\n           ♦\n           ♣76532\n♠65432      -----     ♠AKQJ\n♥T9872     |  N  |    ♥AKQJ\n♦JT9       |W   E|    ♦AK\n♣          |  S  |    ♣KJ9\n            -----\n           ♠\n           ♥\n           ♦Q8765432\n           ♣AQT84\n```\n\n### Discord\n\nThe Discord bot needs a `DISCORD_TOKEN` with scopes that allow for connecting to\nthe server, sending messages, and managing messages.\n\n```\nDISCORD_TOKEN=\u003credacted\u003e stack run bridge-discord-exe\n```\n\nOnce associated with a server, messages prefixed with `!bridge` will be handled\nby the bot.\n\n```\n!bridge akxxx qtx - qjxxx\n```\n\n### Slack\n\nThe Slack bot uses [socket mode](https://api.slack.com/apis/connections/socket)\nand needs a [bot token](https://api.slack.com/authentication/token-types#bot)\nand a [user token](https://api.slack.com/authentication/token-types#user).\n\nThe bot token needs the following scopes:\n\n* chat:write\n* chat:write.customize\n* chat:write.public\n* commands\n\nThe user token needs the following scopes:\n\n* chat:write\n\n```\nSLACK_TOKEN=\u003credacted\u003e SLACK_USER_TOKEN=\u003credacted\u003e stack run bridge-slack-exe\n```\n\nThe bot should be installed as a slash command. I tend to choose `/bridge` as\nthe command. Messages can then be sent to the bot via the slash command.\n\n```\n/bridge akxxx qtx - qjxxx\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewolson%2Fbridge-diagrams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrewolson%2Fbridge-diagrams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewolson%2Fbridge-diagrams/lists"}