{"id":17796281,"url":"https://github.com/munificent/malison","last_synced_at":"2025-04-24T02:27:55.929Z","repository":{"id":18716189,"uuid":"21927098","full_name":"munificent/malison","owner":"munificent","description":"A little terminal emulation package for Dart.","archived":false,"fork":false,"pushed_at":"2024-09-29T22:58:50.000Z","size":128,"stargazers_count":76,"open_issues_count":1,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T06:08:09.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/malison","language":"Dart","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/munificent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2014-07-17T03:23:42.000Z","updated_at":"2025-02-15T13:20:11.000Z","dependencies_parsed_at":"2024-12-24T07:12:14.266Z","dependency_job_id":"3c7197f8-1be5-4c20-99af-969e1f91182a","html_url":"https://github.com/munificent/malison","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munificent%2Fmalison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munificent%2Fmalison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munificent%2Fmalison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munificent%2Fmalison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/munificent","download_url":"https://codeload.github.com/munificent/malison/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250547374,"owners_count":21448481,"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-27T11:43:03.242Z","updated_at":"2025-04-24T02:27:55.911Z","avatar_url":"https://github.com/munificent.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"Malison is a small [Dart][] library for drawing old school ASCII terminals in\nthe browser. I harvested it from my roguelike game, [Hauberk][] and it's aimed\nprimarily at web games ASCII graphics. Think of it like curses for the web.\n\n[dart]: https://www.dartlang.org/\n[hauberk]: https://github.com/munificent/hauberk\n\n## Using it\n\nAdd it to your package's pubspec:\n\n```yaml\ndependencies:\n  malison: any\n```\n\nThen use the library:\n\n```dart\nimport 'dart:html';\n\nimport 'package:malison/malison.dart';\n\nvoid main() {\n  // Create or query a \u003ccanvas\u003e element to bind it to.\n  var canvas = new CanvasElement();\n  document.body.children.add(canvas);\n\n  // Create a new terminal. CanvasTerminal uses your browser's fonts.\n  // RetroTerminal uses a built in DOS-style Code Page 437 font.\n  var terminal = new RetroTerminal.dos(80, 40, canvas);\n\n  // You can draw strings at given positions.\n  terminal.writeAt(0, 0, \"This is a terminal!\");\n\n  // You can control the foreground and background color.\n  terminal.writeAt(0, 1, \"This is blue on green\", Color.blue, Color.green);\n\n  // You can also draw individual glyphs -- character+color units.\n  terminal.drawGlyph(3, 4, new Glyph.fromCharCode(CharCode.blackHeartSuit,\n      Color.red, Color.white));\n\n  // When you're done drawing, tell it to render all of the changes. It renders\n  // in batches for performance.\n  terminal.render();\n}\n```\n\n## Example\n\nThe repo includes a little example web application so you can see it in action.\nFrom the root of repo, run:\n\n```sh\n$ dart run build_runner serve\n```\n\nThen in your browser of choice, navigate to `http://localhost:8080`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunificent%2Fmalison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmunificent%2Fmalison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunificent%2Fmalison/lists"}