{"id":32745992,"url":"https://github.com/gojuukaze/terminal_layout","last_synced_at":"2026-02-05T15:34:49.840Z","repository":{"id":34083760,"uuid":"166250939","full_name":"gojuukaze/terminal_layout","owner":"gojuukaze","description":"The project help you to quickly build layouts in terminal，cross-platform(一个跨平台的命令行ui布局工具)","archived":false,"fork":false,"pushed_at":"2023-10-04T00:59:02.000Z","size":4133,"stargazers_count":149,"open_issues_count":2,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-11-03T17:39:03.535Z","etag":null,"topics":["choice","cli","cli-app","cmd","command-line","command-line-interface","command-line-tool","inquirer","loading","progress","progress-bar","prompt-toolkit","pyinquirer","select","terminal-colors","terminal-ui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gojuukaze.png","metadata":{"files":{"readme":"README.ZH.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-01-17T15:44:21.000Z","updated_at":"2025-09-10T09:46:05.000Z","dependencies_parsed_at":"2024-06-18T22:36:30.007Z","dependency_job_id":"b4a62411-8f77-4687-9b47-94ba14b885fa","html_url":"https://github.com/gojuukaze/terminal_layout","commit_stats":{"total_commits":128,"total_committers":5,"mean_commits":25.6,"dds":0.03125,"last_synced_commit":"a28d003ab35bf24eea24dfbe0808f4a45d516fcc"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/gojuukaze/terminal_layout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuukaze%2Fterminal_layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuukaze%2Fterminal_layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuukaze%2Fterminal_layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuukaze%2Fterminal_layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gojuukaze","download_url":"https://codeload.github.com/gojuukaze/terminal_layout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuukaze%2Fterminal_layout/sbom","scorecard":{"id":434203,"data":{"date":"2025-08-11","repo":{"name":"github.com/gojuukaze/terminal_layout","commit":"a28d003ab35bf24eea24dfbe0808f4a45d516fcc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/3 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":"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":"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":"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":"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":"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":"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":"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: GNU General Public License v3.0: 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":"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"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3f63-hfp8-52jq","Warn: Project is vulnerable to: GHSA-44wm-f244-xhp3","Warn: Project is vulnerable to: PYSEC-2023-227 / GHSA-8ghj-p4vj-mr35","Warn: Project is vulnerable to: GHSA-j7hp-h8jx-5ppr","Warn: Project is vulnerable to: PYSEC-2023-175"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T04:11:18.490Z","repository_id":34083760,"created_at":"2025-08-19T04:11:18.491Z","updated_at":"2025-08-19T04:11:18.491Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29124802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T14:05:12.718Z","status":"ssl_error","status_checked_at":"2026-02-05T14:03:53.078Z","response_time":65,"last_error":"SSL_read: 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":["choice","cli","cli-app","cmd","command-line","command-line-interface","command-line-tool","inquirer","loading","progress","progress-bar","prompt-toolkit","pyinquirer","select","terminal-colors","terminal-ui"],"created_at":"2025-11-03T17:39:01.953Z","updated_at":"2026-02-05T15:34:49.835Z","avatar_url":"https://github.com/gojuukaze.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terminal_layout\n\nThe project help you to quickly build layouts in terminal  \n(这个一个命令行ui布局工具)\n\n![demo_v2_1.gif](pic/demo_v2_1.gif)\n\n\u003cimg src=\"pic/demo.gif\"  alt=\"demo.gif\" width=\"450\"/\u003e\n\n----------------\n\n**基于terminal_layout的扩展**\n\n* [progress](terminal_layout/extensions/progress/README.md)\n\n![progress.gif](pic/progress.gif)\n\n* [choice](terminal_layout/extensions/choice/README.md)\n\n![choice.gif](pic/choice.gif)\n\n\n-------------------\n\n** video demo **\n\n\u003ca href=\"https://asciinema.org/a/226120\"\u003e\n\u003cimg src=\"https://asciinema.org/a/226120.svg\"  alt=\"asciicast\" width=\"550\"/\u003e\n\u003c/a\u003e\n\n# link\n\n* [Github](https://github.com/gojuukaze/terminal_layout) \n* [文档](https://doc.ikaze.cn/terminal_layout/) \n* [https://asciinema.org/a/226120](https://asciinema.org/a/226120) \n\n# 安装 \n```bash\npip install terminal-layout\n```\n\n# 依赖\n* Python 2.7, 3.5+ (maybe 3.4)\n* Linux, OS X, and Windows systems.\n\n# Usage\n\n * easy demo:\n\n```python\nimport time\nfrom terminal_layout import *\n\nctl = LayoutCtl.quick(TableLayout,\n                      # table id: root\n                      [\n                          [TextView('t1', 'Hello World!', width=Width.fill, back=Back.blue)],  # \u003c- row id: root_row_00,\n                          [TextView('t2', '', fore=Fore.magenta)],  # \u003c- row id: root_row_1,\n                      ],\n                      )\n\n# or layout=ctl.get_layout()\nlayout = ctl.find_view_by_id('root')\nlayout.set_width(20)\n\n# default: auto_re_draw=True\nctl.draw()\n\n# 如果使用delay_set_text(), 必须把auto_re_draw设为True，否则你需要自己在线程中执行re_draw()\nctl.find_view_by_id('t2').delay_set_text('你好,世界!', delay=0.2)\n\ntime.sleep(0.5)\nrow3 = TableRow.quick_init('', [TextView('t3', 'こんにちは、世界!')])\nlayout.add_view(row3)\n\n# 如果执行draw()时auto_re_draw=True，你必须执行stop()\nctl.stop()\n\n```\n![](pic/hello.png)\n\n* 禁用 auto_re_draw\n\n```python\nimport time\nfrom terminal_layout import *\n\nctl = LayoutCtl.quick(TableLayout,\n                      [\n                          [TextView('t1', 'Hello World!', width=Width.fill, back=Back.blue)],\n                          [TextView('t2', '', fore=Fore.magenta)],\n                      ],\n                      )\n\n\nlayout = ctl.find_view_by_id('root')\nlayout.set_width(20)\n\nctl.draw(auto_re_draw=False)\n\nctl.find_view_by_id('t2').set_text('你好,世界!')\nctl.re_draw()\n\ntime.sleep(0.5)\nrow3 = TableRow.quick_init('', [TextView('t3', 'こんにちは、世界!')])\nlayout.add_view(row3)\nctl.re_draw()\n\n# 不需执行stop()\n# ctl.stop()\n```\n\n * use python2 unicode\n\n```python\n# -*- coding: utf-8 -*-\nfrom terminal_layout import *\nimport sys\nreload(sys)\nsys.setdefaultencoding('utf-8')\n\nctl = LayoutCtl.quick(TableLayout,\n                      [\n                          [TextView('', u'中文，你好', back=Back.cyan, width=Width.wrap)],\n                          [TextView('', u'中文，你好', back=Back.cyan, width=6)],\n                          [TextView('', u'日本語，こんにちは', back=Back.cyan, width=Width.wrap)],\n                      ]\n\n                      )\n\nctl.draw()\n\n```\n\n![](pic/py2.png)\n\n\n## View的属性\n\n * fore \u0026 back\n \n```python\nTextView('','fore',fore=Fore.red)\nTextView('','back',back=Back.red)\n```\n\n\u003cimg width=\"560\" src=\"pic/color.jpeg\"/\u003e\n\n * style\n\n```python\nTextView('','style',style=Style.dim)\n```\n\n\u003cimg width=\"560\" src=\"pic/style.jpeg\"/\u003e\n\n * width\n \n```python\nTextView('','width',width=10)\n```\n\n\u003cimg width=\"560\" src=\"pic/width.jpeg\"/\u003e\n\n * weight\n \n```python\nTextView('','weight',weight=1)\n```\n\n\u003cimg width=\"560\" src=\"pic/weight.jpeg\"/\u003e\n\n * gravity\n \n```python\nTextView('','gravity',gravity=Gravity.left)\n```\n\n\u003cimg width=\"560\" src=\"pic/gravity.jpeg\"/\u003e\n\n * visibility\n \n```python\nTextView('','',visibility=Visibility.visible)\n```\n\n\u003cimg width=\"560\" src=\"pic/visibility.jpeg\"/\u003e\n\n\n * ex_style (not support windows)\n\n\n```python\nTextView('','ex_style',style=Style.ex_blink)\n```\n\n\u003cimg width=\"560\" src=\"pic/ex_style.jpeg\"/\u003e\n\n * ex_fore \u0026 ex_back (not support windows)\n\n\n```python\nTextView('','ex_fore',fore=Fore.ex_red_1)\nTextView('','ex_back',back=Back.ex_red_1)\n\n```\n\n\u003cimg width=\"560\" src=\"pic/ex_color.jpeg\"/\u003e\n\n# LICENSE\n\n[GPLv3](https://github.com/gojuukaze/terminal_layout/blob/master/LICENSE)\n\n# Thanks\n\n * [colorama](https://github.com/tartley/colorama) : Simple cross-platform colored terminal text in Python\n * [colored](https://gitlab.com/dslackw/colored) : Very simple Python library for color and formatting in terminal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojuukaze%2Fterminal_layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgojuukaze%2Fterminal_layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojuukaze%2Fterminal_layout/lists"}