{"id":21041959,"url":"https://github.com/solidx/suicatools","last_synced_at":"2025-03-13T21:41:21.096Z","repository":{"id":68986191,"uuid":"469539172","full_name":"SolidX/SuicaTools","owner":"SolidX","description":"A .NET application to decode history entries from Suica cards in to human readable information.","archived":false,"fork":false,"pushed_at":"2023-01-02T18:13:00.000Z","size":196,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T17:16:24.696Z","etag":null,"topics":["suica"],"latest_commit_sha":null,"homepage":"","language":"C#","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/SolidX.png","metadata":{"files":{"readme":"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":"2022-03-14T01:15:14.000Z","updated_at":"2025-01-19T16:15:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f61e3a9-07e8-4f82-a1e0-d305addbd418","html_url":"https://github.com/SolidX/SuicaTools","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/SolidX%2FSuicaTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidX%2FSuicaTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidX%2FSuicaTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidX%2FSuicaTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolidX","download_url":"https://codeload.github.com/SolidX/SuicaTools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243489407,"owners_count":20298991,"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":["suica"],"created_at":"2024-11-19T13:57:00.091Z","updated_at":"2025-03-13T21:41:21.069Z","avatar_url":"https://github.com/SolidX.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Suica Tools\nA .NET application to decode history entries from [Suica](https://en.wikipedia.org/wiki/Suica) cards in to human readable information. This project was started half out of curiousity about how Japanese transit smart cards work and half out of a desire to try out .NET 6.\n\n## Goals\n- ~~Decode history entries written to IC cards~~\n- Localize Train Station Information\n- ~~Export entries as financial data files~~ (QIF because what is the OFX format)\n- A fancy UI maybe?\n\n## How to Build\nYou're going to need Visual Studio 2022 and .NET 6.0 for this project.\n\n## Data Sources\n### History Data Format\nIC Card transaction history is stored as an array of 16 bytes and a card can hold up to 20 transaction records. The format of this data was reverse engineered by enthusiasts and is partially explained [here](http://jennychan.web.fc2.com/format/suica.html).\n\n### Train Station Information\nThe entry \u0026 exit train stations are stored as a triple of bytes representing the Region, Line, and Station. This encoding is known as the [サイバネコード](https://ja.wikipedia.org/wiki/%E9%A7%85%E3%82%B3%E3%83%BC%E3%83%89#%E3%82%B5%E3%82%A4%E3%83%90%E3%83%8D%E3%82%B3%E3%83%BC%E3%83%89) or Saibane Code and is maintained and defined by the [Japan Railway Engineers' Association](https://www.jrea.or.jp/). However, not all codes are assigned to train stations. Some are for testing purposes, specific shops in stations, or particular financial transactions.\n\nAfter scouring the internet, I found an ancient CSV dump Saibane Code to station mappings reverse engineered by Japanese railfans. The file lacks headers and contains duplicates but is available [here](Data%20Dources/StationCode.csv).\n\nIn order to provide useful information, I've mapped many of these codes to their corresponding EkiData station ids. [EkiData](https://ekidata.jp/) is a popular database containing most Japanese railway stations. I then used a variety of sources (espeically Wikipedia) to localize the names of railway operators, lines, and some stations for English speakers. Huge thanks to @piuccio whose [\"open-data-jp\"](https://github.com/piuccio?utf8=%E2%9C%93\u0026tab=repositories\u0026q=open-data-jp-rail\u0026type=\u0026language=) projects made this a lot easier.\n\n### Bus Stop Information\nBus stop information is stored as 2 16-bit unsigned integers, one for the Bus Line and one for the Bus Stop.\n\nI've found a CSV dump of the [IruCa](https://en.wikipedia.org/wiki/IruCa) Bus Stop codes and included it [here](Data%20Dources/IruCaStationCode.csv).\n\n### Point of Sale Information\nThat's a very big TBD","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidx%2Fsuicatools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidx%2Fsuicatools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidx%2Fsuicatools/lists"}