{"id":16885576,"url":"https://github.com/haberman/vtparse","last_synced_at":"2025-07-08T02:39:10.409Z","repository":{"id":479199,"uuid":"104703","full_name":"haberman/vtparse","owner":"haberman","description":"A library to parse terminal escape sequences exactly how the real hardware does.","archived":false,"fork":false,"pushed_at":"2024-03-05T09:58:29.000Z","size":121,"stargazers_count":91,"open_issues_count":6,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-25T07:25:48.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://vt100.net/emu/dec_ansi_parser","language":null,"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/haberman.png","metadata":{"files":{"readme":"README","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":"2009-01-10T15:16:22.000Z","updated_at":"2025-01-06T13:01:55.000Z","dependencies_parsed_at":"2025-01-25T07:34:19.671Z","dependency_job_id":null,"html_url":"https://github.com/haberman/vtparse","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/haberman%2Fvtparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haberman%2Fvtparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haberman%2Fvtparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haberman%2Fvtparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haberman","download_url":"https://codeload.github.com/haberman/vtparse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244560372,"owners_count":20472219,"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-10-13T16:35:58.069Z","updated_at":"2025-03-20T05:46:27.447Z","avatar_url":"https://github.com/haberman.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\nVTParse - an implementation of Paul Williams' DEC compatible state machine parser\n          \u003chttp://www.vt100.net/emu/dec_ansi_parser\u003e\n\nAuthor: Joshua Haberman \u003cjoshua@reverberate.org\u003e\n\nThis code is in the public domain.\n\nBUILDING\n========\n\nRuby is required at build time to generate the tables in C.  To build the library\nand test program, just type make:\n\n$ make\n\u003cthis will create the test program and libvtparse.a\u003e\n\nI have only tested the build on Mac OS X and Linux, but it should build anywhere\nRuby and GCC are available.  Other C compilers should work as well, I just haven't\ntried them.\n\nTEST PROGRAM\n============\n\nThe test program shows how to use vtparse.  To see what kind of data is returned\nby the library, try:\n\n--------------------------------\n\n$ vim \u003e terminaloutput\n\u003ctype ':q\u003cENTER\u003e' to exit vim, even though you won't see it\u003e\n$ ./test \u003c terminaloutput  | head -16\nReceived action ESC_DISPATCH\nChar: 0x37 ('7')\n\nReceived action CSI_DISPATCH\nChar: 0x68 ('h')\n1 Intermediate chars:\n  0x3f ('?')\n1 Parameters:\n        47\n\nReceived action CSI_DISPATCH\nChar: 0x68 ('h')\n1 Intermediate chars:\n  0x3f ('?')\n1 Parameters:\n        1\n\n---------------------------------\n\nVERIFYING\n=========\n\nYou can also verify the validity of the state tables by running:\n\n$ ruby vtparse_check_tables.rb\nTables had all necessary transitions defined.\n\nThis checks to make sure that state transitions are defined for all states, for all\ncharacters 0-0xA0.\n\n\nTODO\n====\n\nOne possible enhancement is to allow the client to pass a return value from the\ncallback to say \"stop parsing.\"  The vtparse() function could return the number\nof bytes consumed from the input buffer.  This would be quite simple to do if\nsomeone needed this functionality, but I don't, so I didn't bother.\n\nCurrently there is no explicit character set support.  I don't know enough about\nthe relevant standards to know if vtparse should have character set support, or\nwhat that support would look like.  Suggestions along this vein are very welcome!\n\nCREDITS\n=======\n\nThanks to Julian Scheid for several bugfixes and enhancements.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaberman%2Fvtparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaberman%2Fvtparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaberman%2Fvtparse/lists"}