{"id":13578207,"url":"https://github.com/siffiejoe/lua-cprint","last_synced_at":"2025-12-27T15:03:53.082Z","repository":{"id":8491167,"uuid":"10097132","full_name":"siffiejoe/lua-cprint","owner":"siffiejoe","description":"Improved print function that handles ANSI escapes even on Windows","archived":false,"fork":false,"pushed_at":"2020-07-11T07:18:53.000Z","size":9,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T16:36:29.594Z","etag":null,"topics":["colors","console","escape-sequences","lua"],"latest_commit_sha":null,"homepage":null,"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/siffiejoe.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}},"created_at":"2013-05-16T08:34:56.000Z","updated_at":"2024-05-12T10:49:18.000Z","dependencies_parsed_at":"2022-07-21T14:32:19.653Z","dependency_job_id":null,"html_url":"https://github.com/siffiejoe/lua-cprint","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/siffiejoe/lua-cprint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Flua-cprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Flua-cprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Flua-cprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Flua-cprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siffiejoe","download_url":"https://codeload.github.com/siffiejoe/lua-cprint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siffiejoe%2Flua-cprint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28080200,"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-12-27T02:00:05.897Z","response_time":58,"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":["colors","console","escape-sequences","lua"],"created_at":"2024-08-01T15:01:28.433Z","updated_at":"2025-12-27T15:03:53.014Z","avatar_url":"https://github.com/siffiejoe.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"#                               cprint                               #\n\nImproved print function that handles ANSI escapes even on Windows\n\n\n##                               Usage                              ##\n\nThe function returned by this Lua module is compatible with the\ndefault Lua `print` function and can serve as a replacement for it.\n\n    print = require( \"cprint\" )\n    print( \"hello world\" )\n\nAdditionally, the following ANSI color escape sequences are supported\non both Windows and POSIX platforms:\n\n*   `\"\\027[30m\"` to `\"\\027[37m\"`, and `\"\\027[39m\"`\n\n    Those escape sequences set the foreground color to black, red,\n    green, yellow, blue, magenta/purple, cyan/aqua, white, and the\n    default foreground color, respectively.\n\n*   `\"\\027[40m\"` to `\"\\027[47m\"`, and `\"\\027[49m\"`\n\n    Those escape sequences set the background color to black, red,\n    green, yellow, blue, magenta/purple, cyan/aqua, white, and the\n    default background color, respectively.\n\n*   `\"\\027[0m\"`, `\"\\027[1m\"`, and `\"\\027[7m\"`\n\n    Those escape sequences represent normal mode, bright/highlighted\n    mode, and inverted mode.\n\nThe escape sequences can be combined by separating the numbers with\n`;`, e.g.:\n\n    print( \"\\027[31;1mbright red\\027[39;49;0m\" )\n\nIf the standard output stream is not connected to a terminal/console,\nor if the terminal is not recognized as compatible, the escape\nsequences are stripped from the output.\n\n\n##                              License                             ##\n\ncprint is *copyrighted free software* distributed under the MIT\nlicense (the same license as Lua 5.1). The full license text follows:\n\n    cprint (c) 2013 Philipp Janda\n\n    Permission is hereby granted, free of charge, to any person obtaining\n    a copy of this software and associated documentation files (the\n    \"Software\"), to deal in the Software without restriction, including\n    without limitation the rights to use, copy, modify, merge, publish,\n    distribute, sublicense, and/or sell copies of the Software, and to\n    permit persons to whom the Software is furnished to do so, subject to\n    the following conditions:\n\n    The above copyright notice and this permission notice shall be\n    included in all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n    IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY\n    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nThe actual code implementing the `print` function is taken almost\nverbatim from the [Lua][1] source code, which is\n\n    Copyright (C) 1994-2013 Lua.org, PUC-Rio.\n\n  [1]:  http://www.lua.org/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiffiejoe%2Flua-cprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiffiejoe%2Flua-cprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiffiejoe%2Flua-cprint/lists"}