{"id":15832716,"url":"https://github.com/davealdon/output-capture","last_synced_at":"2025-09-18T14:05:51.690Z","repository":{"id":105658954,"uuid":"209640523","full_name":"DaveAldon/Output-Capture","owner":"DaveAldon","description":"👮 Captures the output of common ObjectScript terminal verbs, such as zwrite","archived":false,"fork":false,"pushed_at":"2024-08-26T14:43:25.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-08T08:52:32.592Z","etag":null,"topics":["intersystems","intersystems-cache","intersystems-iris","intersystems-samples","objectscript","terminal"],"latest_commit_sha":null,"homepage":"","language":"ObjectScript","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/DaveAldon.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}},"created_at":"2019-09-19T20:12:23.000Z","updated_at":"2024-08-26T14:43:29.000Z","dependencies_parsed_at":"2024-10-05T13:00:44.448Z","dependency_job_id":null,"html_url":"https://github.com/DaveAldon/Output-Capture","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DaveAldon/Output-Capture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2FOutput-Capture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2FOutput-Capture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2FOutput-Capture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2FOutput-Capture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaveAldon","download_url":"https://codeload.github.com/DaveAldon/Output-Capture/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2FOutput-Capture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275780765,"owners_count":25527345,"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-18T02:00:09.552Z","response_time":77,"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":["intersystems","intersystems-cache","intersystems-iris","intersystems-samples","objectscript","terminal"],"created_at":"2024-10-05T13:00:40.163Z","updated_at":"2025-09-18T14:05:51.669Z","avatar_url":"https://github.com/DaveAldon.png","language":"ObjectScript","readme":"# Output-Capture\n\n[![Gitter](https://img.shields.io/badge/Available%20on-Intersystems%20Open%20Exchange-00b2a9.svg)](https://openexchange.intersystems.com/package/Output-Capture)\n\nCaptures the output of common objectscript terminal verbs, such as zwrite\n\nHave you ever found great value in what zwrite, zzdump etc. outputs to the terminal? Did you ever want to store that information in a variable or something useful? Now you can!\n\n## Usage\n\nThis function has **two** parameters: the variable, and the verb. The variable can be whatever you want to inspect, and the verb can be any of the following that normally output to the terminal:\n\n- zwrite\n- zzwrite\n- zzdump\n- write\n\nThe verb parameter is optional, and defaults to zwrite, but add any of these as a string to the second parameter of the function call to receive its output, like the following:\n\n```\nUSER\u003eset YOUR_VARIABLE = {\"some\":\"thing\"}\nUSER\u003ewrite ##class(OutputCapture.capture).Get(YOUR_VARIABLE,\"zzdump\")\nUSER\u003e41@%Library.DynamicArray\n```\n\n### If you don't want an array returned...\n\nJust call the following for a string output:\n\n```\nUSER\u003eset x = {\"asdasd\":\"asdasdasdasdasd\"}\nUSER\u003ewrite ##class(CaptureOutput.capture).GetString(x,\"zwrite\")\nUSER\u003evar=\u003cOBJECT REFERENCE\u003e[41@%Library.DynamicObject]\n+----------------- general information ---------------\n|      oref value: 41\n|      class name: %Library.DynamicObject\n| reference count: 4\n+----------------- attribute values ------------------\n|           (none)\n+-----------------------------------------------------\n{65275,59764{9{\n```\n\n## Example\n\nIf you'd like to this is in action immediately, just call the \"Example\" function:\n\n```\nUSER\u003ewrite ##class(OutputCapture.capture).Example()\nUSER\u003e0000: 33 37 40 25 4C 69 62 72 61 72 79 2E 44 79 6E 61         37@%Library.Dyna\n0010: 6D 69 63 4F 62 6A 65 63 74                              micObject{65275,58264{4{\n```\n\nThis function sends a simple variable with the zzdump command, and loops through the returned object and outputs it so that you can see what everything looks like.\n\n## Version history\n2019-09-19 - v1.0 - Initial commit of functions with features outlined in description\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavealdon%2Foutput-capture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavealdon%2Foutput-capture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavealdon%2Foutput-capture/lists"}