{"id":34032026,"url":"https://github.com/t3chn0tr0n/termstrap","last_synced_at":"2026-04-08T12:03:57.587Z","repository":{"id":57474302,"uuid":"200465431","full_name":"t3chn0tr0n/termstrap","owner":"t3chn0tr0n","description":"Terminal Bootstrap. A css file for unicode text formatting in python console output","archived":false,"fork":false,"pushed_at":"2019-11-25T10:04:51.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-15T09:15:54.299Z","etag":null,"topics":["bootstrap","color","css","font-color","hides-cursor","python","terminal-based","terminal-colors","termstrap"],"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/t3chn0tr0n.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}},"created_at":"2019-08-04T07:58:30.000Z","updated_at":"2019-11-25T10:04:53.000Z","dependencies_parsed_at":"2022-09-12T19:40:23.176Z","dependency_job_id":null,"html_url":"https://github.com/t3chn0tr0n/termstrap","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/t3chn0tr0n/termstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3chn0tr0n%2Ftermstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3chn0tr0n%2Ftermstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3chn0tr0n%2Ftermstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3chn0tr0n%2Ftermstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t3chn0tr0n","download_url":"https://codeload.github.com/t3chn0tr0n/termstrap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3chn0tr0n%2Ftermstrap/sbom","scorecard":{"id":864770,"data":{"date":"2025-08-11","repo":{"name":"github.com/t3chn0tr0n/termstrap","commit":"f9ec0f46e36e70c1de930facfd0d45226b4cc688"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}}]},"last_synced_at":"2025-08-24T02:22:48.216Z","repository_id":57474302,"created_at":"2025-08-24T02:22:48.216Z","updated_at":"2025-08-24T02:22:48.216Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31554122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bootstrap","color","css","font-color","hides-cursor","python","terminal-based","terminal-colors","termstrap"],"created_at":"2025-12-13T18:34:23.419Z","updated_at":"2026-04-08T12:03:57.574Z","avatar_url":"https://github.com/t3chn0tr0n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# termstrap\n\na css file (Bootstrap like) for unicode text formatting in python console output :)\n\n## USAGE\n\nInstall it using pip: `pip install termstrap`\n\nImport in your code: `import css` or `from css import Bootstrap, printc`.\n\nCreate an object: `text = Bootstrap()`\n\nUse as: `text.colorize(\u003cstring\u003e, \u003ccolor\u003e)` or `text.stylize(\u003cstring\u003e, \u003c b / i / u \u003e)` or `text.start_block(\u003ccolor\u003e, \u003cformatter\u003e)`\n\n## Accessible functions/methods\n\nSimple ones :\n\n- `colorize()` : Takes a text, font color(optional) and bgcolor(optional).\n- `stylize()` : Takes a text, style name (bold, italics, underline and blink). Passing only initials work (e.g. 'b' for bold). You can pass multiple styles simultaneously.\n\n_INFO_ : blink is experimental, if it doesn't work, it does not break anything! Therefore no shorthand for it!\n\nLil advanced ones:\n\n- `get_color()` : Takes name of a font color and returns its color code\n- `get_bgcolor()` : Takes name of a background color and returns its color code\n- `new_color()`: Takes a color name and color code. Can be used to add a new custom font color entry\n- `new_bgcolor()`: Takes a color name and color code. Can be used to add a new custom background color entry\n\n_WARNING_ : Only use `new_color()` or `new_bgcolor()` if you know what you are doing!\n\n## Accessible Variables\n\nAll colors can be accessed by the class instance. Overwriting them will/may break functionality.\n\n- **Color variables**: Bootstrap names - primary, danger, warning, etc.\n- **Background color variables**: bg_primary, bg_danger, bg_warning, etc.\n- **Style variables**: bold, italics, underline, selected, blink\n\n## More Utility Functions\n\nTHESE ARE NOT MEMBERS OF BOOTSTRAP CLASS. NO NEED FOR INSTANCE CREATION. just import and use.\n\n- **printc**: Like standard print(). Except: Does not have flush and file params. Have color param, takes name of the color. style param, takes a list or tuple of all styles. bgcolor param, takes name of the bgcolor!\n- **hide_cursor**: Hides cursor in the console\n- **show_cursor**: Restores cursor visibility.\n\n## Example\n\n```Python\n    from css import  Bootstrap, printc # make sure you have downloaded the css.py file in the same folder/directory\n    text = Bootstrap()\n\n    # Using colorize to color\n    print(text.colorize(\"THIS IS RED\", \"red\")) # You can also use Bootstrap classes, eg. danger\n    print(text.colorize(\"THIS IS blue\", \"primary\")) # blue will also work.\n\n    # Using stylize to format text- bold(b), italics(i), underline(u), selected(s), blink\n    print(text.stylize(\"A BOLD move\", \"bold\")) # b also works in place of bold\n    print(text.stylize(\"Slightly slanted\", \"i\"))\n    print(text.stylize(\"More the merrier\", 'b', 'u', 's', 'i'))\n\n    # You can also combine colors and formats:\n    print(text.stylize(text.colorize(\"This is bold in red\"), 'b'))\n\n    # Change color for multiple lines if needed!\n    text.start_block('red', bold=True)\n    # Any text in this clock will be printed in RED, and BOLD by default\n    text.end_block()\n\n    # Using the printc\n    printc(\"RED text in *BOLD*\", color='red', style=('b'))\n    printc(\"[1,2,3,4]\", color='warning', style=('b', 'u'), sep='***') # yellow text, styled bold and underlined, seperated by - ***\n    printc(\"a\", \"b\", \"cdf\", color=\"primary\", end='') # print multiple strings and specify end param as none, ie. no newline at end!\n```\n\n_IMPORTANT_: Info is not the same color as bootstrap info, its violet!\n\n## KNOWN ISSUES\n\n1. Style - blink DOES NOT work in most cases.\n2. Windows cmd only supports color in windows 10 (v1511 onwards)!\n\n## INSPIRATION\n\n[This](https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python/39452138#39452138) stackoverflow was the inspiration for this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3chn0tr0n%2Ftermstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft3chn0tr0n%2Ftermstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3chn0tr0n%2Ftermstrap/lists"}