{"id":30842113,"url":"https://github.com/bmoneill/mbta2rss","last_synced_at":"2025-09-06T20:44:02.059Z","repository":{"id":301810666,"uuid":"1010376778","full_name":"bmoneill/mbta2rss","owner":"bmoneill","description":"MBTA alert/schedule feeds to RSS/HTML converter","archived":false,"fork":false,"pushed_at":"2025-07-02T17:20:29.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-06T23:37:18.380Z","etag":null,"topics":["boston","cron","mbta","python","rss"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmoneill.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-28T23:57:48.000Z","updated_at":"2025-06-29T19:20:00.000Z","dependencies_parsed_at":"2025-06-29T01:26:39.648Z","dependency_job_id":"88aae193-ebff-4906-823e-fddbe8a79664","html_url":"https://github.com/bmoneill/mbta2rss","commit_stats":null,"previous_names":["boneill02/mbta2rss","bmoneill/mbta2rss"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bmoneill/mbta2rss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmbta2rss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmbta2rss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmbta2rss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmbta2rss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmoneill","download_url":"https://codeload.github.com/bmoneill/mbta2rss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmbta2rss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273961596,"owners_count":25198597,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["boston","cron","mbta","python","rss"],"created_at":"2025-09-06T20:43:59.934Z","updated_at":"2025-09-06T20:44:02.050Z","avatar_url":"https://github.com/bmoneill.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mbta2rss\n\nThis software utilizes the [MBTA API](https://www.mbta.com/developers/v3-api)\nto grab alerts and stop lists for public transit routes in Greater\nBoston.\n\n## Features\n\n* Generate an RSS feed containing alerts, neatly formatted.\n* Only include certain routes.\n* Allow the user to use an API key.\n* Export alerts to Markdown.\n* Only include alerts active at a certain time.\n* Convert stop lists to Markdown format.\n\n## Dependencies\n\n* requests\n\n## Installation\n\nRun the following as root:\n\n```shell\nmake install\n```\n\n## Usage\n\n### Basics\n\nRun `mbta2rss \u003eout.xml`. Then you can open the XML file in your\nfavorite RSS feed reader. An API key can be placed in the\nenvironment variable `$APIKEY`. You can request one\n[here](https://api-v3.mbta.com/).\n\n### Options\n\n* `-d datatype`: choose type of data to grab (alerts or stops, default is alerts)\n* `-o fmt`: Set output format (rss or md, default is rss).\n* `-r routes`: Set route(s) to look for (comma separated)\n* `-t time`: Set time filter to show alerts active at that time\n  (default shows all times, \"NOW\" for alerts in effect now, must be in\n  ISO 8601 time format).\n* `-T title`: document/feed title\n* `-D description`: document/feed description\n* `-U url`: upstream URL for RSS feed\n\n### Use Cases\n\n* Set up a cron job to update alerts feed every hour or so.\n* Email alerts to you (for the route(s) you take or all routes).\n* Post alerts on a webpage.\n* View alerts in a RSS feed reader.\n\n### Cron-based Alert Updater\n\nAdd the following to your crontab:\n\n```crontab\n0 * * * * APIKEY=\"$MYAPIKEY\" /usr/bin/mbta2rss \u003e$HOSTDIR/rss.xml\n```\n\n### Emailing Digests\n\nAn example of emailing a Markdown-formatted digest using the `headmail` filter\nscript and `sendmail`:\n\n```shell\nAPIKEY=\"$MYAPIKEY\" mbta2rss -o md -r \"Red,Green-E,66\" -t \"NOW\" | headmail \"$FROM\" \"$TO\" | \\\n    sendmail -a \"$ACCOUNT\" -t \"$TO\"\n```\n\nIf you wanted to convert it to HTML first, a Markdown to HTML filter must be\nused (like [smu](https://github.com/Gottox/smu)):\n\n```shell\nAPIKEY=\"$MYAPIKEY\" mbta2rss -o md -r \"Red,Green-E,66\" -t \"NOW\" | smu | headmail \"$FROM\" \"$TO\" | \\\n    sendmail -a \"$MSMTPACCOUNT\" -t \"$TO\"\n```\n\n### Publishing Alerts\n\nIt is possible to make a HTML webpage (no CSS included by default) for the web\nusing the Markdown output format and piping it into a Markdown to HTML filter.\n\n```shell\nAPIKEY=\"$MYAPIKEY\" mbta2rss -o md | smu \u003eout.html\n```\n\n## Important Notes\n\n1. Without an API key, you are limited to 20 calls per minute.\n2. If you publish anything containing content related to this, make sure it is\n   clear this is unofficial and not officially affiliated with the MBTA. They\n   have a [license agreement](https://www.mass.gov/files/documents/2017/10/27/develop_license_agree_0.pdf).\n3. Green Line routes are differenciated like so: \"Green-B\", \"Green-C\", \"Green-D\", \"Green-E\"\n\n## Bugs\n\nNo known bugs. If one is found, submit an issue, PR, or email me with\na description and/or patch.\n\n## Contributing\n\nPlease feel free to contribute. Send patches via email or submit a pull request.\n\n## License\n\nCopyright (C) 2019-2025 Ben O'Neill \u003cben@oneill.sh\u003e. License: MIT.\nSee LICENSE for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmoneill%2Fmbta2rss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmoneill%2Fmbta2rss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmoneill%2Fmbta2rss/lists"}