{"id":13857180,"url":"https://github.com/lonetwin/colorize","last_synced_at":"2025-07-13T20:31:08.271Z","repository":{"id":136163637,"uuid":"85348768","full_name":"lonetwin/colorize","owner":"lonetwin","description":"*nixy filter that adds color to its standard input by rows or columns","archived":false,"fork":false,"pushed_at":"2019-03-12T20:46:46.000Z","size":16,"stargazers_count":85,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-22T14:39:42.703Z","etag":null,"topics":["cli","color","python","unix-pipes"],"latest_commit_sha":null,"homepage":"","language":"Python","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/lonetwin.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2017-03-17T19:42:00.000Z","updated_at":"2024-10-16T18:57:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b251a51-c8a4-4b53-8136-26291c7eb1d6","html_url":"https://github.com/lonetwin/colorize","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lonetwin/colorize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonetwin%2Fcolorize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonetwin%2Fcolorize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonetwin%2Fcolorize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonetwin%2Fcolorize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lonetwin","download_url":"https://codeload.github.com/lonetwin/colorize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonetwin%2Fcolorize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265199699,"owners_count":23726704,"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":["cli","color","python","unix-pipes"],"created_at":"2024-08-05T03:01:29.047Z","updated_at":"2025-07-13T20:31:08.028Z","avatar_url":"https://github.com/lonetwin.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"colorize\n========\n\n\\*nixy filter that adds color to its standard input by rows or columns\n\n\nExample usage\n\n* output alternate rows in different colors::\n\n  $ ls -l | colorize.py -a\n  $ ls -l | colorize.py -a green,blue\n\n* output each space separated column from stdin in a different color::\n\n  $ tail -f logfile | colorize.py\n  $ tail -f logfile | colorize.py -c green,blue,red,yellow\n\n* output the first 3 space separated columns in different colors and all subsequent text in one color::\n\n  $ tail -f logfile | colorize.py 3\n  $ tail -f logfile | colorize.py -c green,blue,red 3\n\n* output the columns specified by widths in different colors\n\n::\n\n  # - The first 10 characters is green, the next 12 in red, followed by space\n  # separated columns alternating in green and red\n  $ tail -f logfile | colorize.py -c green:10,red:12\n\n  # - The first 10 characters in green, the next 12 in red, all subsequent text in yellow\n  $ tail -f logfile | colorize.py -c green:10,red:12,yellow 3\n\n  # - The first 10 characters in the default first color (blue), the next 12 in green,\n  # the next space separated column in red, the subsequent text in yellow\n  $ tail -f logfile | colorize.py -c :10,green:12,red,yellow 4\n\n\n* filter the output of tail -f, coloring lines from each file in different color::\n\n  $ tail -f first.log second.log | colorize.py -t\n  $ tail -f first.log second.log | colorize.py -t green,yellow\n\n\nDemo\n====\n|demo|\n\n\nUsage Tip\n=========\n\nIf you use `bash`, you can create colorized versions of commands, like::\n\n    function ctail() { tail $@ | colorize.py -t; }\n    function cll() { ls -l $@ | colorize.py 8; }\n    function cvmstat() { vmstat $@ | colorize.py -a red,green; }\n\n\n.. |demo| image:: https://asciinema.org/a/107799.png\n          :target: https://asciinema.org/a/107799?speed=2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonetwin%2Fcolorize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flonetwin%2Fcolorize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonetwin%2Fcolorize/lists"}