{"id":16649146,"url":"https://github.com/epeios-q37/term2web-python","last_synced_at":"2025-04-09T16:52:17.276Z","repository":{"id":57474242,"uuid":"233606498","full_name":"epeios-q37/term2web-python","owner":"epeios-q37","description":"Put the terminal in a web page (for Python)","archived":false,"fork":false,"pushed_at":"2024-10-31T06:04:22.000Z","size":265,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T18:54:24.100Z","etag":null,"topics":[],"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/epeios-q37.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["epeios-q37"]}},"created_at":"2020-01-13T13:51:06.000Z","updated_at":"2024-10-31T06:04:26.000Z","dependencies_parsed_at":"2022-09-12T21:01:55.002Z","dependency_job_id":null,"html_url":"https://github.com/epeios-q37/term2web-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Fterm2web-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Fterm2web-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Fterm2web-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Fterm2web-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epeios-q37","download_url":"https://codeload.github.com/epeios-q37/term2web-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248073296,"owners_count":21043402,"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":[],"created_at":"2024-10-12T09:07:27.259Z","updated_at":"2025-04-09T16:52:17.260Z","avatar_url":"https://github.com/epeios-q37.png","language":"Python","funding_links":["https://github.com/sponsors/epeios-q37"],"categories":[],"sub_categories":[],"readme":"# *term2web*: terminal in a web page (*Python* version)\n\n[![Run on Repl.it](https://q37.info/s/kpm7xhfm.png)](https://q37.info/s/kjjcfcp3)  [![About online demonstrations](https://img.shields.io/badge/about-online%20demonstrations-informational)](https://q37.info/s/sssznrb4)\n\n[![license: MIT](https://img.shields.io/github/license/epeios-q37/term2web-python?color=yellow\u0026style=for-the-badge)](https://github.com/epeios-q37/term2web-python/blob/master/LICENSE)\n[![Version](https://img.shields.io/pypi/v/term2web?style=for-the-badge\u0026color=90b4ed\u0026label=PyPi)](http://q37.info/s/c7pnhdm7)\n\n***Notice française*** : https://q37.info/s/rhj9qmb9.\n\n\nThis library is like [*termcolor*](https://pypi.org/project/termcolor/), but with all the text formatting possibilities of [*CSS*](https://en.wikipedia.org/wiki/Cascading_Style_Sheets).\n\nInstall (`pip install term2web`), import (`from term2web import *`) on the top of your program, and all `print(…)` and `input(…)` will be redirected to a web page.\n\nYou can also launch:\n- `git clone http://github.com/epeios-q37/term2web-python`,\n- `cd term2web-python`,\n- `python3 main.py` (or directly `python3 Basic.py` or `python3 WithCSS.py`).\n\nOnline demonstration: https://q37.info/s/kjjcfcp3.\n\nThere are three other functions available.\n\n`set_property(name,value)` applies the CSS property of name `name` and value `value`.\n\nExample:\n\n```python\nset_property(\"font-style\", \"italic\")\n```\n\n`set_properties(properties)` applies the CSS properties stored in `properties` which is a dictionary whose keys are property names, and values the corresponding property values.\n\nExample:\n\n```python\nset_properties({\n    \"text-decoration-line\": \"line-through\",\n    \"text-decoration-style\": \"wavy\",\n    \"text-decoration-color\": \"red\"\n})\n```\n\n`reset_properties()` removes all the CSS properties set by above functions.\n\n`Basic.py` is an example with calls to `print(…)` and `input(…)`, but without CSS formatting. Comment out the `import * from term2web` for the program to run in the usual way in a terminal.\n\n`WithCSS.py` shows how CSS rules can be used to format the displayed text.\n\n\u003c!-- There is also a stub to for this library at address \u003chttps://q37.info/s/qh99qtjt\u003e.--\u003e\n\nYou can still use the default `print(…)` and `input(…)` after an `import builtins` with `builtins.print(…)` and `builtins.input(…)`.\n\nUnlike other programs based on the [*Atlas* toolkit](https://atlastk.org), on which this library is based, it is not possible to simultaneously launch two or more instances of a program based on the *term2web* library. This is intentional, in order to keep this library simple to use. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepeios-q37%2Fterm2web-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepeios-q37%2Fterm2web-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepeios-q37%2Fterm2web-python/lists"}