From 833c912b4155f5316e7f3354f57901422a87c0f7 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Tue, 5 Jul 2022 09:44:49 -0400 Subject: [PATCH 01/23] Add support for tuples as positional arguments in rich repr Currently, it isn't possible to use tuples as positional arguments from `__rich_repr__`, because they are special cased to support adding a key and a default value. This adds support for them, by allowing `None` as a key. --- docs/source/pretty.rst | 2 ++ rich/pretty.py | 13 ++++++------- tests/test_pretty.py | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/docs/source/pretty.rst b/docs/source/pretty.rst index 7a050b943..29c0110a8 100644 --- a/docs/source/pretty.rst +++ b/docs/source/pretty.rst @@ -157,6 +157,8 @@ Each tuple specifies an element in the output. - ``yield name, value`` will generate a keyword argument. - ``yield name, value, default`` will generate a keyword argument *if* ``value`` is not equal to ``default``. +If you use ``None`` as the ``name``, then it will be treated as a positional argument as well, in order to support having ``tuple`` positional arguments. + You can also tell Rich to generate the *angular bracket* style of repr, which tend to be used where there is no easy way to recreate the object's constructor. To do this set the function attribute ``"angular"`` to ``True`` immediately after your ``__rich_repr__`` method. For example:: __rich_repr__.angular = True diff --git a/rich/pretty.py b/rich/pretty.py index 1c6b16716..de743e4c7 100644 --- a/rich/pretty.py +++ b/rich/pretty.py @@ -680,15 +680,14 @@ def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]: for last, arg in loop_last(args): if _safe_isinstance(arg, tuple): key, child = arg - child_node = _traverse(child, depth=depth + 1) - child_node.last = last + else: + key, child = None, arg + child_node = _traverse(child, depth=depth + 1) + child_node.last = last + if key is not None: child_node.key_repr = key child_node.key_separator = "=" - append(child_node) - else: - child_node = _traverse(arg, depth=depth + 1) - child_node.last = last - append(child_node) + append(child_node) else: node = Node( value_repr=f"<{class_name}>" if angular else f"{class_name}()", diff --git a/tests/test_pretty.py b/tests/test_pretty.py index d45b0c22d..89cb79895 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -322,6 +322,7 @@ def __rich_repr__(self): ) + def test_max_depth_attrs(): @attr.define class Foo: @@ -544,3 +545,24 @@ def test_measure_pretty(): measurement = console.measure(pretty) assert measurement == Measurement(12, 12) + + +def test_tuple_rich_repr(): + """ + Test that can use None as key to have tuple positional values. + """ + class Foo: + def __rich_repr__(self): + yield None, (1,) + + assert pretty_repr(Foo()) == "Foo((1,))" + +def test_tuple_rich_repr_default(): + """ + Test that can use None as key to have tuple positional values and with a default. + """ + class Foo: + def __rich_repr__(self): + yield None, (1,), (1,) + + assert pretty_repr(Foo()) == "Foo()" From 25b8f622e8e36612b66be81d0c44260ff581e8a6 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Tue, 5 Jul 2022 09:47:04 -0400 Subject: [PATCH 02/23] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78dd01c1a..44f334d66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix edges used in first row of tables when `show_header=False` https://github.com/Textualize/rich/pull/2330 - Fix interaction between `Capture` contexts and `Console(record=True)` https://github.com/Textualize/rich/pull/2343 - Fixed hash issue in Styles class https://github.com/Textualize/rich/pull/2346 +- Fixes using tuples as positional arguments in `__rich_repr__` https://github.com/Textualize/rich/pull/2379 ### Changed From 0232b2b85028302bcd3843829de2b4d7ad1e497b Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Tue, 5 Jul 2022 09:51:02 -0400 Subject: [PATCH 03/23] Remove extra newline --- tests/test_pretty.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_pretty.py b/tests/test_pretty.py index 89cb79895..3e6c5a3c6 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -322,7 +322,6 @@ def __rich_repr__(self): ) - def test_max_depth_attrs(): @attr.define class Foo: From 21b51aa9b3c931ac023492a7103a3083ea281593 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Tue, 5 Jul 2022 09:51:02 -0400 Subject: [PATCH 04/23] Remove extra newline --- tests/test_pretty.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_pretty.py b/tests/test_pretty.py index 3e6c5a3c6..32d3ffb59 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -550,16 +550,19 @@ def test_tuple_rich_repr(): """ Test that can use None as key to have tuple positional values. """ + class Foo: def __rich_repr__(self): yield None, (1,) assert pretty_repr(Foo()) == "Foo((1,))" + def test_tuple_rich_repr_default(): """ Test that can use None as key to have tuple positional values and with a default. """ + class Foo: def __rich_repr__(self): yield None, (1,), (1,) From 28e5b52ef7b014e0ac6e9e914557796097ed49d4 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Mon, 11 Jul 2022 09:48:20 -0400 Subject: [PATCH 05/23] Switch changelog to reflect doc changes --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44f334d66..be28bb072 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix edges used in first row of tables when `show_header=False` https://github.com/Textualize/rich/pull/2330 - Fix interaction between `Capture` contexts and `Console(record=True)` https://github.com/Textualize/rich/pull/2343 - Fixed hash issue in Styles class https://github.com/Textualize/rich/pull/2346 -- Fixes using tuples as positional arguments in `__rich_repr__` https://github.com/Textualize/rich/pull/2379 +- Document using `None` as name in `__rich_repr__` for tuple posotional args https://github.com/Textualize/rich/pull/2379 ### Changed From 4ae2be62f62863034cbaa11dfc1b397499c971d8 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Mon, 11 Jul 2022 09:49:27 -0400 Subject: [PATCH 06/23] Revert changes to pretty to account for None --- rich/pretty.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rich/pretty.py b/rich/pretty.py index de743e4c7..1c6b16716 100644 --- a/rich/pretty.py +++ b/rich/pretty.py @@ -680,14 +680,15 @@ def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]: for last, arg in loop_last(args): if _safe_isinstance(arg, tuple): key, child = arg - else: - key, child = None, arg - child_node = _traverse(child, depth=depth + 1) - child_node.last = last - if key is not None: + child_node = _traverse(child, depth=depth + 1) + child_node.last = last child_node.key_repr = key child_node.key_separator = "=" - append(child_node) + append(child_node) + else: + child_node = _traverse(arg, depth=depth + 1) + child_node.last = last + append(child_node) else: node = Node( value_repr=f"<{class_name}>" if angular else f"{class_name}()", From 0817587669a9f75cb58f836ac1f1255cc289e9df Mon Sep 17 00:00:00 2001 From: Nils Vu Date: Sat, 16 Jul 2022 14:01:38 +0200 Subject: [PATCH 07/23] Print cause of exceptions even when they have no traceback For example, exceptions raised by 'multiprocessing' may not include a traceback. Instead, they include the traceback from another process formatted as a string in the description of the exception. It contains important information, so it should be printed by rich. --- CONTRIBUTORS.md | 1 + rich/traceback.py | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 8b49afe5e..e68a05b41 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -43,6 +43,7 @@ The following people have contributed to the development of Rich: - [Nicolas Simonds](https://github.com/0xDEC0DE) - [Aaron Stephens](https://github.com/aaronst) - [Gabriele N. Tornetta](https://github.com/p403n1x87) +- [Nils Vu](https://github.com/nilsvu) - [Arian Mollik Wasi](https://github.com/wasi-master) - [Handhika Yanuar Pratama](https://github.com/theDreamer911) - [za](https://github.com/za) diff --git a/rich/traceback.py b/rich/traceback.py index 55acaf070..5c1ac8f4f 100644 --- a/rich/traceback.py +++ b/rich/traceback.py @@ -389,19 +389,17 @@ def safe_str(_object: Any) -> str: del stack.frames[:] cause = getattr(exc_value, "__cause__", None) - if cause and cause.__traceback__: + if cause: exc_type = cause.__class__ exc_value = cause + # __traceback__ can be None, e.g. for exceptions raised by the + # 'multiprocessing' module traceback = cause.__traceback__ is_cause = True continue cause = exc_value.__context__ - if ( - cause - and cause.__traceback__ - and not getattr(exc_value, "__suppress_context__", False) - ): + if cause and not getattr(exc_value, "__suppress_context__", False): exc_type = cause.__class__ exc_value = cause traceback = cause.__traceback__ From f098f66cb11a2e9f014cb4308796634ce4a746b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Jul 2022 13:38:21 +0000 Subject: [PATCH 08/23] Bump sphinx from 5.1.0 to 5.1.1 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 5.1.0 to 5.1.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/5.x/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v5.1.0...v5.1.1) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index bbb255099..d896bff99 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ alabaster==0.7.12 -Sphinx==5.1.0 +Sphinx==5.1.1 sphinx-rtd-theme==1.0.0 sphinx-copybutton==0.5.0 From 3a5f09743ac2bac56846fe4fec0ee8c224343915 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Wed, 27 Jul 2022 16:17:38 +0100 Subject: [PATCH 09/23] Detect Databricks notebook as Jupyter environment --- rich/console.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rich/console.py b/rich/console.py index 8c6049a49..3369a90b4 100644 --- a/rich/console.py +++ b/rich/console.py @@ -516,7 +516,11 @@ def _is_jupyter() -> bool: # pragma: no cover return False ipython = get_ipython() # type: ignore[name-defined] shell = ipython.__class__.__name__ - if "google.colab" in str(ipython.__class__) or shell == "ZMQInteractiveShell": + if ( + "google.colab" in str(ipython.__class__) + or os.getenv("DATABRICKS_ROOT_VIRTUALENV_ENV") + or shell == "ZMQInteractiveShell" + ): return True # Jupyter notebook or qtconsole elif shell == "TerminalInteractiveShell": return False # Terminal running IPython From e054861ddfb8d9c44edf9868c1e0a20ca68ec195 Mon Sep 17 00:00:00 2001 From: Nok Chan Date: Wed, 27 Jul 2022 16:22:48 +0100 Subject: [PATCH 10/23] Update related docs --- CHANGELOG.md | 1 + CONTRIBUTORS.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90cd313d6..bc3c00a4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed missing typing extensions dependency on 3.9 https://github.com/Textualize/rich/issues/2386 +- Fixed Databricks Notebook is not detected as Jupyter environment. https://github.com/Textualize/rich/issues/2422 ## [12.5.0] - 2022-07-11 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 83125eab7..2298a7654 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,6 +14,7 @@ The following people have contributed to the development of Rich: - [Oleksis Fraga](https://github.com/oleksis) - [Andy Gimblett](https://github.com/gimbo) - [Michał Górny](https://github.com/mgorny) +- [Nok Lam Chan](https://github.com/noklam) - [Leron Gray](https://github.com/daddycocoaman) - [Kenneth Hoste](https://github.com/boegel) - [Lanqing Huang](https://github.com/lqhuang) From d3a1ae61a77d934844563514370084971bc3e143 Mon Sep 17 00:00:00 2001 From: Nok Date: Thu, 28 Jul 2022 13:55:41 +0100 Subject: [PATCH 11/23] Update to detect DATABRICKS_RUNTIME_VERSION instead --- rich/console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rich/console.py b/rich/console.py index 3369a90b4..3227f170d 100644 --- a/rich/console.py +++ b/rich/console.py @@ -518,7 +518,7 @@ def _is_jupyter() -> bool: # pragma: no cover shell = ipython.__class__.__name__ if ( "google.colab" in str(ipython.__class__) - or os.getenv("DATABRICKS_ROOT_VIRTUALENV_ENV") + or os.getenv("DATABRICKS_RUNTIME_VERSION") or shell == "ZMQInteractiveShell" ): return True # Jupyter notebook or qtconsole From 90a7224ee672ca7f58399f3c8bec9d38341b1423 Mon Sep 17 00:00:00 2001 From: wim glenn Date: Thu, 11 Aug 2022 21:03:13 -0500 Subject: [PATCH 12/23] fix invalid escapes --- tests/render.py | 2 +- tests/test_markup.py | 2 +- tests/test_traceback.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/render.py b/tests/render.py index a2435c542..d2e5f82a7 100644 --- a/tests/render.py +++ b/tests/render.py @@ -4,7 +4,7 @@ from rich.console import Console, RenderableType -re_link_ids = re.compile(r"id=[\d\.\-]*?;.*?\x1b") +re_link_ids = re.compile(r"id=[\d.\-]*?;.*?\x1b") def replace_link_ids(render: str) -> str: diff --git a/tests/test_markup.py b/tests/test_markup.py index 765b83268..894946b48 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -144,7 +144,7 @@ def test_markup_error(): def test_markup_escape(): - result = str(render("[dim white]\[url=[/]")) + result = str(render("[dim white][url=[/]")) assert result == "[url=" diff --git a/tests/test_traceback.py b/tests/test_traceback.py index 03705f99c..9e71a1592 100644 --- a/tests/test_traceback.py +++ b/tests/test_traceback.py @@ -49,7 +49,7 @@ def level2(): "│" + (" " * 98) + "│", ) for frame_start in re.finditer( - "^│ .+rich/tests/test_traceback\.py:", + "^│ .+rich/tests/test_traceback.py:", rendered_exception, flags=re.MULTILINE, ): From e4942f80a32676ac23a3b444661a88a70cc85826 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Aug 2022 13:31:59 +0000 Subject: [PATCH 13/23] Bump pygments from 2.12.0 to 2.13.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.12.0 to 2.13.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.12.0...2.13.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 85 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 75 insertions(+), 10 deletions(-) diff --git a/poetry.lock b/poetry.lock index 899db54a4..a2bb85e82 100644 --- a/poetry.lock +++ b/poetry.lock @@ -177,7 +177,7 @@ optional = false python-versions = "*" [package.extras] -test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] +test = ["hypothesis (==3.55.3)", "flake8 (==3.7.8)"] [[package]] name = "coverage" @@ -656,7 +656,7 @@ optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.extras] -testing = ["docopt", "pytest (>=3.0.7)"] +testing = ["pytest (>=3.0.7)", "docopt"] [[package]] name = "pathspec" @@ -709,8 +709,8 @@ python-versions = ">=3.6" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] +testing = ["pytest-benchmark", "pytest"] +dev = ["tox", "pre-commit"] [[package]] name = "pre-commit" @@ -778,12 +778,15 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.12.0" +version = "2.13.0" description = "Pygments is a syntax highlighting package written in Python." category = "main" optional = false python-versions = ">=3.6" +[package.extras] +plugins = ["importlib-metadata"] + [[package]] name = "pyparsing" version = "3.0.7" @@ -838,7 +841,7 @@ coverage = {version = ">=5.2.1", extras = ["toml"]} pytest = ">=4.6" [package.extras] -testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] +testing = ["virtualenv", "pytest-xdist", "six", "process-tests", "hunter", "fields"] [[package]] name = "python-dateutil" @@ -1116,7 +1119,31 @@ backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -black = [] +black = [ + {file = "black-22.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69"}, + {file = "black-22.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807"}, + {file = "black-22.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e"}, + {file = "black-22.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def"}, + {file = "black-22.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666"}, + {file = "black-22.6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d"}, + {file = "black-22.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256"}, + {file = "black-22.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78"}, + {file = "black-22.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849"}, + {file = "black-22.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c"}, + {file = "black-22.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e"}, + {file = "black-22.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6"}, + {file = "black-22.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad"}, + {file = "black-22.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2"}, + {file = "black-22.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee"}, + {file = "black-22.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b"}, + {file = "black-22.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4"}, + {file = "black-22.6.0-py3-none-any.whl", hash = "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c"}, + {file = "black-22.6.0.tar.gz", hash = "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9"}, +] bleach = [ {file = "bleach-4.1.0-py2.py3-none-any.whl", hash = "sha256:4d2651ab93271d1129ac9cbc679f524565cc8a1b791909c4a51eac4446a15994"}, {file = "bleach-4.1.0.tar.gz", hash = "sha256:0900d8b37eba61a802ee40ac0061f8c2b5dee29c1927dd1d233e075ebf5a71da"}, @@ -1195,7 +1222,10 @@ click = [ {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, ] -colorama = [] +colorama = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, @@ -1334,12 +1364,28 @@ jupyterlab-widgets = [ {file = "jupyterlab_widgets-1.1.1.tar.gz", hash = "sha256:67d0ef1e407e0c42c8ab60b9d901cd7a4c68923650763f75bf17fb06c1943b79"}, ] markupsafe = [ + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1348,14 +1394,27 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1365,6 +1424,12 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, @@ -1483,8 +1548,8 @@ pycparser = [ {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] pygments = [ - {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, - {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, + {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, + {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, ] pyparsing = [ {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, From cec2e397d3023b42ab26df5b6d837660b9382abc Mon Sep 17 00:00:00 2001 From: Will Frey Date: Wed, 17 Aug 2022 12:14:46 -0400 Subject: [PATCH 14/23] Update `rich.reconfigure` docstring --- rich/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rich/__init__.py b/rich/__init__.py index 07bc1a192..26ca2064a 100644 --- a/rich/__init__.py +++ b/rich/__init__.py @@ -40,7 +40,8 @@ def reconfigure(*args: Any, **kwargs: Any) -> None: """Reconfigures the global console by replacing it with another. Args: - console (Console): Replacement console instance. + *args (Any): Positional arguments for the replacement :class:`~rich.console.Console`. + **kwargs (Any): Keyword arguments for the replacement :class:`~rich.console.Console`. """ from rich.console import Console From f53cb1c4a8ef59b17202f07548cb572c1c04c4bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 13:31:02 +0000 Subject: [PATCH 15/23] Bump ipywidgets from 7.7.1 to 7.7.2 Bumps [ipywidgets](https://github.com/jupyter-widgets/ipywidgets) from 7.7.1 to 7.7.2. - [Release notes](https://github.com/jupyter-widgets/ipywidgets/releases) - [Commits](https://github.com/jupyter-widgets/ipywidgets/compare/7.7.1...7.7.2) --- updated-dependencies: - dependency-name: ipywidgets dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 140 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 101 insertions(+), 39 deletions(-) diff --git a/poetry.lock b/poetry.lock index 899db54a4..46f992510 100644 --- a/poetry.lock +++ b/poetry.lock @@ -20,9 +20,9 @@ dataclasses = {version = "*", markers = "python_version < \"3.7\""} typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [package.extras] -dev = ["pre-commit", "cogapp", "tomli", "coverage[toml] (>=5.0.2)", "hypothesis", "pytest", "sphinx", "sphinx-notfound-page", "furo"] -docs = ["sphinx", "sphinx-notfound-page", "furo"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pytest"] +tests = ["pytest", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["furo", "sphinx-notfound-page", "sphinx"] +dev = ["furo", "sphinx-notfound-page", "sphinx", "pytest", "hypothesis", "coverage[toml] (>=5.0.2)", "tomli", "cogapp", "pre-commit"] [[package]] name = "argon2-cffi-bindings" @@ -79,10 +79,10 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy", "six", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy", "six", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy", "six", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] [[package]] name = "backcall" @@ -177,7 +177,7 @@ optional = false python-versions = "*" [package.extras] -test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] +test = ["hypothesis (==3.55.3)", "flake8 (==3.7.8)"] [[package]] name = "coverage" @@ -269,9 +269,9 @@ typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["importlib-resources (>=1.3)", "pytest-mypy", "pytest-black (>=0.3.7)", "pytest-perf (>=0.9.2)", "flufl.flake8", "pyfakefs", "pep517", "packaging", "pytest-enabler (>=1.0.1)", "pytest-cov", "pytest-flake8", "pytest-checkdocs (>=2.4)", "pytest (>=6)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +docs = ["rst.linker (>=1.9)", "jaraco.packaging (>=8.2)", "sphinx"] [[package]] name = "importlib-resources" @@ -313,7 +313,7 @@ tornado = ">=4.2" traitlets = ">=4.1.0" [package.extras] -test = ["pytest (!=5.3.4)", "pytest-cov", "flaky", "nose", "jedi (<=0.17.2)"] +test = ["jedi (<=0.17.2)", "nose", "flaky", "pytest-cov", "pytest (!=5.3.4)"] [[package]] name = "ipython" @@ -336,15 +336,15 @@ pygments = "*" traitlets = ">=4.2" [package.extras] -all = ["Sphinx (>=1.3)", "ipykernel", "ipyparallel", "ipywidgets", "nbconvert", "nbformat", "nose (>=0.10.1)", "notebook", "numpy (>=1.14)", "pygments", "qtconsole", "requests", "testpath"] -doc = ["Sphinx (>=1.3)"] -kernel = ["ipykernel"] -nbconvert = ["nbconvert"] -nbformat = ["nbformat"] -notebook = ["notebook", "ipywidgets"] -parallel = ["ipyparallel"] +test = ["numpy (>=1.14)", "ipykernel", "nbformat", "pygments", "testpath", "requests", "nose (>=0.10.1)"] qtconsole = ["qtconsole"] -test = ["nose (>=0.10.1)", "requests", "testpath", "pygments", "nbformat", "ipykernel", "numpy (>=1.14)"] +parallel = ["ipyparallel"] +notebook = ["ipywidgets", "notebook"] +nbformat = ["nbformat"] +nbconvert = ["nbconvert"] +kernel = ["ipykernel"] +doc = ["Sphinx (>=1.3)"] +all = ["testpath", "requests", "qtconsole", "pygments", "numpy (>=1.14)", "notebook", "nose (>=0.10.1)", "nbformat", "nbconvert", "ipywidgets", "ipyparallel", "ipykernel", "Sphinx (>=1.3)"] [[package]] name = "ipython-genutils" @@ -356,7 +356,7 @@ python-versions = "*" [[package]] name = "ipywidgets" -version = "7.7.1" +version = "7.7.2" description = "IPython HTML widgets for Jupyter" category = "main" optional = true @@ -366,7 +366,7 @@ python-versions = "*" ipykernel = ">=4.5.1" ipython = {version = ">=4.0.0", markers = "python_version >= \"3.3\""} ipython-genutils = ">=0.2.0,<0.3.0" -jupyterlab-widgets = {version = ">=1.0.0", markers = "python_version >= \"3.6\""} +jupyterlab-widgets = {version = ">=1.0.0,<3", markers = "python_version >= \"3.6\""} traitlets = ">=4.3.1" widgetsnbextension = ">=3.6.0,<3.7.0" @@ -502,9 +502,9 @@ typed-ast = {version = ">=1.4.0,<2", markers = "python_version < \"3.8\""} typing-extensions = ">=3.10" [package.extras] -dmypy = ["psutil (>=4.0)"] -python2 = ["typed-ast (>=1.4.0,<2)"] reports = ["lxml"] +python2 = ["typed-ast (>=1.4.0,<2)"] +dmypy = ["psutil (>=4.0)"] [[package]] name = "mypy-extensions" @@ -656,7 +656,7 @@ optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.extras] -testing = ["docopt", "pytest (>=3.0.7)"] +testing = ["pytest (>=3.0.7)", "docopt"] [[package]] name = "pathspec" @@ -694,8 +694,8 @@ optional = false python-versions = ">=3.6" [package.extras] -docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] +test = ["pytest-mock (>=3.6)", "pytest-cov (>=2.7)", "pytest (>=6)", "appdirs (==1.4.4)"] +docs = ["sphinx-autodoc-typehints (>=1.12)", "proselint (>=0.10.2)", "furo (>=2021.7.5b38)", "Sphinx (>=4)"] [[package]] name = "pluggy" @@ -709,8 +709,8 @@ python-versions = ">=3.6" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] +testing = ["pytest-benchmark", "pytest"] +dev = ["tox", "pre-commit"] [[package]] name = "pre-commit" @@ -838,7 +838,7 @@ coverage = {version = ">=5.2.1", extras = ["toml"]} pytest = ">=4.6" [package.extras] -testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] +testing = ["virtualenv", "pytest-xdist", "six", "process-tests", "hunter", "fields"] [[package]] name = "python-dateutil" @@ -896,9 +896,9 @@ optional = true python-versions = "*" [package.extras] -nativelib = ["pyobjc-framework-cocoa", "pywin32"] -objc = ["pyobjc-framework-cocoa"] win32 = ["pywin32"] +objc = ["pyobjc-framework-cocoa"] +nativelib = ["pywin32", "pyobjc-framework-cocoa"] [[package]] name = "six" @@ -1016,8 +1016,8 @@ platformdirs = ">=2,<3" six = ">=1.9.0,<2" [package.extras] -docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] +testing = ["packaging (>=20.0)", "pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] +docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] [[package]] name = "wcwidth" @@ -1055,8 +1055,8 @@ optional = false python-versions = ">=3.6" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest-mypy", "pytest-black (>=0.3.7)", "func-timeout", "jaraco.itertools", "pytest-enabler (>=1.0.1)", "pytest-cov", "pytest-flake8", "pytest-checkdocs (>=2.4)", "pytest (>=4.6)"] +docs = ["rst.linker (>=1.9)", "jaraco.packaging (>=8.2)", "sphinx"] [extras] jupyter = ["ipywidgets"] @@ -1116,7 +1116,31 @@ backcall = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, ] -black = [] +black = [ + {file = "black-22.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69"}, + {file = "black-22.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807"}, + {file = "black-22.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e"}, + {file = "black-22.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def"}, + {file = "black-22.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666"}, + {file = "black-22.6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d"}, + {file = "black-22.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256"}, + {file = "black-22.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78"}, + {file = "black-22.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849"}, + {file = "black-22.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c"}, + {file = "black-22.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e"}, + {file = "black-22.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6"}, + {file = "black-22.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad"}, + {file = "black-22.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2"}, + {file = "black-22.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee"}, + {file = "black-22.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b"}, + {file = "black-22.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4"}, + {file = "black-22.6.0-py3-none-any.whl", hash = "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c"}, + {file = "black-22.6.0.tar.gz", hash = "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9"}, +] bleach = [ {file = "bleach-4.1.0-py2.py3-none-any.whl", hash = "sha256:4d2651ab93271d1129ac9cbc679f524565cc8a1b791909c4a51eac4446a15994"}, {file = "bleach-4.1.0.tar.gz", hash = "sha256:0900d8b37eba61a802ee40ac0061f8c2b5dee29c1927dd1d233e075ebf5a71da"}, @@ -1195,7 +1219,10 @@ click = [ {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, ] -colorama = [] +colorama = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, @@ -1302,8 +1329,8 @@ ipython-genutils = [ {file = "ipython_genutils-0.2.0.tar.gz", hash = "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8"}, ] ipywidgets = [ - {file = "ipywidgets-7.7.1-py2.py3-none-any.whl", hash = "sha256:aa1076ab7102b2486ae2607c43c243200a07c17d6093676c419d4b6762489a50"}, - {file = "ipywidgets-7.7.1.tar.gz", hash = "sha256:5f2fa1b7afae1af32c88088c9828ad978de93ddda393d7ed414e553fee93dcab"}, + {file = "ipywidgets-7.7.2-py2.py3-none-any.whl", hash = "sha256:3d47a7826cc6e2644d7cb90db26699451f8b42379cf63b761431b63d19984ca2"}, + {file = "ipywidgets-7.7.2.tar.gz", hash = "sha256:449ab8e7872d0f388ee5c5b3666b9d6af5e5618a5749fd62652680be37dff2af"}, ] jedi = [ {file = "jedi-0.17.2-py2.py3-none-any.whl", hash = "sha256:98cc583fa0f2f8304968199b01b6b4b94f469a1f4a74c1560506ca2a211378b5"}, @@ -1334,12 +1361,28 @@ jupyterlab-widgets = [ {file = "jupyterlab_widgets-1.1.1.tar.gz", hash = "sha256:67d0ef1e407e0c42c8ab60b9d901cd7a4c68923650763f75bf17fb06c1943b79"}, ] markupsafe = [ + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -1348,14 +1391,27 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -1365,6 +1421,12 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, From f8b536ca066c75c2d71b166adc618b11a82dfae0 Mon Sep 17 00:00:00 2001 From: oefe Date: Sat, 27 Aug 2022 17:08:29 +0200 Subject: [PATCH 16/23] Fix missing `mode` property on file wrapper Without this property, uploads using `requests` fails to set the Content-Length header, and falls back to chunked encoding, which many hosts (e.g. S3) don't support. --- CHANGELOG.md | 1 + CONTRIBUTORS.md | 1 + rich/progress.py | 4 ++++ tests/test_progress.py | 1 + 4 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b723ded1..484c7d31b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix NO_COLOR support on legacy Windows https://github.com/Textualize/rich/pull/2458 +- Fix missing `mode` property on file wrapper breaking uploads via `requests` ## [12.5.2] - 2022-07-18 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 611259897..7890ec106 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -28,6 +28,7 @@ The following people have contributed to the development of Rich: - [Paul McGuire](https://github.com/ptmcg) - [Antony Milne](https://github.com/AntonyMilneQB) - [Michael Milton](https://github.com/multimeric) +- [Martina Oefelein](https://github.com/oefe) - [Nathan Page](https://github.com/nathanrpage97) - [Avi Perl](https://github.com/avi-perl) - [Laurent Peuch](https://github.com/psycojoker) diff --git a/rich/progress.py b/rich/progress.py index 679731a15..9873e1a5b 100644 --- a/rich/progress.py +++ b/rich/progress.py @@ -216,6 +216,10 @@ def fileno(self) -> int: def isatty(self) -> bool: return self.handle.isatty() + @property + def mode(self) -> str: + return self.handle.mode + @property def name(self) -> str: return self.handle.name diff --git a/tests/test_progress.py b/tests/test_progress.py index 792ee636c..a3a28766d 100644 --- a/tests/test_progress.py +++ b/tests/test_progress.py @@ -614,6 +614,7 @@ def test_wrap_file() -> None: with open(filename, "rb") as file: with rich.progress.wrap_file(file, total=total) as f: assert f.read() == b"Hello, World!" + assert f.mode == "rb" assert f.name == filename assert f.closed assert not f.handle.closed From b51a3033f702dfb05886c70a7d454047a2d56ebc Mon Sep 17 00:00:00 2001 From: oefe Date: Sat, 27 Aug 2022 17:31:17 +0200 Subject: [PATCH 17/23] Add link to PR --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 484c7d31b..2d14fff16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix NO_COLOR support on legacy Windows https://github.com/Textualize/rich/pull/2458 -- Fix missing `mode` property on file wrapper breaking uploads via `requests` +- Fix missing `mode` property on file wrapper breaking uploads via `requests` https://github.com/Textualize/rich/pull/2495 ## [12.5.2] - 2022-07-18 From 0852511024598bb787dc77422709e65a6d915923 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Mon, 19 Sep 2022 11:27:11 +0100 Subject: [PATCH 18/23] replace willmcgugan with textualize --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- CHANGELOG.md | 484 +++++++++++----------- README.cn.md | 82 ++-- README.de-ch.md | 86 ++-- README.de.md | 86 ++-- README.es.md | 86 ++-- README.fa.md | 88 ++-- README.fr.md | 86 ++-- README.hi.md | 86 ++-- README.id.md | 90 ++-- README.it.md | 86 ++-- README.ja.md | 84 ++-- README.kr.md | 86 ++-- README.md | 86 ++-- README.pt-br.md | 84 ++-- README.ru.md | 86 ++-- README.sv.md | 84 ++-- README.tr.md | 86 ++-- README.zh-tw.md | 86 ++-- benchmarks/snippets.py | 6 +- tests/test_markdown.py | 3 +- tests/test_markdown_no_hyperlinks.py | 3 +- tests/test_segment.py | 2 +- tests/test_text.py | 2 +- tests/test_traceback.py | 2 +- 26 files changed, 981 insertions(+), 983 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6d6f45677..55351352a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -6,7 +6,7 @@ labels: Needs triage assignees: "" --- -You may find a solution to your problem in the [docs](https://rich.readthedocs.io/en/latest/introduction.html) or [issues](https://github.com/willmcgugan/rich/issues). +You may find a solution to your problem in the [docs](https://rich.readthedocs.io/en/latest/introduction.html) or [issues](https://github.com/textualize/rich/issues). **Describe the bug** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 6e2ca38c2..9c270511d 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -7,7 +7,7 @@ assignees: '' --- -Consider posting in https://github.com/willmcgugan/rich/discussions for feedback before raising a feature request. +Consider posting in https://github.com/textualize/rich/discussions for feedback before raising a feature request. Have you checked the issues for a similar suggestions? diff --git a/CHANGELOG.md b/CHANGELOG.md index a55ab77a2..f1cbe4cac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,7 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Progress.open and Progress.wrap_file method to track the progress while reading from a file or file-like object https://github.com/willmcgugan/rich/pull/1759 +- Progress.open and Progress.wrap_file method to track the progress while reading from a file or file-like object https://github.com/textualize/rich/pull/1759 - SVG export functionality https://github.com/Textualize/rich/pull/2101 - Adding Indonesian translation @@ -255,23 +255,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed issues with overlapping tags https://github.com/willmcgugan/rich/issues/1755 +- Fixed issues with overlapping tags https://github.com/textualize/rich/issues/1755 ## [10.16.0] - 2021-12-12 ### Fixed -- Double print of progress bar in Jupyter https://github.com/willmcgugan/rich/issues/1737 +- Double print of progress bar in Jupyter https://github.com/textualize/rich/issues/1737 ### Added -- Added Text.markup property https://github.com/willmcgugan/rich/issues/1751 +- Added Text.markup property https://github.com/textualize/rich/issues/1751 ## [10.15.2] - 2021-12-02 ### Fixed -- Deadlock issue https://github.com/willmcgugan/rich/issues/1734 +- Deadlock issue https://github.com/textualize/rich/issues/1734 ## [10.15.1] - 2021-11-29 @@ -293,51 +293,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed issue with progress bar not rendering markup https://github.com/willmcgugan/rich/issues/1721 -- Fixed race condition when exiting Live https://github.com/willmcgugan/rich/issues/1530 +- Fixed issue with progress bar not rendering markup https://github.com/textualize/rich/issues/1721 +- Fixed race condition when exiting Live https://github.com/textualize/rich/issues/1530 ## [10.14.0] - 2021-11-16 ### Fixed - Fixed progress speed not updating when total doesn't change -- Fixed superfluous new line in Status https://github.com/willmcgugan/rich/issues/1662 +- Fixed superfluous new line in Status https://github.com/textualize/rich/issues/1662 - Fixed Windows legacy width again -- Fixed infinite loop in set_cell_size https://github.com/willmcgugan/rich/issues/1682 +- Fixed infinite loop in set_cell_size https://github.com/textualize/rich/issues/1682 ### Added -- Added file protocol to URL highlighter https://github.com/willmcgugan/rich/issues/1681 +- Added file protocol to URL highlighter https://github.com/textualize/rich/issues/1681 - Added rich.protocol.rich_cast ### Changed - Allowed `__rich__` to work recursively -- Allowed Text classes to work with sep in print https://github.com/willmcgugan/rich/issues/1689 +- Allowed Text classes to work with sep in print https://github.com/textualize/rich/issues/1689 ### Added -- Added a `rich.text.Text.from_ansi` helper method for handling pre-formatted input strings https://github.com/willmcgugan/rich/issues/1670 +- Added a `rich.text.Text.from_ansi` helper method for handling pre-formatted input strings https://github.com/textualize/rich/issues/1670 ## [10.13.0] - 2021-11-07 ### Added -- Added json.dumps parameters to print_json https://github.com/willmcgugan/rich/issues/1638 +- Added json.dumps parameters to print_json https://github.com/textualize/rich/issues/1638 ### Fixed - Fixed an edge case bug when console module try to detect if they are in a tty at the end of a pytest run - Fixed a bug where logging handler raises an exception when running with pythonw (related to https://bugs.python.org/issue13807) -- Fixed issue with TERM env vars that have more than one hyphen https://github.com/willmcgugan/rich/issues/1640 -- Fixed missing new line after progress bar when terminal is not interactive https://github.com/willmcgugan/rich/issues/1606 -- Fixed exception in IPython when disabling pprint with %pprint https://github.com/willmcgugan/rich/issues/1646 -- Fixed issue where values longer than the console width produced invalid JSON https://github.com/willmcgugan/rich/issues/1653 -- Fixes trailing comma when pretty printing dataclass with last field repr=False https://github.com/willmcgugan/rich/issues/1599 +- Fixed issue with TERM env vars that have more than one hyphen https://github.com/textualize/rich/issues/1640 +- Fixed missing new line after progress bar when terminal is not interactive https://github.com/textualize/rich/issues/1606 +- Fixed exception in IPython when disabling pprint with %pprint https://github.com/textualize/rich/issues/1646 +- Fixed issue where values longer than the console width produced invalid JSON https://github.com/textualize/rich/issues/1653 +- Fixes trailing comma when pretty printing dataclass with last field repr=False https://github.com/textualize/rich/issues/1599 ## Changed -- Markdown codeblocks now word-wrap https://github.com/willmcgugan/rich/issues/1515 +- Markdown codeblocks now word-wrap https://github.com/textualize/rich/issues/1515 ## [10.12.0] - 2021-10-06 @@ -364,7 +364,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed pretty printing of objects with fo magic with **getattr** https://github.com/willmcgugan/rich/issues/1492 +- Fixed pretty printing of objects with fo magic with **getattr** https://github.com/textualize/rich/issues/1492 ## [10.9.0] - 2021-08-29 @@ -390,7 +390,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed a bug where calling `rich.reconfigure` within a `pytest_configure` hook would lead to a crash -- Fixed highlight not being passed through options https://github.com/willmcgugan/rich/issues/1404 +- Fixed highlight not being passed through options https://github.com/textualize/rich/issues/1404 ## [10.7.0] - 2021-08-05 @@ -424,7 +424,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed issue with adjoining color tags https://github.com/willmcgugan/rich/issues/1334 +- Fixed issue with adjoining color tags https://github.com/textualize/rich/issues/1334 ### Changed @@ -434,10 +434,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed Pandas objects not pretty printing https://github.com/willmcgugan/rich/issues/1305 -- Fixed https://github.com/willmcgugan/rich/issues/1256 +- Fixed Pandas objects not pretty printing https://github.com/textualize/rich/issues/1305 +- Fixed https://github.com/textualize/rich/issues/1256 - Fixed typing with rich.repr.auto decorator -- Fixed repr error formatting https://github.com/willmcgugan/rich/issues/1326 +- Fixed repr error formatting https://github.com/textualize/rich/issues/1326 ### Added @@ -475,13 +475,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed status not rendering console markup https://github.com/willmcgugan/rich/issues/1244 +- Fixed status not rendering console markup https://github.com/textualize/rich/issues/1244 ## [10.2.1] - 2021-05-17 ### Fixed -- Fixed panel in Markdown exploding https://github.com/willmcgugan/rich/issues/1234 +- Fixed panel in Markdown exploding https://github.com/textualize/rich/issues/1234 ## [10.2.0] - 2021-05-12 @@ -500,7 +500,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed initial blank lines removed from Syntax https://github.com/willmcgugan/rich/issues/1214 +- Fixed initial blank lines removed from Syntax https://github.com/textualize/rich/issues/1214 ## [10.1.0] - 2021-04-03 @@ -512,13 +512,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed race condition that duplicated lines in progress https://github.com/willmcgugan/rich/issues/1144 +- Fixed race condition that duplicated lines in progress https://github.com/textualize/rich/issues/1144 ## [10.0.0] - 2021-03-27 ### Changed -- Made pydoc import lazy as at least one use found it slow to import https://github.com/willmcgugan/rich/issues/1104 +- Made pydoc import lazy as at least one use found it slow to import https://github.com/textualize/rich/issues/1104 - Modified string highlighting to not match in the middle of a word, so that apostrophes are not considered strings - New way of encoding control codes in Segment - New signature for Control class @@ -542,10 +542,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed table style taking precedence over row style https://github.com/willmcgugan/rich/issues/1129 -- Fixed incorrect measurement of Text with new lines and whitespace https://github.com/willmcgugan/rich/issues/1133 +- Fixed table style taking precedence over row style https://github.com/textualize/rich/issues/1129 +- Fixed incorrect measurement of Text with new lines and whitespace https://github.com/textualize/rich/issues/1133 - Made type annotations consistent for various `total` keyword arguments in `rich.progress` and rich.`progress_bar` -- Disabled Progress no longer displays itself when starting https://github.com/willmcgugan/rich/pull/1125 +- Disabled Progress no longer displays itself when starting https://github.com/textualize/rich/pull/1125 - Animations no longer reset when updating rich.status.Status ## [9.13.0] - 2021-03-06 @@ -556,8 +556,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed Syntax background https://github.com/willmcgugan/rich/issues/1088 -- Fix for double tracebacks when no formatter https://github.com/willmcgugan/rich/issues/1079 +- Fixed Syntax background https://github.com/textualize/rich/issues/1088 +- Fix for double tracebacks when no formatter https://github.com/textualize/rich/issues/1079 ### Changed @@ -567,7 +567,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed custom formatters with rich tracebacks in RichHandler https://github.com/willmcgugan/rich/issues/1079 +- Fixed custom formatters with rich tracebacks in RichHandler https://github.com/textualize/rich/issues/1079 ### Changed @@ -594,7 +594,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed deadlock in Progress https://github.com/willmcgugan/rich/issues/1061 +- Fixed deadlock in Progress https://github.com/textualize/rich/issues/1061 ### Added @@ -610,14 +610,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed issue with Syntax and missing lines in Layout https://github.com/willmcgugan/rich/issues/1050 -- Fixed issue with nested markdown elements https://github.com/willmcgugan/rich/issues/1036 -- Fixed new lines not invoking render hooks https://github.com/willmcgugan/rich/issues/1052 -- Fixed Align setting height to child https://github.com/willmcgugan/rich/issues/1057 +- Fixed issue with Syntax and missing lines in Layout https://github.com/textualize/rich/issues/1050 +- Fixed issue with nested markdown elements https://github.com/textualize/rich/issues/1036 +- Fixed new lines not invoking render hooks https://github.com/textualize/rich/issues/1052 +- Fixed Align setting height to child https://github.com/textualize/rich/issues/1057 ### Changed -- Printing a table with no columns now result in a blank line https://github.com/willmcgugan/rich/issues/1044 +- Printing a table with no columns now result in a blank line https://github.com/textualize/rich/issues/1044 ### Added @@ -629,9 +629,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed table with expand=False not expanding when justify="center" - Fixed single renderable in Layout not respecting height -- Fixed COLUMNS and LINES env var https://github.com/willmcgugan/rich/issues/1019 +- Fixed COLUMNS and LINES env var https://github.com/textualize/rich/issues/1019 - Layout now respects minimum_size when fixes sizes are greater than available space -- HTML export now changes link underline score to match terminal https://github.com/willmcgugan/rich/issues/1009 +- HTML export now changes link underline score to match terminal https://github.com/textualize/rich/issues/1009 ### Changed @@ -646,8 +646,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed error message for tracebacks with broken `__str__` https://github.com/willmcgugan/rich/issues/980 -- Fixed markup edge case https://github.com/willmcgugan/rich/issues/987 +- Fixed error message for tracebacks with broken `__str__` https://github.com/textualize/rich/issues/980 +- Fixed markup edge case https://github.com/textualize/rich/issues/987 ### Added @@ -688,7 +688,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix double line tree guides on Windows - Fixed Tracebacks ignoring initial blank lines - Partial fix for tracebacks not finding source after chdir -- Fixed error message when code in tracebacks doesn't have an extension https://github.com/willmcgugan/rich/issues/996 +- Fixed error message when code in tracebacks doesn't have an extension https://github.com/textualize/rich/issues/996 ### Added @@ -698,13 +698,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed deadlock in live https://github.com/willmcgugan/rich/issues/927 +- Fixed deadlock in live https://github.com/textualize/rich/issues/927 ## [9.8.1] - 2021-01-13 ### Fixed -- Fixed rich.inspect failing with attributes that claim to be callable but aren't https://github.com/willmcgugan/rich/issues/916 +- Fixed rich.inspect failing with attributes that claim to be callable but aren't https://github.com/textualize/rich/issues/916 ## [9.8.0] - 2021-01-11 @@ -723,7 +723,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed panel cropping when shrunk too bar - Allow passing markdown over STDIN when using `python -m rich.markdown` -- Fix printing MagicMock.mock_calls https://github.com/willmcgugan/rich/issues/903 +- Fix printing MagicMock.mock_calls https://github.com/textualize/rich/issues/903 ## [9.7.0] - 2021-01-09 @@ -736,9 +736,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed markup escaping edge case https://github.com/willmcgugan/rich/issues/878 +- Fixed markup escaping edge case https://github.com/textualize/rich/issues/878 - Double tag escape, i.e. `"\\[foo]"` results in a backslash plus `[foo]` tag -- Fixed header_style not applying to headers in positional args https://github.com/willmcgugan/rich/issues/953 +- Fixed header_style not applying to headers in positional args https://github.com/textualize/rich/issues/953 ## [9.6.1] - 2020-12-31 @@ -767,7 +767,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed terminal size detection on Windows https://github.com/willmcgugan/rich/issues/836 +- Fixed terminal size detection on Windows https://github.com/textualize/rich/issues/836 - Fixed hex number highlighting ## [9.5.0] - 2020-12-18 @@ -791,15 +791,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed double output in rich.live https://github.com/willmcgugan/rich/issues/485 -- Fixed Console.out highlighting not reflecting defaults https://github.com/willmcgugan/rich/issues/827 -- FileProxy now raises TypeError for empty non-str arguments https://github.com/willmcgugan/rich/issues/828 +- Fixed double output in rich.live https://github.com/textualize/rich/issues/485 +- Fixed Console.out highlighting not reflecting defaults https://github.com/textualize/rich/issues/827 +- FileProxy now raises TypeError for empty non-str arguments https://github.com/textualize/rich/issues/828 ## [9.4.0] - 2020-12-12 ### Added -- Added rich.live https://github.com/willmcgugan/rich/pull/382 +- Added rich.live https://github.com/textualize/rich/pull/382 - Added algin parameter to Rule and Console.rule - Added rich.Status class and Console.status - Added getitem to Text @@ -813,7 +813,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Fixed -- Fixed suppressed traceback context https://github.com/willmcgugan/rich/issues/468 +- Fixed suppressed traceback context https://github.com/textualize/rich/issues/468 ## [9.3.0] - 2020-12-1 @@ -834,9 +834,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed redirecting of stderr in Progress -- Fixed broken expanded tuple of one https://github.com/willmcgugan/rich/issues/445 +- Fixed broken expanded tuple of one https://github.com/textualize/rich/issues/445 - Fixed traceback message with `from` exceptions -- Fixed justify argument not working in console.log https://github.com/willmcgugan/rich/issues/460 +- Fixed justify argument not working in console.log https://github.com/textualize/rich/issues/460 ## [9.2.0] - 2020-11-08 @@ -873,13 +873,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed negative time remaining in Progress bars https://github.com/willmcgugan/rich/issues/378 +- Fixed negative time remaining in Progress bars https://github.com/textualize/rich/issues/378 ## [9.0.1] - 2020-10-19 ### Fixed -- Fixed broken ANSI codes in input on windows legacy https://github.com/willmcgugan/rich/issues/393 +- Fixed broken ANSI codes in input on windows legacy https://github.com/textualize/rich/issues/393 ## [9.0.0] - 2020-10-18 @@ -899,15 +899,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added binary_units in progress download column - Added Progress.reset - Added Style.background_style property -- Added Bar renderable https://github.com/willmcgugan/rich/pull/361 +- Added Bar renderable https://github.com/textualize/rich/pull/361 - Added Table.min_width - Added table.Column.min_width and table.Column.max_width, and same to Table.add_column ### Changed - Dropped box.get_safe_box function in favor of Box.substitute -- Changed default padding in Panel from 0 to (0, 1) https://github.com/willmcgugan/rich/issues/385 -- Table with row_styles will extend background color between cells if the box has no vertical dividerhttps://github.com/willmcgugan/rich/issues/383 +- Changed default padding in Panel from 0 to (0, 1) https://github.com/textualize/rich/issues/385 +- Table with row_styles will extend background color between cells if the box has no vertical dividerhttps://github.com/textualize/rich/issues/383 - Changed default of fit kwarg in render_group() from False to True - Renamed rich.bar to rich.progress_bar, and Bar class to ProgressBar, rich.bar is now the new solid bar class @@ -940,7 +940,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added Console.begin_capture, Console.end_capture and Console.capture -- Added Table.title_justify and Table.caption_justify https://github.com/willmcgugan/rich/issues/301 +- Added Table.title_justify and Table.caption_justify https://github.com/textualize/rich/issues/301 ### Changed @@ -1031,7 +1031,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed underscore with display hook https://github.com/willmcgugan/rich/issues/235 +- Fixed underscore with display hook https://github.com/textualize/rich/issues/235 ## [5.2.0] - 2020-08-14 @@ -1039,7 +1039,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added crop argument to Console.print - Added "ignore" overflow method -- Added multiple characters per rule @hedythedev https://github.com/willmcgugan/rich/pull/207 +- Added multiple characters per rule @hedythedev https://github.com/textualize/rich/pull/207 ## [5.1.2] - 2020-08-10 @@ -1058,12 +1058,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added Text.cell_len -- Added helpful message regarding unicode decoding errors https://github.com/willmcgugan/rich/issues/212 +- Added helpful message regarding unicode decoding errors https://github.com/textualize/rich/issues/212 - Added display hook with pretty.install() ### Fixed -- Fixed deprecation warnings re backslash https://github.com/willmcgugan/rich/issues/210 +- Fixed deprecation warnings re backslash https://github.com/textualize/rich/issues/210 - Fixed repr highlighting of scientific notation, e.g. 1e100 ### Changed @@ -1090,24 +1090,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Added show_time and show_level parameters to RichHandler https://github.com/willmcgugan/rich/pull/182 +- Added show_time and show_level parameters to RichHandler https://github.com/textualize/rich/pull/182 ### Fixed -- Fixed progress.track iterator exiting early https://github.com/willmcgugan/rich/issues/189 -- Added workaround for Python bug https://bugs.python.org/issue37871, fixing https://github.com/willmcgugan/rich/issues/186 +- Fixed progress.track iterator exiting early https://github.com/textualize/rich/issues/189 +- Added workaround for Python bug https://bugs.python.org/issue37871, fixing https://github.com/textualize/rich/issues/186 ### Changed -- Set overflow=fold for log messages https://github.com/willmcgugan/rich/issues/190 +- Set overflow=fold for log messages https://github.com/textualize/rich/issues/190 ## [4.2.0] - 2020-07-27 ### Fixed -- Fixed missing new lines https://github.com/willmcgugan/rich/issues/178 -- Fixed Progress.track https://github.com/willmcgugan/rich/issues/184 -- Remove control codes from exported text https://github.com/willmcgugan/rich/issues/181 +- Fixed missing new lines https://github.com/textualize/rich/issues/178 +- Fixed Progress.track https://github.com/textualize/rich/issues/184 +- Remove control codes from exported text https://github.com/textualize/rich/issues/181 - Implemented auto-detection and color rendition of 16-color mode ## [4.1.0] - 2020-07-26 @@ -1123,7 +1123,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Added -- Added markup switch to RichHandler https://github.com/willmcgugan/rich/issues/171 +- Added markup switch to RichHandler https://github.com/textualize/rich/issues/171 ### Changed @@ -1132,7 +1132,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Fixed -- Fixed rendering of Confirm prompt https://github.com/willmcgugan/rich/issues/170 +- Fixed rendering of Confirm prompt https://github.com/textualize/rich/issues/170 ## [3.4.1] - 2020-07-22 @@ -1227,7 +1227,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Changed -- More precise detection of Windows console https://github.com/willmcgugan/rich/issues/140 +- More precise detection of Windows console https://github.com/textualize/rich/issues/140 ## [3.0.3] - 2020-07-03 @@ -1284,7 +1284,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Fixed -- Disabled legacy_windows if jupyter is detected https://github.com/willmcgugan/rich/issues/125 +- Disabled legacy_windows if jupyter is detected https://github.com/textualize/rich/issues/125 ## [2.3.0] - 2020-06-26 @@ -1305,13 +1305,13 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Changed -- Store a "link id" on Style instance, so links containing different styles are highlighted together. (https://github.com/willmcgugan/rich/pull/123) +- Store a "link id" on Style instance, so links containing different styles are highlighted together. (https://github.com/textualize/rich/pull/123) ## [2.2.5] - 2020-06-23 ### Fixed -- Fixed justify of tables (https://github.com/willmcgugan/rich/issues/117) +- Fixed justify of tables (https://github.com/textualize/rich/issues/117) ## [2.2.4] - 2020-06-21 @@ -1439,7 +1439,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Fixed -- Fixed Progress deadlock https://github.com/willmcgugan/rich/issues/90 +- Fixed Progress deadlock https://github.com/textualize/rich/issues/90 ### Changed @@ -1570,7 +1570,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Fixed -- Issue with Windows legacy support https://github.com/willmcgugan/rich/issues/59 +- Issue with Windows legacy support https://github.com/textualize/rich/issues/59 ## [1.0.1] - 2020-05-08 @@ -1592,7 +1592,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Fixed -- Fixed Text.assemble not working with strings https://github.com/willmcgugan/rich/issues/57 +- Fixed Text.assemble not working with strings https://github.com/textualize/rich/issues/57 - Fixed table when column widths must be compressed to fit ## [1.0.0] - 2020-05-03 @@ -1802,7 +1802,7 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr ### Fixed - Fixed Windows color support -- Fixed line width on windows issue (https://github.com/willmcgugan/rich/issues/7) +- Fixed line width on windows issue (https://github.com/textualize/rich/issues/7) - Fixed Pretty print on Windows ## [0.3.2] - 2020-01-26 @@ -1823,158 +1823,158 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr - First official release, API still to be stabilized -[unreleased]: https://github.com/willmcgugan/rich/compare/v12.5.2...HEAD -[12.5.2]: https://github.com/willmcgugan/rich/compare/v12.5.1...v12.5.2 -[12.5.1]: https://github.com/willmcgugan/rich/compare/v12.5.0...v12.5.1 -[12.5.0]: https://github.com/willmcgugan/rich/compare/v12.4.4...v12.5.0 -[12.4.4]: https://github.com/willmcgugan/rich/compare/v12.4.3...v12.4.4 -[12.4.3]: https://github.com/willmcgugan/rich/compare/v12.4.2...v12.4.3 -[12.4.2]: https://github.com/willmcgugan/rich/compare/v12.4.1...v12.4.2 -[12.4.1]: https://github.com/willmcgugan/rich/compare/v12.4.0...v12.4.1 -[12.4.0]: https://github.com/willmcgugan/rich/compare/v12.3.0...v12.4.0 -[12.3.0]: https://github.com/willmcgugan/rich/compare/v12.2.0...v12.3.0 -[12.2.0]: https://github.com/willmcgugan/rich/compare/v12.1.0...v12.2.0 -[12.1.0]: https://github.com/willmcgugan/rich/compare/v12.0.1...v12.1.0 -[12.0.1]: https://github.com/willmcgugan/rich/compare/v12.0.0...v12.0.1 -[12.0.0]: https://github.com/willmcgugan/rich/compare/v11.2.0...v12.0.0 -[11.2.0]: https://github.com/willmcgugan/rich/compare/v11.1.0...v11.2.0 -[11.1.0]: https://github.com/willmcgugan/rich/compare/v11.0.0...v11.1.0 -[11.0.0]: https://github.com/willmcgugan/rich/compare/v10.16.1...v11.0.0 -[10.16.2]: https://github.com/willmcgugan/rich/compare/v10.16.1...v10.16.2 -[10.16.1]: https://github.com/willmcgugan/rich/compare/v10.16.0...v10.16.1 -[10.16.0]: https://github.com/willmcgugan/rich/compare/v10.15.2...v10.16.0 -[10.15.2]: https://github.com/willmcgugan/rich/compare/v10.15.1...v10.15.2 -[10.15.1]: https://github.com/willmcgugan/rich/compare/v10.15.0...v10.15.1 -[10.15.0]: https://github.com/willmcgugan/rich/compare/v10.14.0...v10.15.0 -[10.14.0]: https://github.com/willmcgugan/rich/compare/v10.13.0...v10.14.0 -[10.13.0]: https://github.com/willmcgugan/rich/compare/v10.12.0...v10.13.0 -[10.12.0]: https://github.com/willmcgugan/rich/compare/v10.11.0...v10.12.0 -[10.11.0]: https://github.com/willmcgugan/rich/compare/v10.10.0...v10.11.0 -[10.10.0]: https://github.com/willmcgugan/rich/compare/v10.9.0...v10.10.0 -[10.9.0]: https://github.com/willmcgugan/rich/compare/v10.8.0...v10.9.0 -[10.8.0]: https://github.com/willmcgugan/rich/compare/v10.7.0...v10.8.0 -[10.7.0]: https://github.com/willmcgugan/rich/compare/v10.6.0...v10.7.0 -[10.6.0]: https://github.com/willmcgugan/rich/compare/v10.5.0...v10.6.0 -[10.5.0]: https://github.com/willmcgugan/rich/compare/v10.4.0...v10.5.0 -[10.4.0]: https://github.com/willmcgugan/rich/compare/v10.3.0...v10.4.0 -[10.3.0]: https://github.com/willmcgugan/rich/compare/v10.2.2...v10.3.0 -[10.2.2]: https://github.com/willmcgugan/rich/compare/v10.2.1...v10.2.2 -[10.2.1]: https://github.com/willmcgugan/rich/compare/v10.2.0...v10.2.1 -[10.2.0]: https://github.com/willmcgugan/rich/compare/v10.1.0...v10.2.0 -[10.1.0]: https://github.com/willmcgugan/rich/compare/v10.0.1...v10.1.0 -[10.0.1]: https://github.com/willmcgugan/rich/compare/v10.0.0...v10.0.1 -[10.0.0]: https://github.com/willmcgugan/rich/compare/v9.13.0...v10.0.0 -[9.13.0]: https://github.com/willmcgugan/rich/compare/v9.12.4...v9.13.0 -[9.12.4]: https://github.com/willmcgugan/rich/compare/v9.12.3...v9.12.4 -[9.12.3]: https://github.com/willmcgugan/rich/compare/v9.12.2...v9.12.3 -[9.12.2]: https://github.com/willmcgugan/rich/compare/v9.12.1...v9.12.2 -[9.12.1]: https://github.com/willmcgugan/rich/compare/v9.12.0...v9.12.1 -[9.12.0]: https://github.com/willmcgugan/rich/compare/v9.11.1...v9.12.0 -[9.11.1]: https://github.com/willmcgugan/rich/compare/v9.11.0...v9.11.1 -[9.11.0]: https://github.com/willmcgugan/rich/compare/v9.10.0...v9.11.0 -[9.10.0]: https://github.com/willmcgugan/rich/compare/v9.9.0...v9.10.0 -[9.9.0]: https://github.com/willmcgugan/rich/compare/v9.8.2...v9.9.0 -[9.8.2]: https://github.com/willmcgugan/rich/compare/v9.8.1...v9.8.2 -[9.8.1]: https://github.com/willmcgugan/rich/compare/v9.8.0...v9.8.1 -[9.8.0]: https://github.com/willmcgugan/rich/compare/v9.7.0...v9.8.0 -[9.7.0]: https://github.com/willmcgugan/rich/compare/v9.6.2...v9.7.0 -[9.6.2]: https://github.com/willmcgugan/rich/compare/v9.6.1...v9.6.2 -[9.6.1]: https://github.com/willmcgugan/rich/compare/v9.6.0...v9.6.1 -[9.6.0]: https://github.com/willmcgugan/rich/compare/v9.5.1...v9.6.0 -[9.5.1]: https://github.com/willmcgugan/rich/compare/v9.5.0...v9.5.1 -[9.5.0]: https://github.com/willmcgugan/rich/compare/v9.4.0...v9.5.0 -[9.4.0]: https://github.com/willmcgugan/rich/compare/v9.3.0...v9.4.0 -[9.3.0]: https://github.com/willmcgugan/rich/compare/v9.2.0...v9.3.0 -[9.2.0]: https://github.com/willmcgugan/rich/compare/v9.1.0...v9.2.0 -[9.1.0]: https://github.com/willmcgugan/rich/compare/v9.0.1...v9.1.0 -[9.0.1]: https://github.com/willmcgugan/rich/compare/v9.0.0...v9.0.1 -[9.0.0]: https://github.com/willmcgugan/rich/compare/v8.0.0...v9.0.0 -[8.0.0]: https://github.com/willmcgugan/rich/compare/v7.1.0...v8.0.0 -[7.1.0]: https://github.com/willmcgugan/rich/compare/v7.0.0...v7.1.0 -[7.0.0]: https://github.com/willmcgugan/rich/compare/v6.2.0...v7.0.0 -[6.2.0]: https://github.com/willmcgugan/rich/compare/v6.1.2...v6.2.0 -[6.1.2]: https://github.com/willmcgugan/rich/compare/v6.1.1...v6.1.2 -[6.1.1]: https://github.com/willmcgugan/rich/compare/v6.1.0...v6.1.1 -[6.1.0]: https://github.com/willmcgugan/rich/compare/v6.0.0...v6.1.0 -[6.0.0]: https://github.com/willmcgugan/rich/compare/v5.2.1...v6.0.0 -[5.2.1]: https://github.com/willmcgugan/rich/compare/v5.2.0...v5.2.1 -[5.2.0]: https://github.com/willmcgugan/rich/compare/v5.1.2...v5.2.0 -[5.1.2]: https://github.com/willmcgugan/rich/compare/v5.1.1...v5.1.2 -[5.1.1]: https://github.com/willmcgugan/rich/compare/v5.1.0...v5.1.1 -[5.1.0]: https://github.com/willmcgugan/rich/compare/v5.0.0...v5.1.0 -[5.0.0]: https://github.com/willmcgugan/rich/compare/v4.2.2...v5.0.0 -[4.2.2]: https://github.com/willmcgugan/rich/compare/v4.2.1...v4.2.2 -[4.2.1]: https://github.com/willmcgugan/rich/compare/v4.2.0...v4.2.1 -[4.2.0]: https://github.com/willmcgugan/rich/compare/v4.1.0...v4.2.0 -[4.1.0]: https://github.com/willmcgugan/rich/compare/v4.0.0...v4.1.0 -[4.0.0]: https://github.com/willmcgugan/rich/compare/v3.4.1...v4.0.0 -[3.4.1]: https://github.com/willmcgugan/rich/compare/v3.4.0...v3.4.1 -[3.4.0]: https://github.com/willmcgugan/rich/compare/v3.3.2...v3.4.0 -[3.3.2]: https://github.com/willmcgugan/rich/compare/v3.3.1...v3.3.2 -[3.3.1]: https://github.com/willmcgugan/rich/compare/v3.3.0...v3.3.1 -[3.3.0]: https://github.com/willmcgugan/rich/compare/v3.2.0...v3.3.0 -[3.2.0]: https://github.com/willmcgugan/rich/compare/v3.1.0...v3.2.0 -[3.1.0]: https://github.com/willmcgugan/rich/compare/v3.0.5...v3.1.0 -[3.0.5]: https://github.com/willmcgugan/rich/compare/v3.0.4...v3.0.5 -[3.0.4]: https://github.com/willmcgugan/rich/compare/v3.0.3...v3.0.4 -[3.0.3]: https://github.com/willmcgugan/rich/compare/v3.0.2...v3.0.3 -[3.0.2]: https://github.com/willmcgugan/rich/compare/v3.0.1...v3.0.2 -[3.0.1]: https://github.com/willmcgugan/rich/compare/v3.0.0...v3.0.1 -[3.0.0]: https://github.com/willmcgugan/rich/compare/v2.3.1...v3.0.0 -[2.3.1]: https://github.com/willmcgugan/rich/compare/v2.3.0...v2.3.1 -[2.3.0]: https://github.com/willmcgugan/rich/compare/v2.2.6...v2.3.0 -[2.2.6]: https://github.com/willmcgugan/rich/compare/v2.2.5...v2.2.6 -[2.2.5]: https://github.com/willmcgugan/rich/compare/v2.2.4...v2.2.5 -[2.2.4]: https://github.com/willmcgugan/rich/compare/v2.2.3...v2.2.4 -[2.2.3]: https://github.com/willmcgugan/rich/compare/v2.2.2...v2.2.3 -[2.2.2]: https://github.com/willmcgugan/rich/compare/v2.2.1...v2.2.2 -[2.2.1]: https://github.com/willmcgugan/rich/compare/v2.2.0...v2.2.1 -[2.2.0]: https://github.com/willmcgugan/rich/compare/v2.1.0...v2.2.0 -[2.1.0]: https://github.com/willmcgugan/rich/compare/v2.0.1...v2.1.0 -[2.0.1]: https://github.com/willmcgugan/rich/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/willmcgugan/rich/compare/v1.3.1...v2.0.0 -[1.3.1]: https://github.com/willmcgugan/rich/compare/v1.3.0...v1.3.1 -[1.3.0]: https://github.com/willmcgugan/rich/compare/v1.2.3...v1.3.0 -[1.2.3]: https://github.com/willmcgugan/rich/compare/v1.2.2...v1.2.3 -[1.2.2]: https://github.com/willmcgugan/rich/compare/v1.2.1...v1.2.2 -[1.2.1]: https://github.com/willmcgugan/rich/compare/v1.2.0...v1.2.1 -[1.2.0]: https://github.com/willmcgugan/rich/compare/v1.1.9...v1.2.0 -[1.1.9]: https://github.com/willmcgugan/rich/compare/v1.1.8...v1.1.9 -[1.1.8]: https://github.com/willmcgugan/rich/compare/v1.1.7...v1.1.8 -[1.1.7]: https://github.com/willmcgugan/rich/compare/v1.1.6...v1.1.7 -[1.1.6]: https://github.com/willmcgugan/rich/compare/v1.1.5...v1.1.6 -[1.1.5]: https://github.com/willmcgugan/rich/compare/v1.1.4...v1.1.5 -[1.1.4]: https://github.com/willmcgugan/rich/compare/v1.1.3...v1.1.4 -[1.1.3]: https://github.com/willmcgugan/rich/compare/v1.1.2...v1.1.3 -[1.1.2]: https://github.com/willmcgugan/rich/compare/v1.1.1...v1.1.2 -[1.1.1]: https://github.com/willmcgugan/rich/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/willmcgugan/rich/compare/v1.0.3...v1.1.0 -[1.0.3]: https://github.com/willmcgugan/rich/compare/v1.0.2...v1.0.3 -[1.0.2]: https://github.com/willmcgugan/rich/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/willmcgugan/rich/compare/v1.0.0...v1.0.1 -[1.0.0]: https://github.com/willmcgugan/rich/compare/v0.8.13...v1.0.0 -[0.8.13]: https://github.com/willmcgugan/rich/compare/v0.8.12...v0.8.13 -[0.8.12]: https://github.com/willmcgugan/rich/compare/v0.8.11...v0.8.12 -[0.8.11]: https://github.com/willmcgugan/rich/compare/v0.8.10...v0.8.11 -[0.8.10]: https://github.com/willmcgugan/rich/compare/v0.8.9...v0.8.10 -[0.8.9]: https://github.com/willmcgugan/rich/compare/v0.8.8...v0.8.9 -[0.8.8]: https://github.com/willmcgugan/rich/compare/v0.8.7...v0.8.8 -[0.8.7]: https://github.com/willmcgugan/rich/compare/v0.8.6...v0.8.7 -[0.8.6]: https://github.com/willmcgugan/rich/compare/v0.8.5...v0.8.6 -[0.8.5]: https://github.com/willmcgugan/rich/compare/v0.8.4...v0.8.5 -[0.8.4]: https://github.com/willmcgugan/rich/compare/v0.8.3...v0.8.4 -[0.8.3]: https://github.com/willmcgugan/rich/compare/v0.8.2...v0.8.3 -[0.8.2]: https://github.com/willmcgugan/rich/compare/v0.8.1...v0.8.2 -[0.8.1]: https://github.com/willmcgugan/rich/compare/v0.8.0...v0.8.1 -[0.8.0]: https://github.com/willmcgugan/rich/compare/v0.7.2...v0.8.0 -[0.7.2]: https://github.com/willmcgugan/rich/compare/v0.7.1...v0.7.2 -[0.7.1]: https://github.com/willmcgugan/rich/compare/v0.7.0...v0.7.1 -[0.7.0]: https://github.com/willmcgugan/rich/compare/v0.6.0...v0.7.0 -[0.6.0]: https://github.com/willmcgugan/rich/compare/v0.5.0...v0.6.0 -[0.5.0]: https://github.com/willmcgugan/rich/compare/v0.4.1...v0.5.0 -[0.4.1]: https://github.com/willmcgugan/rich/compare/v0.4.0...v0.4.1 -[0.4.0]: https://github.com/willmcgugan/rich/compare/v0.3.3...v0.4.0 -[0.3.3]: https://github.com/willmcgugan/rich/compare/v0.3.2...v0.3.3 -[0.3.2]: https://github.com/willmcgugan/rich/compare/v0.3.1...v0.3.2 -[0.3.1]: https://github.com/willmcgugan/rich/compare/v0.3.0...v0.3.1 -[0.3.0]: https://github.com/willmcgugan/rich/compare/v0.2.0...v0.3.0 +[unreleased]: https://github.com/textualize/rich/compare/v12.5.2...HEAD +[12.5.2]: https://github.com/textualize/rich/compare/v12.5.1...v12.5.2 +[12.5.1]: https://github.com/textualize/rich/compare/v12.5.0...v12.5.1 +[12.5.0]: https://github.com/textualize/rich/compare/v12.4.4...v12.5.0 +[12.4.4]: https://github.com/textualize/rich/compare/v12.4.3...v12.4.4 +[12.4.3]: https://github.com/textualize/rich/compare/v12.4.2...v12.4.3 +[12.4.2]: https://github.com/textualize/rich/compare/v12.4.1...v12.4.2 +[12.4.1]: https://github.com/textualize/rich/compare/v12.4.0...v12.4.1 +[12.4.0]: https://github.com/textualize/rich/compare/v12.3.0...v12.4.0 +[12.3.0]: https://github.com/textualize/rich/compare/v12.2.0...v12.3.0 +[12.2.0]: https://github.com/textualize/rich/compare/v12.1.0...v12.2.0 +[12.1.0]: https://github.com/textualize/rich/compare/v12.0.1...v12.1.0 +[12.0.1]: https://github.com/textualize/rich/compare/v12.0.0...v12.0.1 +[12.0.0]: https://github.com/textualize/rich/compare/v11.2.0...v12.0.0 +[11.2.0]: https://github.com/textualize/rich/compare/v11.1.0...v11.2.0 +[11.1.0]: https://github.com/textualize/rich/compare/v11.0.0...v11.1.0 +[11.0.0]: https://github.com/textualize/rich/compare/v10.16.1...v11.0.0 +[10.16.2]: https://github.com/textualize/rich/compare/v10.16.1...v10.16.2 +[10.16.1]: https://github.com/textualize/rich/compare/v10.16.0...v10.16.1 +[10.16.0]: https://github.com/textualize/rich/compare/v10.15.2...v10.16.0 +[10.15.2]: https://github.com/textualize/rich/compare/v10.15.1...v10.15.2 +[10.15.1]: https://github.com/textualize/rich/compare/v10.15.0...v10.15.1 +[10.15.0]: https://github.com/textualize/rich/compare/v10.14.0...v10.15.0 +[10.14.0]: https://github.com/textualize/rich/compare/v10.13.0...v10.14.0 +[10.13.0]: https://github.com/textualize/rich/compare/v10.12.0...v10.13.0 +[10.12.0]: https://github.com/textualize/rich/compare/v10.11.0...v10.12.0 +[10.11.0]: https://github.com/textualize/rich/compare/v10.10.0...v10.11.0 +[10.10.0]: https://github.com/textualize/rich/compare/v10.9.0...v10.10.0 +[10.9.0]: https://github.com/textualize/rich/compare/v10.8.0...v10.9.0 +[10.8.0]: https://github.com/textualize/rich/compare/v10.7.0...v10.8.0 +[10.7.0]: https://github.com/textualize/rich/compare/v10.6.0...v10.7.0 +[10.6.0]: https://github.com/textualize/rich/compare/v10.5.0...v10.6.0 +[10.5.0]: https://github.com/textualize/rich/compare/v10.4.0...v10.5.0 +[10.4.0]: https://github.com/textualize/rich/compare/v10.3.0...v10.4.0 +[10.3.0]: https://github.com/textualize/rich/compare/v10.2.2...v10.3.0 +[10.2.2]: https://github.com/textualize/rich/compare/v10.2.1...v10.2.2 +[10.2.1]: https://github.com/textualize/rich/compare/v10.2.0...v10.2.1 +[10.2.0]: https://github.com/textualize/rich/compare/v10.1.0...v10.2.0 +[10.1.0]: https://github.com/textualize/rich/compare/v10.0.1...v10.1.0 +[10.0.1]: https://github.com/textualize/rich/compare/v10.0.0...v10.0.1 +[10.0.0]: https://github.com/textualize/rich/compare/v9.13.0...v10.0.0 +[9.13.0]: https://github.com/textualize/rich/compare/v9.12.4...v9.13.0 +[9.12.4]: https://github.com/textualize/rich/compare/v9.12.3...v9.12.4 +[9.12.3]: https://github.com/textualize/rich/compare/v9.12.2...v9.12.3 +[9.12.2]: https://github.com/textualize/rich/compare/v9.12.1...v9.12.2 +[9.12.1]: https://github.com/textualize/rich/compare/v9.12.0...v9.12.1 +[9.12.0]: https://github.com/textualize/rich/compare/v9.11.1...v9.12.0 +[9.11.1]: https://github.com/textualize/rich/compare/v9.11.0...v9.11.1 +[9.11.0]: https://github.com/textualize/rich/compare/v9.10.0...v9.11.0 +[9.10.0]: https://github.com/textualize/rich/compare/v9.9.0...v9.10.0 +[9.9.0]: https://github.com/textualize/rich/compare/v9.8.2...v9.9.0 +[9.8.2]: https://github.com/textualize/rich/compare/v9.8.1...v9.8.2 +[9.8.1]: https://github.com/textualize/rich/compare/v9.8.0...v9.8.1 +[9.8.0]: https://github.com/textualize/rich/compare/v9.7.0...v9.8.0 +[9.7.0]: https://github.com/textualize/rich/compare/v9.6.2...v9.7.0 +[9.6.2]: https://github.com/textualize/rich/compare/v9.6.1...v9.6.2 +[9.6.1]: https://github.com/textualize/rich/compare/v9.6.0...v9.6.1 +[9.6.0]: https://github.com/textualize/rich/compare/v9.5.1...v9.6.0 +[9.5.1]: https://github.com/textualize/rich/compare/v9.5.0...v9.5.1 +[9.5.0]: https://github.com/textualize/rich/compare/v9.4.0...v9.5.0 +[9.4.0]: https://github.com/textualize/rich/compare/v9.3.0...v9.4.0 +[9.3.0]: https://github.com/textualize/rich/compare/v9.2.0...v9.3.0 +[9.2.0]: https://github.com/textualize/rich/compare/v9.1.0...v9.2.0 +[9.1.0]: https://github.com/textualize/rich/compare/v9.0.1...v9.1.0 +[9.0.1]: https://github.com/textualize/rich/compare/v9.0.0...v9.0.1 +[9.0.0]: https://github.com/textualize/rich/compare/v8.0.0...v9.0.0 +[8.0.0]: https://github.com/textualize/rich/compare/v7.1.0...v8.0.0 +[7.1.0]: https://github.com/textualize/rich/compare/v7.0.0...v7.1.0 +[7.0.0]: https://github.com/textualize/rich/compare/v6.2.0...v7.0.0 +[6.2.0]: https://github.com/textualize/rich/compare/v6.1.2...v6.2.0 +[6.1.2]: https://github.com/textualize/rich/compare/v6.1.1...v6.1.2 +[6.1.1]: https://github.com/textualize/rich/compare/v6.1.0...v6.1.1 +[6.1.0]: https://github.com/textualize/rich/compare/v6.0.0...v6.1.0 +[6.0.0]: https://github.com/textualize/rich/compare/v5.2.1...v6.0.0 +[5.2.1]: https://github.com/textualize/rich/compare/v5.2.0...v5.2.1 +[5.2.0]: https://github.com/textualize/rich/compare/v5.1.2...v5.2.0 +[5.1.2]: https://github.com/textualize/rich/compare/v5.1.1...v5.1.2 +[5.1.1]: https://github.com/textualize/rich/compare/v5.1.0...v5.1.1 +[5.1.0]: https://github.com/textualize/rich/compare/v5.0.0...v5.1.0 +[5.0.0]: https://github.com/textualize/rich/compare/v4.2.2...v5.0.0 +[4.2.2]: https://github.com/textualize/rich/compare/v4.2.1...v4.2.2 +[4.2.1]: https://github.com/textualize/rich/compare/v4.2.0...v4.2.1 +[4.2.0]: https://github.com/textualize/rich/compare/v4.1.0...v4.2.0 +[4.1.0]: https://github.com/textualize/rich/compare/v4.0.0...v4.1.0 +[4.0.0]: https://github.com/textualize/rich/compare/v3.4.1...v4.0.0 +[3.4.1]: https://github.com/textualize/rich/compare/v3.4.0...v3.4.1 +[3.4.0]: https://github.com/textualize/rich/compare/v3.3.2...v3.4.0 +[3.3.2]: https://github.com/textualize/rich/compare/v3.3.1...v3.3.2 +[3.3.1]: https://github.com/textualize/rich/compare/v3.3.0...v3.3.1 +[3.3.0]: https://github.com/textualize/rich/compare/v3.2.0...v3.3.0 +[3.2.0]: https://github.com/textualize/rich/compare/v3.1.0...v3.2.0 +[3.1.0]: https://github.com/textualize/rich/compare/v3.0.5...v3.1.0 +[3.0.5]: https://github.com/textualize/rich/compare/v3.0.4...v3.0.5 +[3.0.4]: https://github.com/textualize/rich/compare/v3.0.3...v3.0.4 +[3.0.3]: https://github.com/textualize/rich/compare/v3.0.2...v3.0.3 +[3.0.2]: https://github.com/textualize/rich/compare/v3.0.1...v3.0.2 +[3.0.1]: https://github.com/textualize/rich/compare/v3.0.0...v3.0.1 +[3.0.0]: https://github.com/textualize/rich/compare/v2.3.1...v3.0.0 +[2.3.1]: https://github.com/textualize/rich/compare/v2.3.0...v2.3.1 +[2.3.0]: https://github.com/textualize/rich/compare/v2.2.6...v2.3.0 +[2.2.6]: https://github.com/textualize/rich/compare/v2.2.5...v2.2.6 +[2.2.5]: https://github.com/textualize/rich/compare/v2.2.4...v2.2.5 +[2.2.4]: https://github.com/textualize/rich/compare/v2.2.3...v2.2.4 +[2.2.3]: https://github.com/textualize/rich/compare/v2.2.2...v2.2.3 +[2.2.2]: https://github.com/textualize/rich/compare/v2.2.1...v2.2.2 +[2.2.1]: https://github.com/textualize/rich/compare/v2.2.0...v2.2.1 +[2.2.0]: https://github.com/textualize/rich/compare/v2.1.0...v2.2.0 +[2.1.0]: https://github.com/textualize/rich/compare/v2.0.1...v2.1.0 +[2.0.1]: https://github.com/textualize/rich/compare/v2.0.0...v2.0.1 +[2.0.0]: https://github.com/textualize/rich/compare/v1.3.1...v2.0.0 +[1.3.1]: https://github.com/textualize/rich/compare/v1.3.0...v1.3.1 +[1.3.0]: https://github.com/textualize/rich/compare/v1.2.3...v1.3.0 +[1.2.3]: https://github.com/textualize/rich/compare/v1.2.2...v1.2.3 +[1.2.2]: https://github.com/textualize/rich/compare/v1.2.1...v1.2.2 +[1.2.1]: https://github.com/textualize/rich/compare/v1.2.0...v1.2.1 +[1.2.0]: https://github.com/textualize/rich/compare/v1.1.9...v1.2.0 +[1.1.9]: https://github.com/textualize/rich/compare/v1.1.8...v1.1.9 +[1.1.8]: https://github.com/textualize/rich/compare/v1.1.7...v1.1.8 +[1.1.7]: https://github.com/textualize/rich/compare/v1.1.6...v1.1.7 +[1.1.6]: https://github.com/textualize/rich/compare/v1.1.5...v1.1.6 +[1.1.5]: https://github.com/textualize/rich/compare/v1.1.4...v1.1.5 +[1.1.4]: https://github.com/textualize/rich/compare/v1.1.3...v1.1.4 +[1.1.3]: https://github.com/textualize/rich/compare/v1.1.2...v1.1.3 +[1.1.2]: https://github.com/textualize/rich/compare/v1.1.1...v1.1.2 +[1.1.1]: https://github.com/textualize/rich/compare/v1.1.0...v1.1.1 +[1.1.0]: https://github.com/textualize/rich/compare/v1.0.3...v1.1.0 +[1.0.3]: https://github.com/textualize/rich/compare/v1.0.2...v1.0.3 +[1.0.2]: https://github.com/textualize/rich/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/textualize/rich/compare/v1.0.0...v1.0.1 +[1.0.0]: https://github.com/textualize/rich/compare/v0.8.13...v1.0.0 +[0.8.13]: https://github.com/textualize/rich/compare/v0.8.12...v0.8.13 +[0.8.12]: https://github.com/textualize/rich/compare/v0.8.11...v0.8.12 +[0.8.11]: https://github.com/textualize/rich/compare/v0.8.10...v0.8.11 +[0.8.10]: https://github.com/textualize/rich/compare/v0.8.9...v0.8.10 +[0.8.9]: https://github.com/textualize/rich/compare/v0.8.8...v0.8.9 +[0.8.8]: https://github.com/textualize/rich/compare/v0.8.7...v0.8.8 +[0.8.7]: https://github.com/textualize/rich/compare/v0.8.6...v0.8.7 +[0.8.6]: https://github.com/textualize/rich/compare/v0.8.5...v0.8.6 +[0.8.5]: https://github.com/textualize/rich/compare/v0.8.4...v0.8.5 +[0.8.4]: https://github.com/textualize/rich/compare/v0.8.3...v0.8.4 +[0.8.3]: https://github.com/textualize/rich/compare/v0.8.2...v0.8.3 +[0.8.2]: https://github.com/textualize/rich/compare/v0.8.1...v0.8.2 +[0.8.1]: https://github.com/textualize/rich/compare/v0.8.0...v0.8.1 +[0.8.0]: https://github.com/textualize/rich/compare/v0.7.2...v0.8.0 +[0.7.2]: https://github.com/textualize/rich/compare/v0.7.1...v0.7.2 +[0.7.1]: https://github.com/textualize/rich/compare/v0.7.0...v0.7.1 +[0.7.0]: https://github.com/textualize/rich/compare/v0.6.0...v0.7.0 +[0.6.0]: https://github.com/textualize/rich/compare/v0.5.0...v0.6.0 +[0.5.0]: https://github.com/textualize/rich/compare/v0.4.1...v0.5.0 +[0.4.1]: https://github.com/textualize/rich/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/textualize/rich/compare/v0.3.3...v0.4.0 +[0.3.3]: https://github.com/textualize/rich/compare/v0.3.2...v0.3.3 +[0.3.2]: https://github.com/textualize/rich/compare/v0.3.1...v0.3.2 +[0.3.1]: https://github.com/textualize/rich/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/textualize/rich/compare/v0.2.0...v0.3.0 diff --git a/README.cn.md b/README.cn.md index 253abf8c6..b12008dc7 100644 --- a/README.cn.md +++ b/README.cn.md @@ -4,30 +4,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich 是一个 Python 库,可以为您在终端中提供富文本和精美格式。 [Rich 的 API](https://rich.readthedocs.io/en/latest/) 让在终端输出颜色和样式变得很简单。此外,Rich 还可以绘制漂亮的表格、进度条、markdown、语法高亮的源代码以及栈回溯信息(tracebacks)等——开箱即用。 -![功能纵览](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![功能纵览](https://github.com/textualize/rich/raw/master/imgs/features.png) 有关 Rich 的视频介绍,请参见 [@fishnets88](https://twitter.com/fishnets88) 录制的 @@ -57,7 +57,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## 在交互式命令行(REPL)中使用 Rich @@ -68,7 +68,7 @@ Rich 可以被安装到 Python 交互式命令行中,那样做以后,任何 >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## 使用控制台 @@ -96,7 +96,7 @@ console.print("Hello", "World!", style="bold red") 输出如下图: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) 这个范例一次只设置了一行文字的样式。如果想获得更细腻更复杂的样式,Rich 可以渲染一个特殊的标记,其语法类似于[bbcode](https://en.wikipedia.org/wiki/BBCode)。示例如下: @@ -104,7 +104,7 @@ console.print("Hello", "World!", style="bold red") console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![控制台标记](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![控制台标记](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) 使用`Console`对象,你可以花最少的工夫生成复杂的输出。更详细的内容可查阅 [Console API](https://rich.readthedocs.io/en/latest/console.html) 文档。 @@ -118,7 +118,7 @@ Rich 提供一个 [inspect](https://rich.readthedocs.io/en/latest/reference/init >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) 查看 [inspect 文档](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect)详细了解。 @@ -158,7 +158,7 @@ test_log() 以上范例的输出如下: -![日志](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![日志](https://github.com/textualize/rich/raw/master/imgs/log.png) 注意其中的`log_locals`参数会输出一个表格,该表格包含调用 log 方法的局部变量。 @@ -170,7 +170,7 @@ log 方法既可用于将常驻进程(例如服务器进程)的日志打印 您还可以使用内置的[处理器类](https://rich.readthedocs.io/en/latest/logging.html)来对 Python 的 logging 模块的输出进行格式化和着色。下面是输出示例: -![记录](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![记录](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -225,13 +225,13 @@ console.print(table) 该示例的输出如下: -![表格](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![表格](https://github.com/textualize/rich/raw/master/imgs/table.png) 请注意,控制台标记的呈现方式与`print()`和`log()`相同。实际上,由 Rich 渲染的任何内容都可以添加到标题/行(甚至其他表格)中。 `Table`类很聪明,可以调整列的大小以适合终端的可用宽度,并能根据需要对文字折行。下面是相同的示例,输出与比上表小的终端上: -![表格 2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![表格 2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -251,13 +251,13 @@ for step in track(range(100)): 添加多个进度条并不难。以下是从文档中获取的示例: -![进度](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![进度](https://github.com/textualize/rich/raw/master/imgs/progress.gif) 这些列可以配置为显示您所需的任何详细信息。内置列包括完成百分比,文件大小,文件速度和剩余时间。下面是显示正在进行的下载的示例: -![进度](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![进度](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -要自己尝试一下,请参阅[examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py),它可以在显示进度的同时下载多个 URL。 +要自己尝试一下,请参阅[examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py),它可以在显示进度的同时下载多个 URL。 @@ -282,7 +282,7 @@ with console.status("[bold green]Working on tasks...") as status: 这会往终端生成以下输出: -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) 这个旋转动画借鉴自 [cli-spinners](https://www.npmjs.com/package/cli-spinners) 项目。你可以通过`spinner`参数指定一种动画效果。执行以下命令来查看所有可选值: @@ -292,7 +292,7 @@ python -m rich.spinner 这会往终端输出以下内容: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -309,9 +309,9 @@ python -m rich.tree 这会产生以下输出: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -[tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) 是一个展示任意目录的文件树视图的样例文件,类似于 Linux 中的 `tree` 命令。 +[tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) 是一个展示任意目录的文件树视图的样例文件,类似于 Linux 中的 `tree` 命令。 @@ -331,9 +331,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -以下屏幕截图是[列示例](https://github.com/willmcgugan/rich/blob/master/examples/columns.py)的输出,该列显示了从 API 提取的数据: +以下屏幕截图是[列示例](https://github.com/textualize/rich/blob/master/examples/columns.py)的输出,该列显示了从 API 提取的数据: -![列](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![列](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -356,7 +356,7 @@ console.print(markdown) 该例子的输出如下图: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -391,7 +391,7 @@ console.print(syntax) 输出如下: -![语法](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![语法](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -402,7 +402,7 @@ Rich 可以渲染出漂亮的[栈回溯信息](https://rich.readthedocs.io/en/la 下面是在 OSX(在 Linux 上也类似)系统的效果: -![回溯](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![回溯](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -434,4 +434,4 @@ Rich 可以渲染出漂亮的[栈回溯信息](https://rich.readthedocs.io/en/la 自动将字幕与视频同步 - [tryolabs/norfair](https://github.com/tryolabs/norfair) 轻量级 Python 库,用于向任何检测器添加实时 2D 对象跟踪 -- +[还有很多](https://github.com/willmcgugan/rich/network/dependents)! +- +[还有很多](https://github.com/textualize/rich/network/dependents)! diff --git a/README.de-ch.md b/README.de-ch.md index dcd5cd77c..7fef4d6d7 100644 --- a/README.de-ch.md +++ b/README.de-ch.md @@ -4,30 +4,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich isch ä Python Library för _rich_ Text ond ganz schöni formatiärig im Törminäl D [Rich API](https://rich.readthedocs.io/en/latest/) machts ganz eifach zom Farbä ond Stiil zu de Törminälusgob hinzu z füäge. Rich cha au schöni Tabelle, Progressbare, Markdown, Syntax hervorhebe, Tracebäcks und meh darstelle — fix fertig usem Böxli. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) E Video Iifüärig öber Rich geds onder [calmcode.io](https://calmcode.io/rich/introduction.html) vo [@fishnets88](https://twitter.com/fishnets88). @@ -63,7 +63,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -74,7 +74,7 @@ Rich cha i de Python REPL installiert werde so dass irgend e Datestruktuur hübs >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Console bruchä @@ -102,7 +102,7 @@ console.print("Hello", "World!", style="bold red") D Usgob gsiät öppe ä so us: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Da isch guät für d Gstalltig vom Text pro Liniä. Vör ä granularäri Gstalltig hed Rich e spezielli Markup mitäre ähnloche Befehlsufbau wiä [bbcode](https://en.wikipedia.org/wiki/BBCode). Do es Bispiil: @@ -110,7 +110,7 @@ Da isch guät für d Gstalltig vom Text pro Liniä. Vör ä granularäri Gstallt console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Du chasch mitmäne Console Objekt mit wenig Ufwand aasprechendi Usgob erziile. Lueg do d [Console API](https://rich.readthedocs.io/en/latest/console.html) Dokumentation für d Details a. @@ -124,7 +124,7 @@ Rich hät e [inspect](https://rich.readthedocs.io/en/latest/reference/init.html? >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) Lueg do d [inspect Dokumentation](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) für d Details a. @@ -164,7 +164,7 @@ test_log() Das do obe gid di folgend Usgob: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Beachte s Argument `log_locals` wo innere Tabelle di lokalä Variable us gid zur Zitt wo d Methodä ufgruäfä worde isch. @@ -176,7 +176,7 @@ D log Methodä cha zum is Törminäl inne z Logge für langläbige Applikationä Du chasch au d Builtin [Handler Class](https://rich.readthedocs.io/en/latest/logging.html) verwende zum d Usgob vom Python logging Module z formatiäre und iifärbe. Do es Bispiil vo de Usgob: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -199,9 +199,9 @@ Bitte verwend diä Funktion gschiid. Rich cha flexiibäl [Tabelle](https://rich.readthedocs.io/en/latest/tables.html) mit Boxä us Unicodezeiche generiäre. Es gid e Viilzahl vo Formatiärigsoptionä für Ränder, Stiil, Zelleusrichtig ond so witter. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -D Animation obe isch mit [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) us em Bispiil-Ordner erstellt worde. +D Animation obe isch mit [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) us em Bispiil-Ordner erstellt worde. Do es eifachs Tabelle-Bispiil: @@ -237,13 +237,13 @@ console.print(table) Das gid di folgend Usgob: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) Beacht das d Konsole Markup glich wie bi `print()` ond `log()` generiärt wird. Ond zwor cha alles wo vo Rich generiert werde cha au im Chopf / Zille iigfüägt werde (sogar anderi Tabellene). D Klass `Table` isch gschiid gnuäg yum d Spaltebreite am verfüägbare Platz im Törminäl aazpasse und de Text gegäbenefalls umzbreche. Do isch s gliche Bispiil mit em Törminäl chlinner als d Tabelle vo obe: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -263,13 +263,13 @@ for step in track(range(100)): Es isch nöd vill schwiriger zum mehräri Progress Bars hinzuä zfüäge. Do es Bispiil us de Doku: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) D Spaltä cha so konfiguriärt werde das alli gwünschte Details aazeigt werded. D Built-in Spalte beinhaltät Prozentsatz, Dateigrössi, Dateigschwindikeit ond öbrigi Zitt. Do isch e andos Bispiil wo en laufände Download zeigt: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Zums selber usprobiäre lueg [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) a, wo cha glichzittig mehräri URLs abelade und de Fortschritt aazeige. +Zums selber usprobiäre lueg [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) a, wo cha glichzittig mehräri URLs abelade und de Fortschritt aazeige. @@ -294,7 +294,7 @@ with console.status("[bold green]Working on tasks...") as status: Das gid di folgendi Usgob im Törminäl. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) D Spinner Animatione sind vo [cli-spinners](https://www.npmjs.com/package/cli-spinners) usglehnt. Du chasch en speziifischä Spinner mit em `spinner` Parameter uswähle. Start de folgend Befehl zom die verfüägbare Wert z gsiä: @@ -304,7 +304,7 @@ python -m rich.spinner De Befehl obe generiärt di folgändi Usgob im Törminäl: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -321,9 +321,9 @@ python -m rich.tree Das generiärt di folgend Usgob: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Lueg s Bispiil Script [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) für e Darstellig vo irgend eim Ordner als Tree, glich wie de Linux Befehl `tree`. +Lueg s Bispiil Script [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) für e Darstellig vo irgend eim Ordner als Tree, glich wie de Linux Befehl `tree`. @@ -343,9 +343,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -De folgend Screenshot isch d Usgob vom [Spalte-Bispiil](https://github.com/willmcgugan/rich/blob/master/examples/columns.py), wo Date vonnere API hollt ond in Spaltene darstellt: +De folgend Screenshot isch d Usgob vom [Spalte-Bispiil](https://github.com/textualize/rich/blob/master/examples/columns.py), wo Date vonnere API hollt ond in Spaltene darstellt: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -368,7 +368,7 @@ console.print(markdown) Das wird d Usgob ungefär wie s Folgende geh: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -403,7 +403,7 @@ console.print(syntax) Das wird d Usgob ungefär wie s Folgende geh: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -414,7 +414,7 @@ Rich cha [wunderschöni Tracebacks](https://rich.readthedocs.io/en/latest/traceb So gsiets ungefär ufemen OSX (ähnloch uf Linux) us: -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -454,6 +454,6 @@ Do es paar Projekt wo Rich verwended: Lightweight Python library for adding real-time 2D object tracking to any detector. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint checks playbooks for practices and behaviour that could potentially be improved - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule testing framework -- +[Vieli meh](https://github.com/willmcgugan/rich/network/dependents)! +- +[Vieli meh](https://github.com/textualize/rich/network/dependents)! diff --git a/README.de.md b/README.de.md index a717b091a..e9c25dc1f 100644 --- a/README.de.md +++ b/README.de.md @@ -4,30 +4,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich ist eine Python-Bibliothek für _rich_ Text und schöne Formatierung im Terminal. Die [Rich API](https://rich.readthedocs.io/en/latest/) erleichtert das Hinzufügen von Farbe und Stil zur Terminalausgabe. Rich kann auch schöne Tabellen, Fortschrittsbalken, Markdowns, durch Syntax hervorgehobenen Quellcode, Tracebacks und mehr sofort rendern. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) Eine Video-Einführung in Rich findest du unter [quietcode.io](https://calmcode.io/rich/introduction.html) von [@ fishnets88](https://twitter.com/fishnets88). @@ -63,7 +63,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -74,7 +74,7 @@ Rich kann in Python REPL installiert werden, so dass alle Datenstrukturen schön >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Verwenden der Konsole @@ -102,7 +102,7 @@ console.print("Hello", "World!", style="bold red") Die Ausgabe wird in etwa wie folgt aussehen: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Das ist gut, um jeweils eine Textzeile zu stylen. Für eine detailliertere Gestaltung bietet Rich ein spezielles Markup an, das in der Syntax ähnlich [bbcode](https://en.wikipedia.org/wiki/BBCode) ist. Hier ein Beispiel: @@ -110,7 +110,7 @@ Das ist gut, um jeweils eine Textzeile zu stylen. Für eine detailliertere Gesta console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Du kannst ein Console-Objekt verwenden, um mit minimalem Aufwand anspruchsvolle Ausgaben zu erzeugen. Siehe [Konsolen-API](https://rich.readthedocs.io/en/latest/console.html) für Details. @@ -124,7 +124,7 @@ Rich hat eine Funktion [inspect](https://rich.readthedocs.io/en/latest/reference >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) Siehe [Doks Inspektor](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) für Details. @@ -164,7 +164,7 @@ test_log() Die obige Funktion erzeugt die folgende Ausgabe: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Beachte das Argument `log_locals`, das eine Tabelle mit den lokalen Variablen ausgibt, in der die log-Methode aufgerufen wurde. @@ -176,7 +176,7 @@ Die log-Methode kann für die Protokollierung auf dem Terminal für langlaufende Du kannst auch die eingebaute [Handler-Klasse](https://rich.readthedocs.io/en/latest/logging.html) verwenden, um die Ausgabe von Pythons Logging-Modul zu formatieren und einzufärben. Hier ein Beispiel für die Ausgabe: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -199,9 +199,9 @@ Bitte verwenden Sie diese Funktion mit Bedacht. Rich kann flexible [Tabellen](https://rich.readthedocs.io/en/latest/tables.html) mit Unicode-Box-Characters darstellen. Es gibt eine Vielzahl von Formatierungsmöglichkeiten für Rahmen, Stile, Zellausrichtung usw. -![Film-Tabelle](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![Film-Tabelle](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -Die obige Animation wurde mit [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) im Verzeichnis `examples` erzeugt. +Die obige Animation wurde mit [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) im Verzeichnis `examples` erzeugt. Hier ist ein einfacheres Tabellenbeispiel: @@ -237,13 +237,13 @@ console.print(table) Dies erzeugt diese Ausgabe: -![Tabelle](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![Tabelle](https://github.com/textualize/rich/raw/master/imgs/table.png) Beachte, dass das Konsolen-Markup auf die gleiche Weise gerendert wird wie `print()` und `log()`. Tatsächlich kann alles, was von Rich gerendert werden kann, in den Kopfzeilen/Zeilen enthalten sein (sogar andere Tabellen). Die Klasse `Table` ist intelligent genug, um die Größe der Spalten an die verfügbare Breite des Terminals anzupassen und den Text wie erforderlich umzubrechen. Hier ist das gleiche Beispiel, wobei das Terminal kleiner als bei der obigen Tabelle ist: -![Tabelle2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![Tabelle2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -263,13 +263,13 @@ for step in track(range(100)): Es ist nicht viel schwieriger, mehrere Fortschrittsbalken hinzuzufügen. Hier ein Beispiel aus der Doku: -![Fortschritt](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![Fortschritt](https://github.com/textualize/rich/raw/master/imgs/progress.gif) Die Spalten können so konfiguriert werden, dass sie alle gewünschten Details anzeigen. Zu den eingebauten Spalten gehören Prozentsatz der Fertigstellung, Dateigröße, Downloadgeschwindigkeit und verbleibende Zeit. Hier ist ein weiteres Beispiel, das einen laufenden Download anzeigt: -![Fortschritt](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![Fortschritt](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Um dies selbst auszuprobieren, sieh dir [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) an, das mehrere URLs gleichzeitig herunterladen kann und dabei den Fortschritt anzeigt. +Um dies selbst auszuprobieren, sieh dir [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) an, das mehrere URLs gleichzeitig herunterladen kann und dabei den Fortschritt anzeigt. @@ -294,7 +294,7 @@ with console.status("[bold green]Working on tasks...") as status: Dies erzeugt diese Ausgabe im Terminal. -![Status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![Status](https://github.com/textualize/rich/raw/master/imgs/status.gif) Die Spinner-Animationen wurden von [cli-spinners](https://www.npmjs.com/package/cli-spinners) geliehen. Du kannst einen Spinner auswählen, indem du den Parameter `spinner` angibst. Führe den folgenden Befehl aus, um die verfügbaren Werte zu sehen: @@ -304,7 +304,7 @@ python -m rich.spinner Der obige Befehl erzeugt die folgende Ausgabe im Terminal: -![Spinner](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![Spinner](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -321,9 +321,9 @@ python -m rich.tree Dies erzeugt diese Ausgabe: -![Markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![Markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Siehe das Beispiel [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) für ein Skript, das eine Baumansicht eines beliebigen Verzeichnisses anzeigt, ähnlich dem Linux-Befehl `tree`. +Siehe das Beispiel [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) für ein Skript, das eine Baumansicht eines beliebigen Verzeichnisses anzeigt, ähnlich dem Linux-Befehl `tree`. @@ -343,9 +343,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -Der folgende Screenshot ist die Ausgabe von [Spalten-Beispiel](https://github.com/willmcgugan/rich/blob/master/examples/columns.py), das Daten, die aus einer API kommen, in Spalten anzeigt: +Der folgende Screenshot ist die Ausgabe von [Spalten-Beispiel](https://github.com/textualize/rich/blob/master/examples/columns.py), das Daten, die aus einer API kommen, in Spalten anzeigt: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -368,7 +368,7 @@ console.print(markdown) Dies erzeugt diese Ausgabe: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -403,7 +403,7 @@ console.print(syntax) Dies erzeugt die folgende Ausgabe: -![Syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![Syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -414,7 +414,7 @@ Rich kann [schöne Tracebacks](https://rich.readthedocs.io/en/latest/traceback.h So sieht es unter OSX aus (ähnlich unter Linux): -![Traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![Traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -454,4 +454,4 @@ Hier sind ein paar Projekte, die Rich verwenden: Leichtgewichtige Python-Bibliothek zum Hinzufügen von 2D-Objektverfolgung in Echtzeit zu jedem Detektor. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint prüft Playbooks auf Praktiken und Verhalten, die möglicherweise verbessert werden könnten - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule-Testing-Framework -- +[Viele weitere](https://github.com/willmcgugan/rich/network/dependents)! +- +[Viele weitere](https://github.com/textualize/rich/network/dependents)! diff --git a/README.es.md b/README.es.md index ed432278e..ad27986c5 100644 --- a/README.es.md +++ b/README.es.md @@ -4,30 +4,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich es un paquete de Python para texto _enriquecido_ y un hermoso formato en la terminal. La [API Rich](https://rich.readthedocs.io/en/latest/) facilita la adición de color y estilo a la salida del terminal. Rich también puede representar tablas bonitas, barras de progreso, markdown, código fuente resaltado por sintaxis, trazas y más — listo para usar. -![Funciones](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Funciones](https://github.com/textualize/rich/raw/master/imgs/features.png) Para ver un vídeo de introducción a Rich, consulte [calmcode.io](https://calmcode.io/rich/introduction.html) de [@fishnets88](https://twitter.com/fishnets88). @@ -63,7 +63,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -74,7 +74,7 @@ Rich se puede instalar en Python REPL, por lo que cualquier estructura de datos >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Usando la consola @@ -102,7 +102,7 @@ console.print("Hello", "World!", style="bold red") La salida será similar a la siguiente: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Eso está bien para diseñar una línea de texto a la vez. Para un estilo más fino, Rich presenta un marcado especial que es similar en sintaxis a [bbcode](https://en.wikipedia.org/wiki/BBCode). He aquí un ejemplo: @@ -110,7 +110,7 @@ Eso está bien para diseñar una línea de texto a la vez. Para un estilo más f console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Usted puede usar el objeto Console para generar salida sofisticada con mínimo esfuerzo. Ver la [API Console](https://rich.readthedocs.io/en/latest/console.html) docs para detalles. @@ -124,7 +124,7 @@ Rich tiene ua función [inspeccionar](https://rich.readthedocs.io/en/latest/refe >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) Ver la [docs inspector](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) para detalles. @@ -164,7 +164,7 @@ test_log() Lo anterior produce el siguiente resultado: -![Registro](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Registro](https://github.com/textualize/rich/raw/master/imgs/log.png) Tenga en cuenta el argumento `log_locals`, que genera una tabla que contiene las variables locales donde se llamó al método log. @@ -176,7 +176,7 @@ El método de registro podría usarse para iniciar sesión en el terminal para a También puede usar la [Handler class](https://rich.readthedocs.io/en/latest/logging.html) incorporada para formatear y colorear la salida del módulo de registro de Python. Aquí hay un ejemplo de la salida: -![Registro](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Registro](https://github.com/textualize/rich/raw/master/imgs/logging.png)
@@ -197,9 +197,9 @@ Utilice esta función con prudencia. Rich puede renderizar [tablas](https://rich.readthedocs.io/en/latest/tables.html) flexibles con caracteres de cuadro Unicode. Existe una gran variedad de opciones de formato para bordes, estilos, alineación de celdas, etc. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -La animación anterior se generó con [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) en el directorio de ejemplos. +La animación anterior se generó con [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) en el directorio de ejemplos. Aquí hay un ejemplo de tabla más simple: @@ -235,13 +235,13 @@ console.print(table) Esto produce la siguiente salida: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) Tenga en cuenta que el marcado de la consola se representa de la misma manera que `print()` y `log()`. De hecho, cualquier cosa que Rich pueda representar se puede incluir en los encabezados / filas (incluso en otras tablas). La clase `Table` es lo suficientemente inteligente como para cambiar el tamaño de las columnas para que se ajusten al ancho disponible de la terminal, ajustando el texto según sea necesario. Este es el mismo ejemplo, con la terminal más pequeña que la tabla anterior: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png)
@@ -261,13 +261,13 @@ for step in track(range(100)): No es mucho más difícil agregar varias barras de progreso. Aquí hay un ejemplo tomado de la documentación: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) Las columnas pueden configurarse para mostrar los detalles que desee. Las columnas integradas incluyen porcentaje completado, tamaño de archivo, velocidad de archivo y tiempo restante. Aquí hay otro ejemplo que muestra una descarga en progreso: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Para probar esto usted mismo, consulte [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) que puede descargar varias URL simultáneamente mientras muestra el progreso. +Para probar esto usted mismo, consulte [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) que puede descargar varias URL simultáneamente mientras muestra el progreso. @@ -292,7 +292,7 @@ with console.status("[bold green]Working on tasks...") as status: Esto genera la siguiente salida en el terminal. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) Las animaciones de spinner fueron tomadas de [cli-spinners](https://www.npmjs.com/package/cli-spinners). Puede seleccionar un spinner especificando el `spinner` parameter. Ejecute el siguiente comando para ver los valores disponibles: @@ -302,7 +302,7 @@ python -m rich.spinner El comando anterior genera la siguiente salida en la terminal: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -319,9 +319,9 @@ python -m rich.tree Esto genera la siguiente salida: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Ver el ejemplo [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) para un script que muestra una vista de árbol de cualquier directorio, similar a el comando de linux `tree`. +Ver el ejemplo [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) para un script que muestra una vista de árbol de cualquier directorio, similar a el comando de linux `tree`. @@ -341,9 +341,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -La siguiente captura de pantalla es el resultado del [ejemplo de columnas](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) que muestra los datos extraídos de una API en columnas: +La siguiente captura de pantalla es el resultado del [ejemplo de columnas](https://github.com/textualize/rich/blob/master/examples/columns.py) que muestra los datos extraídos de una API en columnas: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -366,7 +366,7 @@ console.print(markdown) Esto producirá una salida similar a la siguiente: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -401,7 +401,7 @@ console.print(syntax) Esto producirá el siguiente resultado: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -412,7 +412,7 @@ Rich puede representar [tracebacks hermosos](https://rich.readthedocs.io/en/late Así es como se ve en OSX (similar en Linux): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -452,4 +452,4 @@ Aquí hay algunos proyectos que usan Rich: Libreria de Python para agregar tracking a cualquier detector. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint comprueba los playbooks en busca de prácticas y comportamientos que podrían mejorarse - [ansible-community/molecule](https://github.com/ansible-community/molecule) Marco de prueba de Ansible Molecule -- +¡[Muchos más](https://github.com/willmcgugan/rich/network/dependents)! +- +¡[Muchos más](https://github.com/textualize/rich/network/dependents)! diff --git a/README.fa.md b/README.fa.md index fbd706342..8fe740864 100644 --- a/README.fa.md +++ b/README.fa.md @@ -1,28 +1,28 @@ [![Supported Python Versions](https://img.shields.io/pypi/pyversions/rich/10.11.0)](https://pypi.org/project/rich/) [![PyPI version](https://badge.fury.io/py/rich.svg)](https://badge.fury.io/py/rich) [![Downloads](https://pepy.tech/badge/rich/month)](https://pepy.tech/project/rich) -[![codecov](https://img.shields.io/codecov/c/github/Textualize/rich?label=codecov&logo=codecov)](https://codecov.io/gh/willmcgugan/rich) +[![codecov](https://img.shields.io/codecov/c/github/Textualize/rich?label=codecov&logo=codecov)](https://codecov.io/gh/textualize/rich) [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) ریچ یک کتاب خانه پایتون برای متن های _باشکوه_ و قالب بندی زیبا در ترمینال است. @@ -37,7 +37,7 @@ و غیره را به صورت خودکار در ترمینال نمایش دهد. -![قابلیت ها](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![قابلیت ها](https://github.com/textualize/rich/raw/master/imgs/features.png) برای معرفی ویدئویی ریچ این ویدئو را ببینید [calmcode.io](https://calmcode.io/rich/introduction.html) توسط [@fishnets88](https://twitter.com/fishnets88). @@ -85,7 +85,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -98,7 +98,7 @@ print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## استفاده از Console @@ -148,7 +148,7 @@ console.print("Hello", "World!", style="bold red") خروجی چیزی شبیه به این است: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) تا اینجا برای سبک و استایل دادن به یک خط خوب است. برای سبکی با دانه بندی (Finely Grained Styling)، ریچ یک نشانه گذاری خاص ارائه می دهند که چیزی شبیه به [bbcode](https://en.wikipedia.org/wiki/BBCode) است. مثال آن به صورت زیر است: @@ -156,7 +156,7 @@ console.print("Hello", "World!", style="bold red") console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) شما می توانید از یک شیء Console برای تولید خروجی پیچیده، با کمترین تلاش استفاده کنید. برای جزئیات بیشتر به [Console API](https://rich.readthedocs.io/en/latest/console.html) مراجعه کنید. @@ -170,7 +170,7 @@ console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) برای جزئیات بیشتر به [inspect docs](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) مراجعه کنید. @@ -212,7 +212,7 @@ test_log() قطعه کد بالا، خروجی زیر را تولد می کند: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) به متغیر های `log_locals` توجه کنید، جایی که تابع log صدا زده می شود، یک جدول که شامل متغیر های محلی است در خروجی نمایش داده می شود. @@ -224,7 +224,7 @@ test_log() همچنین شما می توانید از [Handler class](https://rich.readthedocs.io/en/latest/logging.html) های داخلی برای فرمت دادن و رنگی کردن خروجی از ماژول گزارش پایتون (Python's logging module) استفاده کنید. کد زیر یک مثال از خروجی را نشان می دهد: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -247,9 +247,9 @@ test_log() ریچ توانایی آن را دارد که [جداول](https://rich.readthedocs.io/en/latest/tables.html) انعطاف پذیری را با کارکتر های یونیکد (unicode) بسازد. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -انیمشن بالا با استفاده از [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) در دایرکتوری (پوشه) تست ساخته شده است. +انیمشن بالا با استفاده از [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) در دایرکتوری (پوشه) تست ساخته شده است. این یک مثال ساده از جدول است: @@ -285,13 +285,13 @@ console.print(table) این کد خروجی زیر را تولید می کند: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) توجه داشته باشید که نشانه گذاری کنسول به همان روش `print()` و `log()` پردازش می شود. در واقع، هر چیزی که توسط Rich قابل رندر است در هدرها / ردیف ها (حتی جداول دیگر) ممکن است گنجانده شود. کلاس `Table` به اندازه کافی هوشمند است که اندازه ستون ها را متناسب با عرض موجود ترمینال تغییر دهد و متن را در صورت لزوم بسته بندی کند. این همان مثال با ترمینال کوچکتر از جدول بالاست: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -311,13 +311,13 @@ for step in track(range(100)): اضافه کردن چندین نوار پیشرفت خیلی سخت نیست. مثال آن که برگرفته از اسناد و داکیومنت میباشد به صورت زیر است: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) ستون ها ممکن است به گونه ای پیکربندی شوند که جزئیاتی را که می خواهید نشان دهند. ستون های از پیش تعیین شده شامل درصد کامل شده، اندازه فایل، سرعت فایل و زمان باقی مانده است. در زیر مثال دیگری وجود دارد که دانلود در حال انجام را نشان می دهد: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -برای اینکه خودتان این را امتحان کنید، فایل [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) را ببینید که می‌تواند چندین لینک URL را به طور همزمان بارگیری کند و پیشرفت را نشان دهد. +برای اینکه خودتان این را امتحان کنید، فایل [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) را ببینید که می‌تواند چندین لینک URL را به طور همزمان بارگیری کند و پیشرفت را نشان دهد. @@ -342,7 +342,7 @@ with console.status("[bold green]Working on tasks...") as status: این کد خروجی زیر را در ترمینال ایجاد می کند. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) در انیمیشن های چرخنده از [cli-spinners](https://www.npmjs.com/package/cli-spinners) استفاده شده است. شما می توانید با تعیین پارامتر `spinner` یک چرخنده را انتخاب کنید. برای مشاهده موارد موجود، دستور زیر را اجرا کنید: @@ -352,7 +352,7 @@ python -m rich.spinner دستور بالا خروجی زیر را در ترمینال ایجاد می کند: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -369,9 +369,9 @@ python -m rich.tree این کد خروجی زیر را ایجاد می کند: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -مثال [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) را برای اسکریپتی ببینید که نمایش درختی از هر دایرکتوری را نمایش می دهد، شبیه به فرمان `tree` در لینوکس است. +مثال [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) را برای اسکریپتی ببینید که نمایش درختی از هر دایرکتوری را نمایش می دهد، شبیه به فرمان `tree` در لینوکس است. @@ -392,9 +392,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -تصویر زیر خروجی [columns example](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) است که داده های استخراج شده از یک API را در ستون ها نمایش می دهد: +تصویر زیر خروجی [columns example](https://github.com/textualize/rich/blob/master/examples/columns.py) است که داده های استخراج شده از یک API را در ستون ها نمایش می دهد: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -418,7 +418,7 @@ console.print(markdown) خروجی کد بالا چیزی شبیه به تصویر زیر را تولید می کند: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -453,7 +453,7 @@ console.print(syntax) این کد خروجی زیر را ایجاد می کند: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -464,7 +464,7 @@ console.print(syntax) در مک او اس به صورت زیر نمایش داده می شود (در لینوکس نیز مشابه این است): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -491,4 +491,4 @@ console.print(syntax) برای دیدن چند نمونه از پروژه هایی که از ریچ استفاده می کنند، به [Rich Gallery](https://www.textualize.io/rich/gallery) در [Textualize.io](https://www.textualize.io) سر بزنید. -آیا می خواهید پروژه خودتان را به گالری اضافه کنید؟ شما می توانید! کافیست [از این دستورات](https://www.textualize.io/gallery-instructions) پیروی کنید. \ No newline at end of file +آیا می خواهید پروژه خودتان را به گالری اضافه کنید؟ شما می توانید! کافیست [از این دستورات](https://www.textualize.io/gallery-instructions) پیروی کنید. diff --git a/README.fr.md b/README.fr.md index 9e3bb5e62..80e712a1d 100644 --- a/README.fr.md +++ b/README.fr.md @@ -4,30 +4,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich est une bibliothèque Python pour le _rich_ texte et la mise en forme dans le terminal. L'[API Rich](https://rich.readthedocs.io/en/latest/) permet d'ajouter facilement de la couleur et du style sur la sortie du terminal. Rich peut également rendre de jolis tableaux, des barres de progression, du markdown, du code source avec de la coloration syntaxique, des traçeurs d'erreurs et bien d'autres choses encore, et ce dès le départ. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) Pour une introduction vidéo à Rich, voir [camelcode.io](https://calmcode.io/rich/introduction.html) par [@ fishnets88](https://twitter.com/fishnets88) @@ -63,7 +63,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -74,7 +74,7 @@ Rich peut être installé dans le REPL de Python, de sorte que toutes les struct >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Utilisation de Console @@ -102,7 +102,7 @@ console.print("Hello", "World!", style="bold red") La sortie sera quelque chose comme ce qui suit : -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) C'est très bien pour styliser une ligne de texte à la fois. Pour un style plus fin, Rich rend un balisage spécial dont la syntaxe est similaire à celle du [bbcode](https://en.wikipedia.org/wiki/BBCode). Voici un exemple : @@ -110,7 +110,7 @@ C'est très bien pour styliser une ligne de texte à la fois. Pour un style plus console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Vous pouvez utiliser un objet Console pour générer une sortie sophistiquée avec un effort minimal. Consultez la documentation de l'[API Console](https://rich.readthedocs.io/en/latest/console.html) pour plus de détails. @@ -124,7 +124,7 @@ Rich possède une fonction [inspect](https://rich.readthedocs.io/en/latest/refer >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) Consultez la [documentation d'inspect](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) pour plus de détails. @@ -163,7 +163,7 @@ test_log() L'opération ci-dessus produit le résultat suivant : -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Notez l'argument `log_locals`, qui produit un tableau contenant les variables locales où la méthode log a été appelée. @@ -175,7 +175,7 @@ La méthode log peut être utilisée pour la journalisation vers le terminal pou Vous pouvez également utiliser la classe intégrée [Handler](https://rich.readthedocs.io/en/latest/logging.html) pour formater et coloriser les sorties du module de journalisation de Python. Voici un exemple de sortie : -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png)
@@ -196,9 +196,9 @@ Veuillez utiliser cette fonction à bon escient. Rich peut rendre des [tableaux](https://rich.readthedocs.io/en/latest/tables.html) flexibles avec des caractères de boîte unicode. Il existe une grande variété d'options de formatage pour les bordures, les styles, l'alignement des cellules, etc. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -L'animation ci-dessus a été générée avec [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) dans le répertoire des exemples. +L'animation ci-dessus a été générée avec [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) dans le répertoire des exemples. Voici un exemple de tableau plus simple : @@ -234,13 +234,13 @@ console.print(table) Cela produit le résultat suivant : -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) Notez que les balises de la console sont rendues de la même manière que `print()` et `log()`. En fait, tout ce qui peut être rendu par Rich peut être inclus dans les en-têtes / lignes (même d'autres tables). La classe `Table` est suffisamment intelligente pour redimensionner les colonnes en fonction de la largeur disponible du terminal, en enveloppant le texte si nécessaire. Voici le même exemple, avec un terminal plus petit que le tableau ci-dessus : -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png)
@@ -259,13 +259,13 @@ for step in track(range(100)): Il n'est pas beaucoup plus difficile d'ajouter plusieurs barres de progression. Voici un exemple tiré de la documentation : -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) Les colonnes peuvent être configurées pour afficher tous les détails que vous souhaitez. Les colonnes intégrées comprennent le pourcentage d'achèvement, la taille du fichier, la vitesse du fichier et le temps restant. Voici un autre exemple montrant un téléchargement en cours : -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Pour l'essayer vous-même, voyez [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) qui peut télécharger plusieurs URL simultanément tout en affichant la progression. +Pour l'essayer vous-même, voyez [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) qui peut télécharger plusieurs URL simultanément tout en affichant la progression.
@@ -290,7 +290,7 @@ with console.status("[bold green]Working on tasks...") as status: Cela génère la sortie suivante dans le terminal. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) Les animations des toupies ont été empruntées à [cli-spinners](https://www.npmjs.com/package/cli-spinners). Vous pouvez sélectionner un spinner en spécifiant le paramètre `spinner`. Exécutez la commande suivante pour voir les valeurs disponibles : @@ -300,7 +300,7 @@ python -m rich.spinner La commande ci-dessus génère la sortie suivante dans le terminal : -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif)
@@ -316,9 +316,9 @@ python -m rich.tree La commande ci-dessus génère la sortie suivante dans le terminal : -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Voir l'exemple [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) pour un script qui affiche une vue arborescente de n'importe quel répertoire, similaire à la commande linux `tree`. +Voir l'exemple [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) pour un script qui affiche une vue arborescente de n'importe quel répertoire, similaire à la commande linux `tree`.
@@ -338,9 +338,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -La capture d'écran suivante est le résultat de [columns example](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) qui affiche les données extraites d'une API en colonnes : +La capture d'écran suivante est le résultat de [columns example](https://github.com/textualize/rich/blob/master/examples/columns.py) qui affiche les données extraites d'une API en colonnes : -![colonne](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![colonne](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -363,7 +363,7 @@ console.print(markdown) Cela produira un résultat semblable à ce qui suit : -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -398,7 +398,7 @@ console.print(syntax) Cela produira le résultat suivant : -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png)
@@ -408,7 +408,7 @@ Rich peut rendre des [traçages d'erreurs](https://rich.readthedocs.io/en/latest Voici à quoi cela ressemble sous OSX (similaire sous Linux) : -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png)
@@ -446,4 +446,4 @@ Les mainteneurs de Rich et de milliers d'autres paquets collaborent avec Tidelif Bibliothèque Python légère pour ajouter le suivi d'objets 2D en temps réel à n'importe quel détecteur. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint vérifie dans les playbooks les pratiques et comportements qui pourraient être améliorés. - [ansible-community/molecule](https://github.com/ansible-community/molecule) Cadre de test Ansible Molecule. -- [Beaucoup d'autres](https://github.com/willmcgugan/rich/network/dependents) ! +- [Beaucoup d'autres](https://github.com/textualize/rich/network/dependents) ! diff --git a/README.hi.md b/README.hi.md index 2f0e06de1..3de75bea5 100644 --- a/README.hi.md +++ b/README.hi.md @@ -4,31 +4,31 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich टर्मिनल में _समृद्ध_ पाठ और सुंदर स्वरूपण के लिए एक Python संग्रह है। [Rich API](https://rich.readthedocs.io/en/latest/) टर्मिनल उत्पादन में रंग और शैली डालना आसान बनाता है। Rich सुंदर सारणियाँ, प्रगति सूचक डंडे, markdown, रचनाक्रम चिन्हांकित स्त्रोत कोड, ट्रेसबैक आदि प्रस्तुत कर सकता है - बिना कुछ बदले। -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) Rich के वीडियो परिचय के लिए देखें [@fishnets88](https://twitter.com/fishnets88) द्वारा बनाई गई [calmcode.io](https://calmcode.io/rich/introduction.html)। @@ -64,7 +64,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -74,7 +74,7 @@ Rich को Python REPL में स्थापित किया जा स >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## कॉनसोल (Console) का इस्तेमाल करना @@ -100,7 +100,7 @@ console.print("Hello", "World!", style="bold red") ``` उत्पादन कुछ इस प्रकार का होगा: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) ये एक बारी में एक पंक्ति का शैलीकरण करने के लिए तो ठीक है। अधिक बारीकी से शैलीकरण करने के लिए, Rich एक विशेष मार्कअप को प्रदर्शित करता है जो रचनाक्रम में [bbcode](https://en.wikipedia.org/wiki/BBCode) से मिलता-जुलता है। इसका एक उदाहरण: @@ -109,7 +109,7 @@ console.print("Hello", "World!", style="bold red") console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) कम-से-कम मेहनत में परिष्कृत उत्पादन उत्पन्न करने के लिए आप एक Console वस्तु का उपयोग कर सकते हैं। अधिक जानकारी के लिए आप [Console API](https://rich.readthedocs.io/en/latest/console.html) का प्रलेख पढ़ सकते हैं। @@ -122,7 +122,7 @@ Rich में एक [inspect](https://rich.readthedocs.io/en/latest/reference/ >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) अधिक जानकारी के लिए [inspect का प्रलेखन](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) पढ़ें। @@ -163,7 +163,7 @@ test_log() उपर्युक्त कोड से निम्न उत्पादन उत्पन्न होता है: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) ध्यान दें `log_levels` तर्क की तरफ, जो एक सारणी उत्पादित करता है जिसमे लॉग फलन के आवाहन के स्थान के स्थानिये चर युक्त हैं। @@ -175,7 +175,7 @@ test_log() Python के `logging` मापांक से आए हुए उत्पादन का संरूपण एवं रंगीकरण करने के लिए आप अंतर्निहित [Handler वर्ग](https://rich.readthedocs.io/en/latest/logging.html) का भी इस्तेमाल कर सकते हैं। उत्पादन का एक उपहरण प्रस्तुत है: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -196,9 +196,9 @@ Console उत्पादन में इमोजी डालने के Rich यूनिकोड डिब्बा अक्षरों की सहायता से लचीली [सारणियाँ](https://rich.readthedocs.io/en/latest/tables.html) प्रदर्शित कर सकता है। सीमाएँ, शैलियाँ, कक्ष संरेखण आदि के लिए कई सारे स्वरूपण विकल्प उपलब्ध हैं। -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -उपर्युक्त अनुप्राणन examples डायरेक्टरी के [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) से बनाया गया है। +उपर्युक्त अनुप्राणन examples डायरेक्टरी के [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) से बनाया गया है। इससे सरल संचिका का उदाहरण: ```python @@ -233,13 +233,13 @@ console.print(table) इससे निम्नलिखित उत्पादन उत्पन्न होता है: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) ध्यान दें की कॉनसोल मार्कअप `print()` और `log()` की तरह ही प्रदर्शित होते हैं। वास्तव में, कोई भी वस्तु जो Rich के द्वारा प्रदर्शनीय है वह शीर्षकों / पंक्तियों (दूसरी संचिकाओं में भी) में युक्त किया जा सकता है। `Table` वर्ग इतनी बुद्धिमान है की वह टर्मिनल की उपलब्ध चौड़ाई में फ़साने के लिए स्तंभों का आकार बदल सकता है, आवश्यकता के अनुसार पाठ को लपेटते हुए। यह वही उदाहरण है, टर्मिनल को उपर्युक्त संचिका से छोटा रखते हुए: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -257,12 +257,12 @@ for step in track(range(100)): ``` अनेक प्रगति सूचक डंडे जोड़ने इससे अधिक कठिन नहीं है। ये रहा एक उदाहरण जो प्रलेखन से उठाया गया है: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) स्तंभों का विन्यास इस प्रकार किया जा सकता है की आपकी इच्छानुसार विवरण दिखाए जाएँ। अंतर्निहित स्तंभ में प्रतिशत पूरा, संचिका आकार, संचिका गति तथा शेष समय युक्त होते हैं। ये रहा एक और उदाहरण एक चालू डाउनलोड को दर्शाते हुए। -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -इसे स्वयं आजमाने के लिए, देखें [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) जो अनेक URL एक साथ डाउनलोड करते हुए प्रगति दर्शाता है। +इसे स्वयं आजमाने के लिए, देखें [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) जो अनेक URL एक साथ डाउनलोड करते हुए प्रगति दर्शाता है।
@@ -284,7 +284,7 @@ with console.status("[bold green]Working on tasks...") as status: ``` इससे टर्मिनल में निम्नलिखित उत्पादन उत्पन्न होता है: -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) स्पिनर अनुप्राणन [cli-spinners](https://www.npmjs.com/package/cli-spinners) से उधारे गए थे। आप `spinner` प्राचल को उल्लिखित करके स्पिनर चुन सकते हैं। उपलब्ध विकल्प देखने के लिए निम्नलिखित आदेश चलकर देखें: ``` @@ -292,7 +292,7 @@ python -m rich.spinner ``` उपर्युक्त आदेश टर्मिनल में निम्नलिखित उत्पादन उतपन्न करता है: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif)
@@ -308,9 +308,9 @@ python -m rich.tree इससे निम्न उत्पादन उत्पन्न होता है: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -देखें उदाहरण [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) एक क्रमादेश के लिए जो किसी भी डायरेक्टरी का वृक्ष दृश्य (ट्री व्यू) दर्शाएगा, लिनक्स के `tree` आदेश के समान। +देखें उदाहरण [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) एक क्रमादेश के लिए जो किसी भी डायरेक्टरी का वृक्ष दृश्य (ट्री व्यू) दर्शाएगा, लिनक्स के `tree` आदेश के समान। @@ -331,8 +331,8 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -निम्न स्क्रीनशॉट [स्तंभों के उदाहरण](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) का उत्पादन है जो एक API से खींचे गए डेटा को स्तंभों में प्रदर्शित करता है: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +निम्न स्क्रीनशॉट [स्तंभों के उदाहरण](https://github.com/textualize/rich/blob/master/examples/columns.py) का उत्पादन है जो एक API से खींचे गए डेटा को स्तंभों में प्रदर्शित करता है: +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -355,7 +355,7 @@ console.print(markdown) इससे कुछ इस प्रकार का उत्पादन उत्पन्न होगा: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -390,7 +390,7 @@ console.print(syntax) This will produce the following output: इससे निम्न उत्पादन उत्पन्न होता है: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -400,7 +400,7 @@ This will produce the following output: Rich [खूबसूरत ट्रेसबैक](https://rich.readthedocs.io/en/latest/traceback.html) दर्शा सकता है जो पढ़ने में आसान तथा मानक Python ट्रेसबैकों से अधिक कोड दिखाता है। आप Rich को व्यक्तीक्रम ट्रेसबैक संचालक भी निर्धारित कार सकते हैं ताकि सभी बेपकड़ अपवाद Rich के द्वारा प्रदर्शित हों। OSX (Linux पर समान) पर यह कुछ इस प्रकार दिखता है: -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -441,6 +441,6 @@ Rich एवं सहस्त्रों और संग्रहों क Ansible-lint उन आचरणों और व्यवहारों के लिए प्लेबुकों में जाँच करता है जिन्हे संभावित रूप से सुधारा जा सकता है - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule testing framework Ansible Molecule परीक्षण ढांचा -- +[कई और](https://github.com/willmcgugan/rich/network/dependents)! +- +[कई और](https://github.com/textualize/rich/network/dependents)! diff --git a/README.id.md b/README.id.md index a0841e8d4..50988212f 100644 --- a/README.id.md +++ b/README.id.md @@ -1,35 +1,35 @@ [![Supported Python Versions](https://img.shields.io/pypi/pyversions/rich/10.11.0)](https://pypi.org/project/rich/) [![PyPI version](https://badge.fury.io/py/rich.svg)](https://badge.fury.io/py/rich) [![Downloads](https://pepy.tech/badge/rich/month)](https://pepy.tech/project/rich) -[![codecov](https://img.shields.io/codecov/c/github/Textualize/rich?label=codecov&logo=codecov)](https://codecov.io/gh/willmcgugan/rich) +[![codecov](https://img.shields.io/codecov/c/github/Textualize/rich?label=codecov&logo=codecov)](https://codecov.io/gh/textualize/rich) [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [Indonesian readme](https://github.com/willmcgugan/rich/blob/master/README.id.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [Indonesian readme](https://github.com/textualize/rich/blob/master/README.id.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich adalah library Python yang membantu _memperindah_ tampilan output suatu program di terminal. [Rich API](https://rich.readthedocs.io/en/latest/) dapat digunakan untuk mempermudah dalam penambahan gaya dan pewarnaan output di terminal. Rich juga mendukung fitur lain seperti pembuatan tabel, bar progress, penulisan markdown, penghighitan syntax source code, tracebacks, dan masih banyak lagi. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) Sebagai pengenalan Rich saksikan video berikut [calmcode.io](https://calmcode.io/rich/introduction.html) oleh [@fishnets88](https://twitter.com/fishnets88). @@ -65,7 +65,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -76,7 +76,7 @@ Rich dapat diinstal ke dalam Python REPL sehingga setiap struktur data akan dita >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Penggunaan Console @@ -104,7 +104,7 @@ console.print("Hello", "World!", style="bold red") Output dari perintah tersebut akan tampak sebagai berikut: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Melakukan perubahan tampilan teks output dalam satu waktu mungkin sudah baik. Tetapi untuk membuat tampilan lebih rapi, Rich mendukung fitur rendering menggunakan pemformatan spesial dimana syntaxnya serupa dengan [bbcode](https://en.wikipedia.org/wiki/BBCode). Berikut adalah contoh penerapannya: @@ -112,7 +112,7 @@ Melakukan perubahan tampilan teks output dalam satu waktu mungkin sudah baik. Te console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Anda dapat menggunakan console object untuk menciptakan keluaran yang indah dengan usaha yang sedikit. Kunjungi [Console API](https://rich.readthedocs.io/en/latest/console.html) untuk informasi lebih lengkap. @@ -126,7 +126,7 @@ Rich memiliki fungsi [inspect](https://rich.readthedocs.io/en/latest/reference/i >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) Kunjungi [dokumentasi inspect](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) untuk detail lebih lanjut. @@ -166,7 +166,7 @@ test_log() Perintah di atas akan menampilkan output sebagai berikut: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Sebagai catatan, argumen `log_locals` berupa tabel yang berisikan variabel lokal yang menunjukkan lokasi dimana log tersebut dipanggil. @@ -178,7 +178,7 @@ Method log ini dapat digunakan untuk mencatat aktivitas terminal yang berjalan l Anda dapat juga menggunakan builtin [Handler class](https://rich.readthedocs.io/en/latest/logging.html) untuk memformat dan mewarnai output dari module logging Python. Berikut adalah contoh penerapannya: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -201,9 +201,9 @@ Mohon gunakan fitur ini dengan bijak. Rich mendukung perenderan [tabel](https://rich.readthedocs.io/en/latest/tables.html) secara fleksibel dengan karakter unicode. Terdapat variasi sangat besar untuk opsi pemformatan seperti pengaturan border, gaya tabel, perataan teks di dalam cell, dan lain sebagainya. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -Animasi di atas dibuat dengan program [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) pada direktori examples. +Animasi di atas dibuat dengan program [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) pada direktori examples. Berikut adalah contoh tabel sederhana: @@ -239,13 +239,13 @@ console.print(table) Program di atas akan menghasilkan output sebagai berikut: -![tabel](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![tabel](https://github.com/textualize/rich/raw/master/imgs/table.png) Sebagai catatan console markup dirender sama seperti `print()` dan `log()`. Faktanya, untuk segala bentuk hal yang dapat dirender menggunakan Rich dapat disisipkan ke dalam header / baris (bahkan tabel lain). Class `Table` memiliki kemampuan yang baik untuk mengatur ukuran kolom supaya sesuai dengan lebar yang disediakan oleh terminal. Berikut adalah contoh penerapannya, dengan terminal memiliki ukuran yang lebih kecil dibandingkan tabel di atas: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -265,13 +265,13 @@ for step in track(range(100)): Tidaklah sulit untuk menambahkan beberapa bar progress sekaligus. Berikut adalah contoh implementasi yang diambil dari file dokumentasi: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) Bagian kolom dapat dikonfigurasikan sesuai dengan kebutuhan. Built-in kolom juga memiliki fitur presentasi seleasi, ukuran file, kecepatan file, dan waktu sisa. Berikut adalah contoh menampilkan bar progress ketika mengunduh suatu file: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Untuk bereksperimen, periksa [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) yang dapat menampilkan beberapa progress bar pengunduhan dari beberapa alamat URL sekaligus. +Untuk bereksperimen, periksa [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) yang dapat menampilkan beberapa progress bar pengunduhan dari beberapa alamat URL sekaligus. @@ -296,7 +296,7 @@ with console.status("[bold green]Working on tasks...") as status: Program di atas akan menghasilkan output sebagai berikut. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) Animasi spinner tersebut diambil dari [cli-spinners](https://www.npmjs.com/package/cli-spinners). Anda dapat menentukan spinner yang hendak digunakan dengan menspesifikannya di parameter `spinner`. Jalankan perintah berikut untuk melihat parameter yang tersedia: @@ -306,7 +306,7 @@ python -m rich.spinner Perintah di atas akan menghasilkan output sebagai berikut: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -323,9 +323,9 @@ python -m rich.tree Program di atas akan menghasilkan output sebagai berikut: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Periksa contoh program [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) untuk menampilkan tampilan tree view dari direktori apapun, perintah ini serupa dengan `tree` pada linux. +Periksa contoh program [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) untuk menampilkan tampilan tree view dari direktori apapun, perintah ini serupa dengan `tree` pada linux. @@ -345,9 +345,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -Screenshot berikut merupakan output dari [contoh kolom](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) yang menampilkan data yang diambil melalui API ke dalam bentuk kolom: +Screenshot berikut merupakan output dari [contoh kolom](https://github.com/textualize/rich/blob/master/examples/columns.py) yang menampilkan data yang diambil melalui API ke dalam bentuk kolom: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -370,7 +370,7 @@ console.print(markdown) Program di atas akan menghasilkan output seperti berikut: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -405,7 +405,7 @@ console.print(syntax) Program di atas akan menghasilkan output sebagai berikut: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -416,7 +416,7 @@ Rich dapat merender [tracebacks dengan indah](https://rich.readthedocs.io/en/lat Berikut adalah tampilannya pada OSX (serupa dengan Linux): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -459,6 +459,6 @@ Berikut adalah beberpa projek yang menggunakan Rich: Library Python ringan untuk menambahkan deteksi objek secara real-time pada objek 2D pada suatu detektor. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Sebuah ansible-lint untuk memeriksa playbooks yang digunakan sebagai practices and behaviour yang secara potensial dapat ditingkatkan. - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule untuk framework testing -- +[Lebih banyak lagi](https://github.com/willmcgugan/rich/network/dependents)! +- +[Lebih banyak lagi](https://github.com/textualize/rich/network/dependents)! diff --git a/README.it.md b/README.it.md index 39a32ac1d..1462f129c 100644 --- a/README.it.md +++ b/README.it.md @@ -3,31 +3,31 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich è una libreria Python per un testo _rich_ e con una piacevole formattazione nel terminale. Le [Rich API](https://rich.readthedocs.io/en/latest/) permettono di aggiungere facilmente colore e stile all'output del terminale. Rich permette di visualizzare tabelle, barre di avanzamento, markdown, evidenziazione della sintassi, tracebacks, e molto altro ancora — tutto già pronto all'uso. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) Per una video-introduzione di Rich puoi vedere [calmcode.io](https://calmcode.io/rich/introduction.html) by [@fishnets88](https://twitter.com/fishnets88). @@ -63,7 +63,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -74,7 +74,7 @@ Rich può essere installo in Python REPL, in questo modo ogni struttura dati sar >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Utilizzo di Console @@ -102,7 +102,7 @@ console.print("Hello", "World!", style="bold red") L'output sarà qualcosa tipo: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Questo va bene per applicare uno stile ad una linea di testo alla volta. Per uno stile più ricercato, puoi utilizzare uno speciale linguaggio di markup che è simile nella sintassi a [bbcode](https://en.wikipedia.org/wiki/BBCode). Ad esempio: @@ -110,7 +110,7 @@ Questo va bene per applicare uno stile ad una linea di testo alla volta. Per uno console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Puoi utilizzare l'oggetto Console per generare output sofisticati con il minimo sforzo. Vedi la docs di [Console API](https://rich.readthedocs.io/en/latest/console.html) per ulteriori dettagli. @@ -124,7 +124,7 @@ Rich ha una funzione [inspect](https://rich.readthedocs.io/en/latest/reference/i >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) Vedi [inspect docs](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) per ulteriori dettagli. @@ -164,7 +164,7 @@ test_log() Il codice appena mostrato produce il seguente output: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Nota l'argomento `log_locals`, che visualizza una tabella contenente le variabili locali dove il metodo log è stato chiamato. @@ -176,7 +176,7 @@ Il metodo log può essere usato per il logging su terminale di applicazioni che Puoi anche utilizzare la classe builtin [Handler](https://rich.readthedocs.io/en/latest/logging.html) per formattare e colorare l'output dal modulo logging di Python. Ecco un esempio dell'output: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -199,9 +199,9 @@ Usa questa feature saggiamente. Rich può visualizzare [tabelle](https://rich.readthedocs.io/en/latest/tables.html) flessibili con caratteri unicode. C'è una vasta gamma di opzioni per la formattazione di bordi, stili, allineamenti di celle etc. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -Questa animazione è stata realizzata con [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) presente nella directory examples. +Questa animazione è stata realizzata con [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) presente nella directory examples. Ecco qui un semplice esempio di tabella: @@ -237,13 +237,13 @@ console.print(table) Questo produce il seguente output: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) Nota che il console markup è visualizzato nello stesso modo di `print()` e `log()`. Infatti, tutto ciò che è visualizzabile da Rich può essere incluso nelle intestazioni / righe (anche altre tabelle). La classe `Table` è abbastanza smart da ridimensionare le colonne per entrare nello spazio residuo del terminale, wrappando il testo come richiesto. Ad esempio, con il terminale reso più piccolo della tabella sopra: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -263,13 +263,13 @@ for step in track(range(100)): Non è difficile aggiungere barre di avanzamento multiple. Ecco un esempio dalla documentazione: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) Le colonne possono essere configurate per visualizzare qualsiasi dettaglio tu voglia. Le colonne built-in includono percentuale di completamente, dimensione del file, velocità, e tempo rimasto. Ecco un altro esempio che mostra un download in corso: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Per testare tu stesso, vedi [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) che può scaricare multipli URL simultaneamente mentre mostra lo stato di avanzamento. +Per testare tu stesso, vedi [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) che può scaricare multipli URL simultaneamente mentre mostra lo stato di avanzamento. @@ -294,7 +294,7 @@ with console.status("[bold green]Working on tasks...") as status: Questo produrrà il seguente output nel terminale. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) L'animazione dello spinner è ispirata da [cli-spinners](https://www.npmjs.com/package/cli-spinners). Puoi selezionarne uno specificando `spinner` tra i parametri. Esegui il seguente comando per visualizzare le possibili opzioni: @@ -304,7 +304,7 @@ python -m rich.spinner Questo produrrà il seguente output nel terminale. -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -321,9 +321,9 @@ python -m rich.tree Questo produrrà il seguente output: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Vedi l'esempio [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) per uno script che mostra una vista ad albero di ogni directory, simile a quella del comando linux `tree`. +Vedi l'esempio [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) per uno script che mostra una vista ad albero di ogni directory, simile a quella del comando linux `tree`. @@ -343,9 +343,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -Il seguente screenshot è l'output dell'[esempio di columns](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) che visualizza i dati ottenuti da un API in colonna: +Il seguente screenshot è l'output dell'[esempio di columns](https://github.com/textualize/rich/blob/master/examples/columns.py) che visualizza i dati ottenuti da un API in colonna: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -368,7 +368,7 @@ console.print(markdown) Questo produrrà un output simile al seguente: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -403,7 +403,7 @@ console.print(syntax) Questo produrrà il seguente output: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -414,7 +414,7 @@ Rich può visualizzare [gradevoli tracebacks](https://rich.readthedocs.io/en/lat Ecco come appare su OSX (simile a Linux): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -454,6 +454,6 @@ Ecco alcuni progetti che utilizzano Rich: Lightweight Python library for adding real-time 2D object tracking to any detector. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint checks playbooks for practices and behaviour that could potentially be improved - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule testing framework -- +[Many more](https://github.com/willmcgugan/rich/network/dependents)! +- +[Many more](https://github.com/textualize/rich/network/dependents)! diff --git a/README.ja.md b/README.ja.md index 9dd4e246d..a2af9ef45 100644 --- a/README.ja.md +++ b/README.ja.md @@ -4,30 +4,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Richは、 _リッチ_ なテキストや美しい書式設定をターミナルで行うためのPythonライブラリです。 [Rich API](https://rich.readthedocs.io/en/latest/)を使用すると、ターミナルの出力に色やスタイルを簡単に追加することができます。 Richはきれいなテーブル、プログレスバー、マークダウン、シンタックスハイライトされたソースコード、トレースバックなどをすぐに生成・表示することもできます。 -![機能](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![機能](https://github.com/textualize/rich/raw/master/imgs/features.png) Richの紹介動画はこちらをご覧ください。 [calmcode.io](https://calmcode.io/rich/introduction.html) by [@fishnets88](https://twitter.com/fishnets88). @@ -63,7 +63,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -74,7 +74,7 @@ RichはPythonのREPLでインストールすることができ、データ構造 >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Rich Inspect @@ -113,7 +113,7 @@ console.print("Hello", "World!", style="bold red") 以下のように出力されます: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) この方法は一行のテキストを一度にスタイリングするのに適しています。 より細かくスタイリングを行うために、Richは[bbcode](https://en.wikipedia.org/wiki/BBCode)に似た構文の特別なマークアップを表示することができます。 @@ -123,7 +123,7 @@ console.print("Hello", "World!", style="bold red") console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) ### Console logging @@ -154,7 +154,7 @@ test_log() 上の例では以下のような出力が得られます: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) `log_locals`という引数についてですが、これは、logメソッドが呼び出されたローカル変数を含むテーブルを出力します。 @@ -164,7 +164,7 @@ logメソッドはサーバのような長時間稼働しているアプリケ また、内蔵されている[Handler class](https://rich.readthedocs.io/en/latest/logging.html)を用いて、Pythonのloggingモジュールからの出力をフォーマットしたり、色付けしたりすることもできます。以下に出力の例を示します。 -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) ## 絵文字(Emoji) @@ -181,9 +181,9 @@ logメソッドはサーバのような長時間稼働しているアプリケ Richはユニコードの枠を用いて柔軟に[テーブル](https://rich.readthedocs.io/en/latest/tables.html)を表示することができます。 罫線、スタイル、セルの配置などの書式設定のためのオプションが豊富にあります。 -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -上のアニメーションは、examplesディレクトリの[table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py)で生成したものです。 +上のアニメーションは、examplesディレクトリの[table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py)で生成したものです。 もう少し簡単な表の例を示します: @@ -219,14 +219,14 @@ console.print(table) これにより、以下のような出力が得られます: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) コンソール上でのマークアップは`print()` や `log()` と同じように表示されることに注意してください。実際には、Rich が表示可能なものはすべてヘッダや行に含めることができます (それが他のテーブルであっても、です)。 `Table`クラスは、ターミナルの利用可能な幅に合わせてカラムのサイズを変更したり、必要に応じてテキストを折り返したりするのに十分なスマートさを持っています。 これは先ほどと同じ例で、ターミナルを上のテーブルよりも小さくしたものです。 -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) ## プログレスバー @@ -243,13 +243,13 @@ for step in track(range(100)): 複数のプログレスバーを追加するのはそれほど大変ではありません。以下はドキュメントから抜粋した例です: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) カラムには任意の詳細を表示するように設定することができます。組み込まれているカラムには、完了率、ファイルサイズ、ファイル速度、残り時間が含まれています。ここでは、進行中のダウンロードを表示する別の例を示します: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -こちらを自分で試して見るには、進捗状況を表示しながら複数のURLを同時にダウンロードできる [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) を参照してみてください。 +こちらを自分で試して見るには、進捗状況を表示しながら複数のURLを同時にダウンロードできる [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) を参照してみてください。 ## ステータス @@ -271,7 +271,7 @@ with console.status("[bold green]Working on tasks...") as status: これにより、ターミナルには以下のような出力が生成されます。 -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) スピナーのアニメーションは [cli-spinners](https://www.npmjs.com/package/cli-spinners) から拝借しました。`spinner`パラメータを指定することでスピナーを選択することができます。以下のコマンドを実行して、利用可能な値を確認してください: @@ -281,7 +281,7 @@ python -m rich.spinner 上記コマンドは、ターミナルで以下のような出力を生成します: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) ## ツリー @@ -295,9 +295,9 @@ python -m rich.tree これにより、次のような出力が生成されます: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -linuxの `tree` コマンドと同様に、任意のディレクトリのツリー表示を行うスクリプトについては、[tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py)の例を参照してください。 +linuxの `tree` コマンドと同様に、任意のディレクトリのツリー表示を行うスクリプトについては、[tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py)の例を参照してください。 ## カラム @@ -314,9 +314,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -以下のスクリーンショットは、APIから引っ張ってきたデータをカラムで表示する[columns example](https://github.com/willmcgugan/rich/blob/master/examples/columns.py)による出力です: +以下のスクリーンショットは、APIから引っ張ってきたデータをカラムで表示する[columns example](https://github.com/textualize/rich/blob/master/examples/columns.py)による出力です: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) ## マークダウン @@ -336,7 +336,7 @@ console.print(markdown) これにより、以下のような出力が得られます: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) ## シンタックスハイライト @@ -368,7 +368,7 @@ console.print(syntax) これにより、以下のような出力が得られます: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) ## トレースバック @@ -376,7 +376,7 @@ Rich は [美しいトレースバック](https://rich.readthedocs.io/en/latest/ OSXではこのような表示となります(Linuxでも似たような表示になります): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) ## Richを使用したプロジェクト @@ -408,4 +408,4 @@ OSXではこのような表示となります(Linuxでも似たような表示 Ansible-lint がplaybooksをチェックして、改善できる可能性のあるプラクティスや動作を確認します。 - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Moleculeのテストフレームワーク -- +[Many more](https://github.com/willmcgugan/rich/network/dependents)! +- +[Many more](https://github.com/textualize/rich/network/dependents)! diff --git a/README.kr.md b/README.kr.md index 26a11d912..a527ad560 100644 --- a/README.kr.md +++ b/README.kr.md @@ -4,30 +4,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich는 터미널에서 _풍부한(rich)_ 텍스트와 아름다운 서식을 지원하기 위한 파이썬 라이브러리입니다. [Rich API](https://rich.readthedocs.io/en/latest/)는 터미널 출력에 색깔과 스타일을 입히기 쉽게 도와줍니다. 또한 Rich는 별다른 설정 없이 표, 진행 바, 마크다운, 소스코드 구문 강조, tracebacks 등을 예쁘게 보여줄 수 있습니다. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) Rich에 대한 동영상 설명을 보시려면 [@fishnets88](https://twitter.com/fishnets88)의 [calmcode.io](https://calmcode.io/rich/introduction.html)를 확인 바랍니다. @@ -64,7 +64,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -75,7 +75,7 @@ Rich는 파이썬 REPL에도 설치할 수 있습니다. 어떤 데이터 구조 >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## 콘솔 사용하기 @@ -103,7 +103,7 @@ console.print("Hello", "World!", style="bold red") 다음과 같이 출력됩니다: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) 텍스트 한 줄을 한 번에 수정하는 것도 좋습니다. 더욱 세세하게 스타일을 변경하기 위해, Rich는 [bbcode](https://en.wikipedia.org/wiki/BBCode)와 구문이 비슷한 별도의 마크업을 렌더링 할 수 있습니다. 예제는 다음과 같습니다. @@ -111,7 +111,7 @@ console.print("Hello", "World!", style="bold red") console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Console 객체를 활용해 적은 노력으로 복잡한 출력을 손쉽게 만들 수 있습니다. 자세한 내용은 [Console API](https://rich.readthedocs.io/en/latest/console.html) 문서를 확인해주세요. @@ -125,7 +125,7 @@ Rich는 class나 instance, builtin 같은 파이썬 객체의 레포트를 생 >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) 자세한 내용은 [inspect docs](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) 문서를 확인해주세요. @@ -165,7 +165,7 @@ test_log() 위 코드의 실행 결과는 다음과 같습니다: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) `log_locals` 인자를 사용하면 log 메서드가 호출된 곳의 로컬 변수들을 표로 보여준다는 것도 알아두세요. @@ -177,7 +177,7 @@ test_log() 또한 내장된 [Handler class](https://rich.readthedocs.io/en/latest/logging.html)를 사용해 파이썬의 로깅 모듈의 출력을 형태를 꾸미거나 색을 입힐 수 있습니다. 다음은 예제입니다: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -200,9 +200,9 @@ test_log() Rich는 유니코드 박스 문자와 함께 [표](https://rich.readthedocs.io/en/latest/tables.html)를 자유롭게 렌더링할 수 있습니다. 가장자리, 스타일, 셀 정렬 등을 정말 다양하게 구성할 수 있습니다. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -위의 애니메이션은 example 디렉토리의 [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py)로 생성되었습니다. +위의 애니메이션은 example 디렉토리의 [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py)로 생성되었습니다. 더 간단한 표 예제입니다: @@ -238,13 +238,13 @@ console.print(table) 이는 다음과 같이 출력됩니다: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) 콘솔 출력은 `print()`나 `log()`와 같은 방식으로 렌더링 된다는 것을 주의하세요. 사실, Rich로 표현할 수 있는 것은 무엇이든 headers / rows (심지어 다른 표들도)에 포함할 수 있습니다. `Table` 클래스는 터미널의 폭에 맞춰 필요한 만큼 줄을 내리고 열 길이를 스스로 조절합니다. 위의 표보다 작은 터미널에서 만들어진 표 예시입니다: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -264,13 +264,13 @@ for step in track(range(100)): 여러개의 진행 바를 추가하는 것도 어렵지 않습니다. 아래는 공식문서에서 따온 예시입니다: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) 칼럼들은 수정해 원하는 세부정보를 보여줄 수도 있습니다. 기본으로 내장된 칼럼들은 완료 퍼센티지, 파일 크기, 파일 속도, 남은 시간입니다. 다운로드 진행을 보여주는 다른 예제입니다: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -직접 해보시려면, 진행 바와 함께 여러개의 URL들을 동시에 다운로드 받는 예제인 [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py)를 확인해주세요. +직접 해보시려면, 진행 바와 함께 여러개의 URL들을 동시에 다운로드 받는 예제인 [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py)를 확인해주세요. @@ -295,7 +295,7 @@ with console.status("[bold green]Working on tasks...") as status: 이 예제는 터미널에 아래와 같이 출력합니다. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) 스피너 애니메이션은 [cli-spinners](https://www.npmjs.com/package/cli-spinners)에서 빌려왔습니다. `spinner` 파라미터를 선택해서 특정 스피너를 선택할 수도 있습니다. 어떤 값을 선택할 수 있는지는 아래 명령어를 통해 확인할 수 있습니다: @@ -305,7 +305,7 @@ python -m rich.spinner 위의 명령어를 입력하면 아래와 같은 출력됩니다: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -322,9 +322,9 @@ python -m rich.tree 이는 아래와 같이 출력됩니다: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -리눅스의 `tree` 명령어처럼 아무 디렉토리의 트리를 보여주는 스크립트 예제를 보시려면 [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py)를 확인해주세요. +리눅스의 `tree` 명령어처럼 아무 디렉토리의 트리를 보여주는 스크립트 예제를 보시려면 [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py)를 확인해주세요. @@ -344,9 +344,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -아래 스크린샷은 API에서 뽑은 데이터를 종렬로 표현하는 [칼럼 예제](https://github.com/willmcgugan/rich/blob/master/examples/columns.py)의 출력 결과입니다: +아래 스크린샷은 API에서 뽑은 데이터를 종렬로 표현하는 [칼럼 예제](https://github.com/textualize/rich/blob/master/examples/columns.py)의 출력 결과입니다: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -369,7 +369,7 @@ console.print(markdown) 위 코드는 아래와 같은 출력 결과를 만들 것입니다: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -404,7 +404,7 @@ console.print(syntax) 위 코드는 아래와 같은 출력 결과를 만들 것입니다: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -415,7 +415,7 @@ Rich는 [예쁜 tracebacks](https://rich.readthedocs.io/en/latest/traceback.html OSX에서는 이렇게 출력됩니다 (리눅스도 유사함): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -457,6 +457,6 @@ Rich를 사용하는 몇가지 프로젝트들입니다: Ansible-lint가 playbooks를 확인해 잠재적으로 개선될 수 있는 practices나 동작을 확인합니다. - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule의 테스트 프레임워크 -- +[Many more](https://github.com/willmcgugan/rich/network/dependents)! +- +[Many more](https://github.com/textualize/rich/network/dependents)! diff --git a/README.md b/README.md index 34630ced2..3857e15a7 100644 --- a/README.md +++ b/README.md @@ -5,32 +5,32 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [Indonesian readme](https://github.com/willmcgugan/rich/blob/master/README.id.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [Indonesian readme](https://github.com/textualize/rich/blob/master/README.id.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich is a Python library for _rich_ text and beautiful formatting in the terminal. The [Rich API](https://rich.readthedocs.io/en/latest/) makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) For a video introduction to Rich see [calmcode.io](https://calmcode.io/rich/introduction.html) by [@fishnets88](https://twitter.com/fishnets88). @@ -66,7 +66,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -77,7 +77,7 @@ Rich can be installed in the Python REPL, so that any data structures will be pr >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Using the Console @@ -105,7 +105,7 @@ console.print("Hello", "World!", style="bold red") The output will be something like the following: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) That's fine for styling a line of text at a time. For more finely grained styling, Rich renders a special markup which is similar in syntax to [bbcode](https://en.wikipedia.org/wiki/BBCode). Here's an example: @@ -113,7 +113,7 @@ That's fine for styling a line of text at a time. For more finely grained stylin console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) You can use a Console object to generate sophisticated output with minimal effort. See the [Console API](https://rich.readthedocs.io/en/latest/console.html) docs for details. @@ -127,7 +127,7 @@ Rich has an [inspect](https://rich.readthedocs.io/en/latest/reference/init.html? >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) See the [inspect docs](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) for details. @@ -167,7 +167,7 @@ test_log() The above produces the following output: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Note the `log_locals` argument, which outputs a table containing the local variables where the log method was called. @@ -179,7 +179,7 @@ The log method could be used for logging to the terminal for long running applic You can also use the builtin [Handler class](https://rich.readthedocs.io/en/latest/logging.html) to format and colorize output from Python's logging module. Here's an example of the output: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -202,9 +202,9 @@ Please use this feature wisely. Rich can render flexible [tables](https://rich.readthedocs.io/en/latest/tables.html) with unicode box characters. There is a large variety of formatting options for borders, styles, cell alignment etc. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -The animation above was generated with [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) in the examples directory. +The animation above was generated with [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) in the examples directory. Here's a simpler table example: @@ -240,13 +240,13 @@ console.print(table) This produces the following output: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) Note that console markup is rendered in the same way as `print()` and `log()`. In fact, anything that is renderable by Rich may be included in the headers / rows (even other tables). The `Table` class is smart enough to resize columns to fit the available width of the terminal, wrapping text as required. Here's the same example, with the terminal made smaller than the table above: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -266,13 +266,13 @@ for step in track(range(100)): It's not much harder to add multiple progress bars. Here's an example taken from the docs: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) The columns may be configured to show any details you want. Built-in columns include percentage complete, file size, file speed, and time remaining. Here's another example showing a download in progress: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -To try this out yourself, see [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) which can download multiple URLs simultaneously while displaying progress. +To try this out yourself, see [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) which can download multiple URLs simultaneously while displaying progress. @@ -297,7 +297,7 @@ with console.status("[bold green]Working on tasks...") as status: This generates the following output in the terminal. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) The spinner animations were borrowed from [cli-spinners](https://www.npmjs.com/package/cli-spinners). You can select a spinner by specifying the `spinner` parameter. Run the following command to see the available values: @@ -307,7 +307,7 @@ python -m rich.spinner The above command generates the following output in the terminal: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -324,9 +324,9 @@ python -m rich.tree This generates the following output: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -See the [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) example for a script that displays a tree view of any directory, similar to the linux `tree` command. +See the [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) example for a script that displays a tree view of any directory, similar to the linux `tree` command. @@ -346,9 +346,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -The following screenshot is the output from the [columns example](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) which displays data pulled from an API in columns: +The following screenshot is the output from the [columns example](https://github.com/textualize/rich/blob/master/examples/columns.py) which displays data pulled from an API in columns: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -371,7 +371,7 @@ console.print(markdown) This will produce output something like the following: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -406,7 +406,7 @@ console.print(syntax) This will produce the following output: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -417,7 +417,7 @@ Rich can render [beautiful tracebacks](https://rich.readthedocs.io/en/latest/tra Here's what it looks like on OSX (similar on Linux): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) diff --git a/README.pt-br.md b/README.pt-br.md index cc49432b7..13aac0345 100644 --- a/README.pt-br.md +++ b/README.pt-br.md @@ -4,29 +4,29 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich é uma biblioteca Python para _rich_ text e formatação de estilos no terminal. A [API do Rich](https://rich.readthedocs.io/en/latest/) permite adicionar cores e estilos no output do terminal de forma fácil. Rich também permite formataçao de tabelas, barra de progresso, markdown, highlight de sintaxe de código fonte, rastreio de erros (traceback) e muito mais. -![Funcões](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Funcões](https://github.com/textualize/rich/raw/master/imgs/features.png) Para mais detalhes, veja um vídeo de introdução so Rich em [calmcode.io](https://calmcode.io/rich/introduction.html) por [@fishnets88](https://twitter.com/fishnets88). @@ -62,7 +62,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## REPL do Rich @@ -73,7 +73,7 @@ O Rich pode ser instalado no REPL do Python fazendo com que qualquer estrutura d >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Usando o Console @@ -101,7 +101,7 @@ console.print("Hello", "World!", style="bold red") O resultado vai ser algo como: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Isso funciona bem para formatar cada linha do texto individualmente. Para maior controle sobre a formatação, o Rich renderiza um markup especial com uma sintaxe similar ao [bbcode](https://en.wikipedia.org/wiki/BBCode). Veja o exemplo a seguir: @@ -109,7 +109,7 @@ Isso funciona bem para formatar cada linha do texto individualmente. Para maior console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Voce pode usar o objeto do Console para gerar facilmente uma saída para o terminal sofisticada. Veja a documentação da [API do Console](https://rich.readthedocs.io/en/latest/console.html) para mais detalhes. @@ -123,7 +123,7 @@ O Rich tem uma função [inspect](https://rich.readthedocs.io/en/latest/referenc >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) Confira a [documentação do inspect](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) para mais detalhes. @@ -163,7 +163,7 @@ test_log() O código acima vai produzir algo parecido com: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Note o argumento `log_locals` que imprime uma tabela com as variáveis locais no contexto em que o método `log()` foi chamado. @@ -175,7 +175,7 @@ O método `log()` pode ser usado para logar no terminal em aplicações de proce Você também pode usar a [classe Handler](https://rich.readthedocs.io/en/latest/logging.html) nativa para formatar e colorir o output do módulo `logging` do Python. Veja aqui um exemplo do output: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -198,9 +198,9 @@ Por favor use esse recurso com sabedoria. O Rich pode imprimir [tables](https://rich.readthedocs.io/en/latest/tables.html) flexíveis usando caracteres unicode como bordas. Existem várias opções de formatação de bordas, estilos, alinhamento das celulas, etc. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -A animação acima foi gerada com o arquivo [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) da pasta de exemplos. +A animação acima foi gerada com o arquivo [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) da pasta de exemplos. Veja um exemplo mais simple: @@ -236,13 +236,13 @@ console.print(table) Que gera o seguinte resultado: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) Observe que o markup é renderizado da mesma for que em `print()` e `log()`. De fato, tudo que é renderizável pelo Rich pode ser incluído nos cabeçalhos ou linhas (até mesmo outras tabelas). A classe `Table` é inteligente o suficiente para ajustar o tamanho das colunas para caber na largura do terminal, quebrando o texto em novas linhas quando necessário. Veja a seguir o mesmo exemplo, só que desta vez com um terminal menor do que o tamanho original da tabela: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -262,13 +262,13 @@ for step in track(range(100)): Adicionar multiplas barras de progresso também é simples. Veja outro exemplo que existe na documentação: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) As colunas podem ser configuradas pra mostrar qualquer detalho necessário. As colunas nativas incluem a porcentagem completa, tamanho de arquivo, velocidade do arquivo e tempo restante. O exemplo a seguir mostra o progresso de um download: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Para testar isso no seu terminal, use o arquivo [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) para fazer o download de multiplas URLs simultaneamente, exibindo o progresso de cada download. +Para testar isso no seu terminal, use o arquivo [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) para fazer o download de multiplas URLs simultaneamente, exibindo o progresso de cada download. @@ -293,7 +293,7 @@ with console.status("[bold green]Working on tasks...") as status: Este código resultará no seguinte output no terminal: -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) As animações do "spinner" foram emprestadas do [cli-spinners](https://www.npmjs.com/package/cli-spinners). É possível escolher um estilo de "spinner" usando o parametro `spinner`. Execute o comando a seguir para ver todos os tipos de "spinner" disponíveis. @@ -303,7 +303,7 @@ python -m rich.spinner O comando acima deve exibir o seguinte no seu terminal: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -320,9 +320,9 @@ python -m rich.tree Isso gera o seguinte resultado: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Veja o exemplo em [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) de um código que gera uma árvore de exibição de um dicionário, semelhante ao comando `tree` do linux. +Veja o exemplo em [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) de um código que gera uma árvore de exibição de um dicionário, semelhante ao comando `tree` do linux. @@ -342,9 +342,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -O screenshot a seguir é do resultado do [exemplo de colunas](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) formatando em colunas os dados extraidos de uma API: +O screenshot a seguir é do resultado do [exemplo de colunas](https://github.com/textualize/rich/blob/master/examples/columns.py) formatando em colunas os dados extraidos de uma API: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -367,7 +367,7 @@ console.print(markdown) Isso produzirá um resultado como: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -402,7 +402,7 @@ console.print(syntax) Este código gerará o seguinte resultado: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -413,7 +413,7 @@ O Rich renderiza [tracebacks formatados](https://rich.readthedocs.io/en/latest/t Veja o resultado disso no OSX (resultados semelhantes no Linux): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -454,6 +454,6 @@ Aqui estão alguns projetos que usam o Rich: Biblioteca Python para adicionar rastreio em tempo real de objetos 2D em qualquer detector. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint verifica boas práticas e comportamento que podem ser melhorados. - [ansible-community/molecule](https://github.com/ansible-community/molecule) Framework de test para Ansible Molecule -- +[Muitos outros](https://github.com/willmcgugan/rich/network/dependents)! +- +[Muitos outros](https://github.com/textualize/rich/network/dependents)! diff --git a/README.ru.md b/README.ru.md index 7a5b536b7..bf757ce34 100644 --- a/README.ru.md +++ b/README.ru.md @@ -5,30 +5,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich это Python библиотека, позволяющая отображать _красивый_ текст и форматировать терминал. [Rich API](https://rich.readthedocs.io/en/latest/) упрощает добавление цветов и стилей к выводу терминала. Rich также позволяет отображать красивые таблицы, прогресс бары, markdown, код с отображением синтаксиса, ошибки, и т.д. — прямо после установки. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) Для видеоинструкции смотрите [calmcode.io](https://calmcode.io/rich/introduction.html) от [@fishnets88](https://twitter.com/fishnets88). @@ -64,7 +64,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -75,7 +75,7 @@ Rich может быть установлен в Python REPL, так, все д >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Использование класса Console @@ -103,7 +103,7 @@ console.print("Hello", "World!", style="bold red") Вывод будет выглядить примерно так: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Этого достаточно чтобы стилизовать 1 строку. Для более детального стилизования, Rich использует специальную разметку похожую по синтаксису на [bbcode](https://en.wikipedia.org/wiki/BBCode). Вот пример: @@ -111,7 +111,7 @@ console.print("Hello", "World!", style="bold red") console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Вы можете использовать класс Console чтобы генерировать утонченный вывод с минимальными усилиями. Смотрите [документацию Console API](https://rich.readthedocs.io/en/latest/console.html) для детального объяснения. @@ -125,7 +125,7 @@ console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) Смотрите [документацию inspect](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) для детального объяснения. @@ -165,7 +165,7 @@ test_log() Код выше выведет это: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Запомните аргумент `log_locals`, он выводит таблицу имеющую локальные переменные функции в которой метод был вызван. @@ -177,7 +177,7 @@ test_log() Вы также можете использовать встроенный [класс Handler](https://rich.readthedocs.io/en/latest/logging.html) чтобы форматировать и раскрашивать вывод из встроенной библиотеки logging. Вот пример вывода: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -200,9 +200,9 @@ test_log() Rich может отображать гибкие [таблицы](https://rich.readthedocs.io/en/latest/tables.html) с символами unicode. Есть большое количество форматов границ, стилей, выравниваний ячеек и т.п. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -Эта анимация была сгенерирована с помощью [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) в директории примеров. +Эта анимация была сгенерирована с помощью [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) в директории примеров. Вот пример более простой таблицы: @@ -238,13 +238,13 @@ console.print(table) Этот пример выводит: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) Запомните что разметка консоли отображается таким же способом что и `print()` и `log()`. На самом деле, всё, что может отобразить Rich может быть в заголовках или рядах (даже другие таблицы). Класс `Table` достаточно умный чтобы менять размер столбцов, так, чтобы они заполняли доступную ширину терминала, обёртывая текст как нужно. Вот тот же самый пример с терминалом меньше таблицы: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -264,13 +264,13 @@ for step in track(range(100)): Отслеживать больше чем 1 задание не сложнее. Вот пример взятый из документации: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) Столбцы могут быть настроены чтобы показывать любые детали. Стандартные столбцы содержат проценты исполнения, размер файлы, скорость файла, и оставшееся время. Вот ещё пример показывающий загрузку в прогрессе: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Чтобы попробовать самому, скачайте [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) который может скачать несколько URL одновременно пока отображая прогресс. +Чтобы попробовать самому, скачайте [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) который может скачать несколько URL одновременно пока отображая прогресс. @@ -295,7 +295,7 @@ with console.status("[bold green]Working on tasks...") as status: Это генерирует вот такой вывод в консоль. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) Крутящиеся анимации были взяты из [cli-spinners](https://www.npmjs.com/package/cli-spinners). Вы можете выбрать одну из них указав параметр `spinner`. Запустите следующую команду чтобы узнать доступные анимации: @@ -305,7 +305,7 @@ python -m rich.spinner Эта команда выдаёт вот такой вывод в терминал: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -322,9 +322,9 @@ python -m rich.tree Это генерирует следующий вывод: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Смотрите пример [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) для скрипта который отображает дерево любой директории, похоже на команду linux `tree`. +Смотрите пример [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) для скрипта который отображает дерево любой директории, похоже на команду linux `tree`. @@ -344,9 +344,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -Следующий скриншот это вывод из [примера столбцов](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) который изображает данные взятые из API в столбцах: +Следующий скриншот это вывод из [примера столбцов](https://github.com/textualize/rich/blob/master/examples/columns.py) который изображает данные взятые из API в столбцах: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -369,7 +369,7 @@ console.print(markdown) Это выведет что-то похожее на это: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -404,7 +404,7 @@ console.print(syntax) Это выведет что-то похожее на это: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -415,7 +415,7 @@ Rich может отображать [красивые ошибки](https://ric Вот как это выглядит на OSX (похоже на Linux): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -455,6 +455,6 @@ Rich доступен как часть подписки Tidelift. Простая библиотека Python для добавления 2D отслеживания к любому детектеру в реальном времени. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint проверяет пьесы для практик и поведений которые могут быть исправлены - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule тестинг фреймворк -- +[Ещё больше](https://github.com/willmcgugan/rich/network/dependents)! +- +[Ещё больше](https://github.com/textualize/rich/network/dependents)! diff --git a/README.sv.md b/README.sv.md index 6fe06a527..2bf2c2e29 100644 --- a/README.sv.md +++ b/README.sv.md @@ -4,29 +4,29 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich är ett Python bibliotek för _rich_ text och vacker formattering i terminalen. [Rich API](https://rich.readthedocs.io/en/latest/) gör det enkelt att lägga till färg och stil till terminal utmatning. Rich kan också framställa fina tabeller, framstegsfält, märkspråk, syntaxmarkerad källkod, tillbaka-spårning, och mera - redo att använda. -![Funktioner](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Funktioner](https://github.com/textualize/rich/raw/master/imgs/features.png) För en video demonstration av Rich kolla [calmcode.io](https://calmcode.io/rich/introduction.html) av [@fishnets88](https://twitter.com/fishnets88). @@ -62,7 +62,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -73,7 +73,7 @@ Rich kan installeras i Python REPL, så att varje datastruktur kommer att skriva >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Användning av konsolen @@ -101,7 +101,7 @@ console.print("Hello", "World!", style="bold red") Utmatningen kommer bli något liknande: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Det är bra för att ge stil till en textrad åt gången. För mer finkornad stilisering, Rich framställer en speciell märkspråk vilket liknar [bbcode](https://en.wikipedia.org/wiki/BBCode) i syntax. Här är ett exempel: @@ -109,7 +109,7 @@ Det är bra för att ge stil till en textrad åt gången. För mer finkornad sti console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Konsol märkspråk](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Konsol märkspråk](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Du kan använda ett `Console` objekt för att generera sofistikerad utmatning med minimal ansträngning. Se [Console API](https://rich.readthedocs.io/en/latest/console.html) dokument för detaljer. @@ -123,7 +123,7 @@ Rich har en [inspektionsfunktion](https://rich.readthedocs.io/en/latest/referenc >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) See [inspektionsdokumentationen](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) för detaljer. @@ -163,7 +163,7 @@ test_log() Det ovanstående har följande utmatning: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) Notera `log_locals` argumentet, vilket utmatar en tabell innehållandes de lokala variablerna varifrån log metoden kallades från. @@ -175,7 +175,7 @@ Log metoden kan användas för att logga till terminal för långkörande applik Du kan också använda den inbyggda [Handler klassen](https://rich.readthedocs.io/en/latest/logging.html) för att formatera och färglägga utmatningen från Pythons loggningsmodul. Här är ett exempel av utmatningen: -![Loggning](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Loggning](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -198,9 +198,9 @@ Vänligen använd denna funktion klokt. Rich kan framställa flexibla [tabeller](https://rich.readthedocs.io/en/latest/tables.html) med unicode boxkaraktärer. Det finns en stor mängd av formateringsalternativ för gränser, stilar, och celljustering etc. -![Tabell film](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![Tabell film](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -Animationen ovan genererades utav [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) i exempelkatalogen. +Animationen ovan genererades utav [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) i exempelkatalogen. Här är ett exempel av en enklare tabell: @@ -236,13 +236,13 @@ console.print(table) Detta producerar följande utmatning: -![tabell](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![tabell](https://github.com/textualize/rich/raw/master/imgs/table.png) Notera att konsol märkspråk är framställt på samma sätt som `print()` och `log()`. I själva verket, vad som helst som är framställt av Rich kan inkluderas i rubriker / rader (även andra tabeller). `Table` klassen är smart nog att storleksändra kolumner att passa den tillgängliga bredden av terminalen, och slår in text ifall det behövs. Här är samma exempel, med terminalen gjord mindre än tabell ovan: -![tabell2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![tabell2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -262,13 +262,13 @@ for step in track(range(100)): Det är inte mycket svårare att lägga till flera framstegsfält. Här är ett exempel tagen från dokumentationen: -![framsteg](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![framsteg](https://github.com/textualize/rich/raw/master/imgs/progress.gif) Dessa kolumner kan konfigureras att visa vilka detaljer du vill. Inbyggda kolumner inkluderar procentuell färdig, filstorlek, filhastighet, och återstående tid. Här är ännu ett exempel som visar en pågående nedladdning: -![framsteg](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![framsteg](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -För att själv testa detta, kolla [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) vilket kan ladda ner flera URLs samtidigt medan visar framsteg. +För att själv testa detta, kolla [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) vilket kan ladda ner flera URLs samtidigt medan visar framsteg. @@ -293,7 +293,7 @@ with console.status("[bold green]Working on tasks...") as status: Detta genererar följande utmatning i terminalen. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) Snurra animationen är lånad ifrån [cli-spinners](https://www.npmjs.com/package/cli-spinners). Du kan välja en snurra genom att specifiera `spinner` parametern. Kör följande kommando för att se tillgängliga värden: @@ -303,7 +303,7 @@ python -m rich.spinner Kommandot ovan genererar följande utmatning i terminalen: -![Snurror](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![Snurror](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -320,9 +320,9 @@ python -m rich.tree Detta genererar följande utmatning: -![märkspråk](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![märkspråk](https://github.com/textualize/rich/raw/master/imgs/tree.png) -Se [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) exemplet för ett skript som visar en trädvy av vilken katalog som helst, som liknar linux `tree` kommandot. +Se [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) exemplet för ett skript som visar en trädvy av vilken katalog som helst, som liknar linux `tree` kommandot. @@ -342,9 +342,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -Följande skärmdump är resultatet från [kolumner exempelet](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) vilket visar data tagen från ett API i kolumner: +Följande skärmdump är resultatet från [kolumner exempelet](https://github.com/textualize/rich/blob/master/examples/columns.py) vilket visar data tagen från ett API i kolumner: -![kolumner](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![kolumner](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -367,7 +367,7 @@ console.print(markdown) Detta kommer att producera utmatning som liknar följande: -![märkspråk](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![märkspråk](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -402,7 +402,7 @@ console.print(syntax) Detta kommer producera följande utmatning: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -413,7 +413,7 @@ Rich kan framställa [vackra tillbaka-spårningar](https://rich.readthedocs.io/e Så här ser det ut på OSX (liknande på Linux): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -453,4 +453,4 @@ Här är ett par projekt som använder Rich: Lättvikt Python bibliotek för att addera 2d-objektspårning i realtid till vilken detektor som helst. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint kontroller playbooks för dess metoder och beteenden som potentiellt kan förbättras - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule ramverk för testning -- +[Many more](https://github.com/willmcgugan/rich/network/dependents)! +- +[Many more](https://github.com/textualize/rich/network/dependents)! diff --git a/README.tr.md b/README.tr.md index de3a6719a..f9d9d4389 100644 --- a/README.tr.md +++ b/README.tr.md @@ -5,32 +5,32 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [Indonesian readme](https://github.com/willmcgugan/rich/blob/master/README.id.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [Indonesian readme](https://github.com/textualize/rich/blob/master/README.id.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Bir Python kütüphanesi olan __rich__, terminal üzerinde gösterişli çıktılar almanızı sağlayan bir araçtır. [Rich API](https://rich.readthedocs.io/en/latest/) kullanarak terminal çıktılarınıza sitil ekleyebilir ve renklendirebilirsiniz. Aynı zamanda tabloları, durum çubuklarını, markdown sitillerini, kaynak koddaki syntax gösterimlerini ve bir çok şeyi rich kullanarak yapabilirsiniz. -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) Rich'e video ile göz atmak için [@fishnets88](https://twitter.com/fishnets88) tarafından oluşturulan [calmcode.io](https://calmcode.io/rich/introduction.html) sitesine bakabilirsiniz. @@ -68,7 +68,7 @@ print("Merhaba, [bold magenta]Dünya[/bold magenta]!", ":vampire:", locals()) ``` Buradaki yazıyı değiştiremediğim için siz hello world olarak görüyorsunuz. :D -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -79,7 +79,7 @@ Rich Python REPL içerisine yüklenebilir, böylece her hangi bir veri tipini g >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Terminali Nasıl Kullanılır? @@ -108,7 +108,7 @@ console.print("Merhaba", "Dünya!", style="bold red") Eğer çıktıyı değiştirmeseydim aşağıdaki gibi bir görüntü ile karşılaşacaktınız: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) Tek seferde bir yazıyı renklendirmek için kullanışlı bir yöntem olsa da, eğer çıktımızın sadece belirli bölgelerinde değişiklik yapacaksak [bbcode](https://en.wikipedia.org/wiki/BBCode) syntax'ını kullanmalıyız. Bunun içinde bir örnek: @@ -116,7 +116,7 @@ Tek seferde bir yazıyı renklendirmek için kullanışlı bir yöntem olsa da, console.print("[bold red]Mustafa Kemal Atatürk[/bold red] [u](1881 - 10 Kasım 1938)[/u], [i]Türk asker ve devlet adamıdır[/i]. [bold cyan]Türk Kurtuluş Savaşı'nın başkomutanı ve Türkiye Cumhuriyeti'nin kurucusudur[/bold cyan].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) Console objesini kullanarak sofistike bir çok çıktıyu minimum efor ile oluşturabilirsiniz. [Console API](https://rich.readthedocs.io/en/latest/console.html) dökümanına göz atarak daha fazla bilgi elde edebilirsiniz. @@ -130,7 +130,7 @@ Rich [inspect](https://rich.readthedocs.io/en/latest/reference/init.html?highlig >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) [Bu dökümana](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) göz atarak daha fazla bilgi elde edebilirsiniz.. @@ -171,7 +171,7 @@ test_log() Ve bu kod parçasının çıktısı: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) `log_locals` argümanı, local olarak bulunan değişkenleri tablo olarak ekrana bastırır. @@ -181,7 +181,7 @@ Ve bu kod parçasının çıktısı: Python'un logging modülünü de [Handler sınıfı](https://rich.readthedocs.io/en/latest/logging.html) ile formatlayıp renklendirebiliriz. -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -204,9 +204,9 @@ Bu özelliği doğru yerlerde kullanmakta fayda var tabi. Rich kullanıcılarına esnek bir [tablo](https://rich.readthedocs.io/en/latest/tables.html) imkanı sunar, birden fazla şekilde formatlayıp, stillendirip kullanabilirsiniz. -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -Yukarıdaki tablo örneği [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) örnek kodu ile oluşturulmuştur. +Yukarıdaki tablo örneği [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) örnek kodu ile oluşturulmuştur. Basit bir tablo örneği: @@ -242,13 +242,13 @@ console.print(table) Kodun çıktısı aşağıdaki gibi olmaktadır: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) Note that console markup is rendered in the same way as `print()` and `log()`. In fact, anything that is renderable by Rich may be included in the headers / rows (even other tables). `Table` sınıfı kendini terminal ekranına göre ayarlayabilir, genişletip, küçültebilir. Burada bunun ile alakalı bir örnek görüyorsunuz. -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -268,13 +268,13 @@ for step in track(range(100)): Aşağıdaki görsellerde de görüleceği üzere birden fazla kez progress bar kullanabilirsiniz, ve dökümandan da anlışılacağı üzere bu hiç de zor bir iş değil. -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) Kolonlar kullanıcı tarafından ayarlanabilir, indirme hızını, dosya boyutunui yüzdesel olarak gösterimi gibi bir çok şekilde gösterim sağlayabilir. -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -Eğer size de denemek siterseniz [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) koduna bakarak ve çalıştırarak indirme yapabilirsiniz. +Eğer size de denemek siterseniz [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) koduna bakarak ve çalıştırarak indirme yapabilirsiniz. @@ -299,7 +299,7 @@ with console.status("[bold green]Working on tasks...") as status: Yukarıdaki kod parçacığı aşağıdaki gibi bir çıktı üretecektir. -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) Spin animasyonu [cli-spinners](https://www.npmjs.com/package/cli-spinners) kütüphanesinden alınmıştır. `spinner` parametresi ile seçeceğiniz spin şekilini kullanabilirsiniz. @@ -309,7 +309,7 @@ python -m rich.spinner Çıktısı aşağıdaki gibi bir sonuç üretecektir: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -326,9 +326,9 @@ python -m rich.tree Kodun çıkartacağı görüntü şu olacaktır: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -[tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) örnek dosyası ile linux'de bulunan `tree` kodunu rich üzerinden simüle edebilirsiniz. +[tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) örnek dosyası ile linux'de bulunan `tree` kodunu rich üzerinden simüle edebilirsiniz. @@ -350,9 +350,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -Yukarıdaki yapıya [columns example](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) bağlantısı üzerinden ulaşabilirsiniz. +Yukarıdaki yapıya [columns example](https://github.com/textualize/rich/blob/master/examples/columns.py) bağlantısı üzerinden ulaşabilirsiniz. -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -375,7 +375,7 @@ console.print(markdown) Aşağıdaki gibi bir çıktıya ulaşacağız. -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -411,7 +411,7 @@ console.print(syntax) Yukarıdaki kod parçası aşağıdaki gibi bir çıktı üretecektir. -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -422,7 +422,7 @@ Rich sahip oldukları ile güzel [tracebakcs](https://rich.readthedocs.io/en/lat Burada OSX üzerinde (tıpkı Linux gibi) bir tracebacks çıktısı görüyorsunuz. -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) diff --git a/README.zh-tw.md b/README.zh-tw.md index 308eddf3c..87c69a46d 100644 --- a/README.zh-tw.md +++ b/README.zh-tw.md @@ -4,30 +4,30 @@ [![Rich blog](https://img.shields.io/badge/blog-rich%20news-yellowgreen)](https://www.willmcgugan.com/tag/rich/) [![Twitter Follow](https://img.shields.io/twitter/follow/willmcgugan.svg?style=social)](https://twitter.com/willmcgugan) -![Logo](https://github.com/willmcgugan/rich/raw/master/imgs/logo.svg) - -[English readme](https://github.com/willmcgugan/rich/blob/master/README.md) - • [简体中文 readme](https://github.com/willmcgugan/rich/blob/master/README.cn.md) - • [正體中文 readme](https://github.com/willmcgugan/rich/blob/master/README.zh-tw.md) - • [Lengua española readme](https://github.com/willmcgugan/rich/blob/master/README.es.md) - • [Deutsche readme](https://github.com/willmcgugan/rich/blob/master/README.de.md) - • [Läs på svenska](https://github.com/willmcgugan/rich/blob/master/README.sv.md) - • [日本語 readme](https://github.com/willmcgugan/rich/blob/master/README.ja.md) - • [한국어 readme](https://github.com/willmcgugan/rich/blob/master/README.kr.md) - • [Français readme](https://github.com/willmcgugan/rich/blob/master/README.fr.md) - • [Schwizerdütsch readme](https://github.com/willmcgugan/rich/blob/master/README.de-ch.md) - • [हिन्दी readme](https://github.com/willmcgugan/rich/blob/master/README.hi.md) - • [Português brasileiro readme](https://github.com/willmcgugan/rich/blob/master/README.pt-br.md) - • [Italian readme](https://github.com/willmcgugan/rich/blob/master/README.it.md) - • [Русский readme](https://github.com/willmcgugan/rich/blob/master/README.ru.md) - • [فارسی readme](https://github.com/willmcgugan/rich/blob/master/README.fa.md) - • [Türkçe readme](https://github.com/willmcgugan/rich/blob/master/README.tr.md) +![Logo](https://github.com/textualize/rich/raw/master/imgs/logo.svg) + +[English readme](https://github.com/textualize/rich/blob/master/README.md) + • [简体中文 readme](https://github.com/textualize/rich/blob/master/README.cn.md) + • [正體中文 readme](https://github.com/textualize/rich/blob/master/README.zh-tw.md) + • [Lengua española readme](https://github.com/textualize/rich/blob/master/README.es.md) + • [Deutsche readme](https://github.com/textualize/rich/blob/master/README.de.md) + • [Läs på svenska](https://github.com/textualize/rich/blob/master/README.sv.md) + • [日本語 readme](https://github.com/textualize/rich/blob/master/README.ja.md) + • [한국어 readme](https://github.com/textualize/rich/blob/master/README.kr.md) + • [Français readme](https://github.com/textualize/rich/blob/master/README.fr.md) + • [Schwizerdütsch readme](https://github.com/textualize/rich/blob/master/README.de-ch.md) + • [हिन्दी readme](https://github.com/textualize/rich/blob/master/README.hi.md) + • [Português brasileiro readme](https://github.com/textualize/rich/blob/master/README.pt-br.md) + • [Italian readme](https://github.com/textualize/rich/blob/master/README.it.md) + • [Русский readme](https://github.com/textualize/rich/blob/master/README.ru.md) + • [فارسی readme](https://github.com/textualize/rich/blob/master/README.fa.md) + • [Türkçe readme](https://github.com/textualize/rich/blob/master/README.tr.md) Rich 是一款提供終端機介面中 _豐富的_ 文字效果及精美的格式設定的 Python 函式庫。 [Rich API](https://rich.readthedocs.io/en/latest/) 讓終端機介面加上色彩及樣式變得易如反掌。Rich 也可以繪製漂亮的表格、進度條、Markdown、語法醒目標示的程式碼、Traceback(追溯)……。 -![Features](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![Features](https://github.com/textualize/rich/raw/master/imgs/features.png) 關於 Rich 的介紹,請參見 [@fishnets88](https://twitter.com/fishnets88) 在 [calmcode.io](https://calmcode.io/rich/introduction.html) 錄製的影片。 @@ -63,7 +63,7 @@ from rich import print print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -74,7 +74,7 @@ Rich 可以安裝在 Python REPL 中,如此一來就可以漂亮的輸出與 >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## 使用 Console @@ -102,7 +102,7 @@ console.print("Hello", "World!", style="bold red") 輸出結果如下圖: -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/hello_world.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/hello_world.png) 介紹完了如何對整行文字設定樣式,接著來看看更細部的使用。Rich 可以接受類似 [bbcode](https://en.wikipedia.org/wiki/BBCode) 的語法,對個別文字設定樣式。參考此範例: @@ -110,7 +110,7 @@ console.print("Hello", "World!", style="bold red") console.print("Where there is a [bold cyan]Will[/bold cyan] there [u]is[/u] a [i]way[/i].") ``` -![Console Markup](https://github.com/willmcgugan/rich/raw/master/imgs/where_there_is_a_will.png) +![Console Markup](https://github.com/textualize/rich/raw/master/imgs/where_there_is_a_will.png) 您可以用 Console 物件不費吹灰之力地達成細膩的輸出效果。參閱 [Console API](https://rich.readthedocs.io/en/latest/console.html) 說明文件以了解細節。 @@ -124,7 +124,7 @@ Rich 提供了 [inspect](https://rich.readthedocs.io/en/latest/reference/init.ht >>> inspect(my_list, methods=True) ``` -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/inspect.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/inspect.png) 參閱 [inspect 說明文件](https://rich.readthedocs.io/en/latest/reference/init.html#rich.inspect) 以了解細節。 @@ -164,7 +164,7 @@ test_log() 上面的程式碼會產生下圖結果: -![Log](https://github.com/willmcgugan/rich/raw/master/imgs/log.png) +![Log](https://github.com/textualize/rich/raw/master/imgs/log.png) 注意到 `log_locals` 引數,可用來輸出一張表格,用來顯示 log 方法被呼叫時,區域變數的內容。 @@ -176,7 +176,7 @@ log 方法可用於伺服器上長時間運作的程式,也很適合一般程 您也可以使用內建的 [Handler 類別](https://rich.readthedocs.io/en/latest/logging.html) 來將 Python logging 模組的輸出內容格式化並賦予色彩: -![Logging](https://github.com/willmcgugan/rich/raw/master/imgs/logging.png) +![Logging](https://github.com/textualize/rich/raw/master/imgs/logging.png) @@ -199,9 +199,9 @@ log 方法可用於伺服器上長時間運作的程式,也很適合一般程 Rich 可以用 unicode box 字元繪製彈性的 [表格](https://rich.readthedocs.io/en/latest/tables.html)。格式設定十分多元,包含框線、樣式、儲存格對齊……。 -![table movie](https://github.com/willmcgugan/rich/raw/master/imgs/table_movie.gif) +![table movie](https://github.com/textualize/rich/raw/master/imgs/table_movie.gif) -上圖的動畫效果是以 [table_movie.py](https://github.com/willmcgugan/rich/blob/master/examples/table_movie.py) 產生的,該檔案位於 examples 資料夾。 +上圖的動畫效果是以 [table_movie.py](https://github.com/textualize/rich/blob/master/examples/table_movie.py) 產生的,該檔案位於 examples 資料夾。 參考這個簡單的表格範例: @@ -237,13 +237,13 @@ console.print(table) 執行結果如圖: -![table](https://github.com/willmcgugan/rich/raw/master/imgs/table.png) +![table](https://github.com/textualize/rich/raw/master/imgs/table.png) 請留意,主控台標記的呈現方式與 `print()`、`log()` 相同。事實上,由 Rich 繪製的任何東西都可以被放在任何標題、列,甚至其他表格裡。 `Table` 類別很聰明,能夠自動調整欄寬來配合終端機的大小,也會在需要時自動將文字換行。此範例的程式碼與上一個相同,然而終端機變小了一點: -![table2](https://github.com/willmcgugan/rich/raw/master/imgs/table2.png) +![table2](https://github.com/textualize/rich/raw/master/imgs/table2.png) @@ -263,13 +263,13 @@ for step in track(range(100)): 新增多個進度條也不是難事,來看看說明文件中的範例: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) 您可以調整要顯示的狀態欄位。內建的欄位包含完成百分比、檔案大小、讀寫速度及剩餘時間。來看看另一個用來顯示下載進度的範例: -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/downloader.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/downloader.gif) -想嘗試看看嗎?您可以在 [examples/downloader.py](https://github.com/willmcgugan/rich/blob/master/examples/downloader.py) 取得此範例程式。此程式可以在下載多個檔案時顯示各自的進度。 +想嘗試看看嗎?您可以在 [examples/downloader.py](https://github.com/textualize/rich/blob/master/examples/downloader.py) 取得此範例程式。此程式可以在下載多個檔案時顯示各自的進度。 @@ -294,7 +294,7 @@ with console.status("[bold green]Working on tasks...") as status: 終端機的顯示效果如下: -![status](https://github.com/willmcgugan/rich/raw/master/imgs/status.gif) +![status](https://github.com/textualize/rich/raw/master/imgs/status.gif) 該 spinner 動畫乃借用自 [cli-spinners](https://www.npmjs.com/package/cli-spinners)。可以用 `spinner` 參數指定 spinner 樣式。執行此命令以顯示可用的值: @@ -304,7 +304,7 @@ python -m rich.spinner 此命令在終端機的輸出結果如下圖: -![spinners](https://github.com/willmcgugan/rich/raw/master/imgs/spinners.gif) +![spinners](https://github.com/textualize/rich/raw/master/imgs/spinners.gif) @@ -321,9 +321,9 @@ python -m rich.tree 這會產生下圖的結果: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/tree.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/tree.png) -您可以參考 [tree.py](https://github.com/willmcgugan/rich/blob/master/examples/tree.py) 範例程式,此程式可以樹狀圖展示目錄結構,如同 Linux 的 `tree` 命令。 +您可以參考 [tree.py](https://github.com/textualize/rich/blob/master/examples/tree.py) 範例程式,此程式可以樹狀圖展示目錄結構,如同 Linux 的 `tree` 命令。 @@ -343,9 +343,9 @@ directory = os.listdir(sys.argv[1]) print(Columns(directory)) ``` -此螢幕截圖為 [資料欄範例](https://github.com/willmcgugan/rich/blob/master/examples/columns.py) 的輸出結果。此程式從某 API 取得資料,並以資料欄呈現: +此螢幕截圖為 [資料欄範例](https://github.com/textualize/rich/blob/master/examples/columns.py) 的輸出結果。此程式從某 API 取得資料,並以資料欄呈現: -![columns](https://github.com/willmcgugan/rich/raw/master/imgs/columns.png) +![columns](https://github.com/textualize/rich/raw/master/imgs/columns.png) @@ -368,7 +368,7 @@ console.print(markdown) 執行結果如下圖: -![markdown](https://github.com/willmcgugan/rich/raw/master/imgs/markdown.png) +![markdown](https://github.com/textualize/rich/raw/master/imgs/markdown.png) @@ -403,7 +403,7 @@ console.print(syntax) 執行結果如下圖: -![syntax](https://github.com/willmcgugan/rich/raw/master/imgs/syntax.png) +![syntax](https://github.com/textualize/rich/raw/master/imgs/syntax.png) @@ -414,7 +414,7 @@ Rich 可以繪製 [漂亮的 tracebacks](https://rich.readthedocs.io/en/latest/t 它在 macOS 上執行的效果如圖(Linux 上差異不大): -![traceback](https://github.com/willmcgugan/rich/raw/master/imgs/traceback.png) +![traceback](https://github.com/textualize/rich/raw/master/imgs/traceback.png) @@ -454,6 +454,6 @@ Rich 及其他數以千計的套件維護者正與 Tidelift 合作,以提供 Lightweight Python library for adding real-time 2D object tracking to any detector. - [ansible/ansible-lint](https://github.com/ansible/ansible-lint) Ansible-lint checks playbooks for practices and behaviour that could potentially be improved - [ansible-community/molecule](https://github.com/ansible-community/molecule) Ansible Molecule testing framework -- +[Many more](https://github.com/willmcgugan/rich/network/dependents)! +- +[Many more](https://github.com/textualize/rich/network/dependents)! diff --git a/benchmarks/snippets.py b/benchmarks/snippets.py index f8d177aa1..df161d89d 100644 --- a/benchmarks/snippets.py +++ b/benchmarks/snippets.py @@ -107,7 +107,7 @@ def layout_resolve(total: int, edges: Sequence[EdgeProtocol]) -> List[int]: [Rich API](https://rich.readthedocs.io/en/latest/)を使用すると、ターミナルの出力に色やスタイルを簡単に追加することができます。 Richはきれいなテーブル、プログレスバー、マークダウン、シンタックスハイライトされたソースコード、トレースバックなどをすぐに生成・表示することもできます。 -![機能](https://github.com/willmcgugan/rich/raw/master/imgs/features.png) +![機能](https://github.com/textualize/rich/raw/master/imgs/features.png) Richの紹介動画はこちらをご覧ください。 [calmcode.io](https://calmcode.io/rich/introduction.html) by [@fishnets88](https://twitter.com/fishnets88). @@ -143,7 +143,7 @@ def layout_resolve(total: int, edges: Sequence[EdgeProtocol]) -> List[int]: print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals()) ``` -![Hello World](https://github.com/willmcgugan/rich/raw/master/imgs/print.png) +![Hello World](https://github.com/textualize/rich/raw/master/imgs/print.png) ## Rich REPL @@ -154,7 +154,7 @@ def layout_resolve(total: int, edges: Sequence[EdgeProtocol]) -> List[int]: >>> pretty.install() ``` -![REPL](https://github.com/willmcgugan/rich/raw/master/imgs/repl.png) +![REPL](https://github.com/textualize/rich/raw/master/imgs/repl.png) ## Rich Inspect diff --git a/tests/test_markdown.py b/tests/test_markdown.py index 938a06e33..db95fd6f7 100644 --- a/tests/test_markdown.py +++ b/tests/test_markdown.py @@ -46,7 +46,7 @@ > > Lorem ipsum -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) ``` @@ -75,7 +75,6 @@ from rich.console import Console, RenderableType from rich.markdown import Markdown - re_link_ids = re.compile(r"id=[\d\.\-]*?;.*?\x1b") diff --git a/tests/test_markdown_no_hyperlinks.py b/tests/test_markdown_no_hyperlinks.py index 94b0ad748..f7af46e52 100644 --- a/tests/test_markdown_no_hyperlinks.py +++ b/tests/test_markdown_no_hyperlinks.py @@ -46,7 +46,7 @@ > > Lorem ipsum -![progress](https://github.com/willmcgugan/rich/raw/master/imgs/progress.gif) +![progress](https://github.com/textualize/rich/raw/master/imgs/progress.gif) ``` @@ -69,7 +69,6 @@ from rich.console import Console, RenderableType from rich.markdown import Markdown - re_link_ids = re.compile(r"id=[\d\.\-]*?;.*?\x1b") diff --git a/tests/test_segment.py b/tests/test_segment.py index 9adf10329..5c3bbc39b 100644 --- a/tests/test_segment.py +++ b/tests/test_segment.py @@ -165,7 +165,7 @@ def test_divide(): ] -# https://github.com/willmcgugan/rich/issues/1755 +# https://github.com/textualize/rich/issues/1755 def test_divide_complex(): MAP = ( "[on orange4] [on green]XX[on orange4] \n" diff --git a/tests/test_text.py b/tests/test_text.py index 685bdcdda..169931a76 100644 --- a/tests/test_text.py +++ b/tests/test_text.py @@ -758,7 +758,7 @@ def test_slice(): def test_wrap_invalid_style(): - # https://github.com/willmcgugan/rich/issues/987 + # https://github.com/textualize/rich/issues/987 console = Console(width=100, color_system="truecolor") a = "[#######.................] xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [#######.................]" console.print(a, justify="full") diff --git a/tests/test_traceback.py b/tests/test_traceback.py index 9e71a1592..11b623ddf 100644 --- a/tests/test_traceback.py +++ b/tests/test_traceback.py @@ -17,7 +17,7 @@ expected = None -CAPTURED_EXCEPTION = 'Traceback (most recent call last):\n╭──────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ File "/Users/willmcgugan/projects/rich/tests/test_traceback.py", line 26, in test_handler │\n│ 23 try: │\n│ 24 old_handler = install(console=console, line_numbers=False) │\n│ 25 try: │\n│ ❱ 26 1 / 0 │\n│ 27 except Exception: │\n│ 28 exc_type, exc_value, traceback = sys.exc_info() │\n│ 29 sys.excepthook(exc_type, exc_value, traceback) │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\nZeroDivisionError: division by zero\n' +CAPTURED_EXCEPTION = 'Traceback (most recent call last):\n╭──────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ File "/Users/textualize/projects/rich/tests/test_traceback.py", line 26, in test_handler │\n│ 23 try: │\n│ 24 old_handler = install(console=console, line_numbers=False) │\n│ 25 try: │\n│ ❱ 26 1 / 0 │\n│ 27 except Exception: │\n│ 28 exc_type, exc_value, traceback = sys.exc_info() │\n│ 29 sys.excepthook(exc_type, exc_value, traceback) │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\nZeroDivisionError: division by zero\n' def test_handler(): From 365932b7d97ff6164850f17cf3925d93800ca880 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Mon, 19 Sep 2022 11:33:38 +0100 Subject: [PATCH 19/23] more scrubbing --- CODE_OF_CONDUCT.md | 2 +- examples/fullscreen.py | 26 +++++++++----------------- rich/__main__.py | 8 -------- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index c68a49b07..5d048990d 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at willmcgugan@gmail.com. All +reported by contacting the project team at will@textualize.io. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. diff --git a/examples/fullscreen.py b/examples/fullscreen.py index 5ccc6fb3f..1de8a8ac7 100644 --- a/examples/fullscreen.py +++ b/examples/fullscreen.py @@ -10,10 +10,9 @@ from rich.console import Console, Group from rich.layout import Layout from rich.panel import Panel -from rich.progress import Progress, SpinnerColumn, BarColumn, TextColumn +from rich.progress import BarColumn, Progress, SpinnerColumn, TextColumn from rich.syntax import Syntax from rich.table import Table -from rich.text import Text console = Console() @@ -41,33 +40,25 @@ def make_sponsor_message() -> Panel: sponsor_message.add_column(style="green", justify="right") sponsor_message.add_column(no_wrap=True) sponsor_message.add_row( - "Sponsor me", - "[u blue link=https://github.com/sponsors/willmcgugan]https://github.com/sponsors/willmcgugan", - ) - sponsor_message.add_row( - "Buy me a :coffee:", - "[u blue link=https://ko-fi.com/willmcgugan]https://ko-fi.com/willmcgugan", + "Twitter", + "[u blue link=https://twitter.com/textualize]https://twitter.com/textualize", ) sponsor_message.add_row( - "Twitter", + "CEO", "[u blue link=https://twitter.com/willmcgugan]https://twitter.com/willmcgugan", ) sponsor_message.add_row( - "Blog", "[u blue link=https://www.willmcgugan.com]https://www.willmcgugan.com" - ) - - intro_message = Text.from_markup( - """Consider supporting my work via Github Sponsors (ask your company / organization), or buy me a coffee to say thanks. - Will McGugan""" + "Textualize", "[u blue link=https://www.textualize.io]https://www.textualize.io" ) message = Table.grid(padding=1) message.add_column() message.add_column(no_wrap=True) - message.add_row(intro_message, sponsor_message) + message.add_row(sponsor_message) message_panel = Panel( Align.center( - Group(intro_message, "\n", Align.center(sponsor_message)), + Group("\n", Align.center(sponsor_message)), vertical="middle", ), box=box.ROUNDED, @@ -170,9 +161,10 @@ def ratio_resolve(total: int, edges: List[Edge]) -> List[int]: layout["footer"].update(progress_table) -from rich.live import Live from time import sleep +from rich.live import Live + with Live(layout, refresh_per_second=10, screen=True): while not overall_progress.finished: sleep(0.1) diff --git a/rich/__main__.py b/rich/__main__.py index eb293a0ba..bc55aede0 100644 --- a/rich/__main__.py +++ b/rich/__main__.py @@ -227,10 +227,6 @@ def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: c = Console(record=True) c.print(test_card) - # c.save_svg( - # path="/Users/darrenburns/Library/Application Support/JetBrains/PyCharm2021.3/scratches/svg_export.svg", - # title="Rich can export to SVG", - # ) print(f"rendered in {pre_cache_taken}ms (cold cache)") print(f"rendered in {taken}ms (warm cache)") @@ -247,10 +243,6 @@ def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: "Textualize", "[u blue link=https://github.com/textualize]https://github.com/textualize", ) - sponsor_message.add_row( - "Buy devs a :coffee:", - "[u blue link=https://ko-fi.com/textualize]https://ko-fi.com/textualize", - ) sponsor_message.add_row( "Twitter", "[u blue link=https://twitter.com/willmcgugan]https://twitter.com/willmcgugan", From ad85d8a84f4eea728b224cf4d12e5f818e8cc697 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Mon, 19 Sep 2022 15:12:21 +0100 Subject: [PATCH 20/23] Add Kitty exception --- rich/console.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rich/console.py b/rich/console.py index 585221e06..2638155e2 100644 --- a/rich/console.py +++ b/rich/console.py @@ -106,7 +106,11 @@ class NoChange: _STD_STREAMS_OUTPUT = (_STDOUT_FILENO, _STDERR_FILENO) -_TERM_COLORS = {"256color": ColorSystem.EIGHT_BIT, "16color": ColorSystem.STANDARD} +_TERM_COLORS = { + "kitty": ColorSystem.EIGHT_BIT, + "256color": ColorSystem.EIGHT_BIT, + "16color": ColorSystem.STANDARD, +} class ConsoleDimensions(NamedTuple): From 4472ce441a25e746e8024f8504aa678f4392424c Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Mon, 19 Sep 2022 15:17:29 +0100 Subject: [PATCH 21/23] added test --- CHANGELOG.md | 4 ++-- tests/test_console.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1cbe4cac..bcb3f0afa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [12.6.0] - Unreleased ### Added - Parse ANSI escape sequences in pretty repr https://github.com/Textualize/rich/pull/2470 - Add support for `FORCE_COLOR` env var https://github.com/Textualize/rich/pull/2449 - Allow a `max_depth` argument to be passed to the `install()` hook https://github.com/Textualize/rich/issues/2486 -- Document using `None` as name in `__rich_repr__` for tuple posotional args https://github.com/Textualize/rich/pull/2379 +- Document using `None` as name in `__rich_repr__` for tuple positional args https://github.com/Textualize/rich/pull/2379 ### Fixed diff --git a/tests/test_console.py b/tests/test_console.py index fa6765357..369f0a67e 100644 --- a/tests/test_console.py +++ b/tests/test_console.py @@ -66,6 +66,16 @@ def test_truecolor_terminal(): assert console.color_system == "truecolor" +@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") +def test_kitty_terminal(): + console = Console( + force_terminal=True, + legacy_windows=False, + _environ={"TERM": "xterm-kitty"}, + ) + assert console.color_system == "256" + + def test_console_options_update(): options = ConsoleOptions( ConsoleDimensions(80, 25), From ac69488768e9c54cdef26e45b26a1b42ebf2f5d3 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 20 Sep 2022 10:44:10 +0100 Subject: [PATCH 22/23] fix for syntax measure --- rich/syntax.py | 14 ++++++++++++-- tests/test_syntax.py | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/rich/syntax.py b/rich/syntax.py index eb8615fe8..51f890ccb 100644 --- a/rich/syntax.py +++ b/rich/syntax.py @@ -40,6 +40,7 @@ from rich.padding import Padding, PaddingDimensions from ._loop import loop_first +from .cells import cell_len from .color import Color, blend_rgb from .console import Console, ConsoleOptions, JustifyMethod, RenderResult from .jupyter import JupyterMixin @@ -586,11 +587,20 @@ def _get_number_styles(self, console: Console) -> Tuple[Style, Style, Style]: def __rich_measure__( self, console: "Console", options: "ConsoleOptions" ) -> "Measurement": + _, right, _, left = Padding.unpack(self.padding) + padding = left + right if self.code_width is not None: - width = self.code_width + self._numbers_column_width + right + left + width = self.code_width + self._numbers_column_width + padding + 1 return Measurement(self._numbers_column_width, width) - return Measurement(self._numbers_column_width, options.max_width) + width = ( + self._numbers_column_width + + padding + + max(cell_len(line) for line in self.code.splitlines()) + ) + if self.line_numbers: + width += 1 + return Measurement(self._numbers_column_width, width) def __rich_console__( self, console: Console, options: ConsoleOptions diff --git a/tests/test_syntax.py b/tests/test_syntax.py index c85d3f366..af325a7c0 100644 --- a/tests/test_syntax.py +++ b/tests/test_syntax.py @@ -63,7 +63,7 @@ def test_python_render(): ) rendered_syntax = render(syntax) print(repr(rendered_syntax)) - expected = '╭────────────────────────────────────────────────────────────────╮\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 2 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34m"""Iterate and generate a tuple with a flag for first \x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[48;2;39;40;34m \x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34mand last value."""\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 3 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mvalues\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 4 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mtry\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 5 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprevious_value\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mnext\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 6 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mexcept\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;166;226;46;48;2;39;40;34mStopIteration\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 7 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mreturn\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 8 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mfirst\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mTrue\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 9 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mfor\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mvalue\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34min\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m10 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34myield\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mfirst\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m,\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mFalse\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m,\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprevious_value\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n╰────────────────────────────────────────────────────────────────╯\n' + expected = '╭─────────────────────────────────────────────────────────────────╮\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 2 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34m"""Iterate and generate a tuple with a flag for first \x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[48;2;39;40;34m \x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34mand last value."""\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 3 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mvalues\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 4 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mtry\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 5 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprevious_value\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mnext\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 6 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mexcept\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;166;226;46;48;2;39;40;34mStopIteration\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 7 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mreturn\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 8 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mfirst\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mTrue\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 9 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mfor\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mvalue\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34min\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m10 \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34myield\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mfirst\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m,\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mFalse\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m,\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprevious_value\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n╰─────────────────────────────────────────────────────────────────╯\n' assert rendered_syntax == expected @@ -146,7 +146,7 @@ def test_python_render_indent_guides(): ) rendered_syntax = render(syntax) print(repr(rendered_syntax)) - expected = '╭────────────────────────────────────────────────────────────────╮\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 2 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34m"""Iterate and generate a tuple with a flag for first \x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[48;2;39;40;34m \x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34mand last value."""\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 3 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mvalues\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 4 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mtry\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 5 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ │ \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprevious_value\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mnext\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 6 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mexcept\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;166;226;46;48;2;39;40;34mStopIteration\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 7 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ │ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mreturn\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 8 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mfirst\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mTrue\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 9 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mfor\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mvalue\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34min\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m10 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ │ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34myield\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mfirst\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m,\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mFalse\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m,\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprevious_value\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n╰────────────────────────────────────────────────────────────────╯\n' + expected = '╭─────────────────────────────────────────────────────────────────╮\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 2 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34m"""Iterate and generate a tuple with a flag for first \x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[48;2;39;40;34m \x1b[0m\x1b[38;2;230;219;116;48;2;39;40;34mand last value."""\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 3 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mvalues\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 4 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mtry\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 5 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ │ \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprevious_value\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mnext\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m(\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m)\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 6 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mexcept\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;166;226;46;48;2;39;40;34mStopIteration\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 7 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ │ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mreturn\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 8 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mfirst\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34m=\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mTrue\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m 9 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mfor\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mvalue\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;249;38;114;48;2;39;40;34min\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34miter_values\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m:\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n│\x1b[1;38;2;227;227;221;48;2;39;40;34m \x1b[0m\x1b[38;2;101;102;96;48;2;39;40;34m10 \x1b[0m\x1b[2;38;2;117;113;94;48;2;39;40;34m│ │ \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34myield\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mfirst\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m,\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;102;217;239;48;2;39;40;34mFalse\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m,\x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34m \x1b[0m\x1b[38;2;248;248;242;48;2;39;40;34mprevious_value\x1b[0m\x1b[48;2;39;40;34m \x1b[0m│\n╰─────────────────────────────────────────────────────────────────╯\n' assert rendered_syntax == expected From 7d126c867f3fd56e61c62610e447df6f5351d00b Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 20 Sep 2022 10:49:04 +0100 Subject: [PATCH 23/23] added test for measure --- tests/test_syntax.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_syntax.py b/tests/test_syntax.py index af325a7c0..6b8ce9ec1 100644 --- a/tests/test_syntax.py +++ b/tests/test_syntax.py @@ -6,6 +6,7 @@ import pytest from pygments.lexers import PythonLexer +from rich.measure import Measurement from rich.panel import Panel from rich.style import Style from rich.syntax import ( @@ -380,6 +381,18 @@ def test_syntax_padding(): ) +def test_syntax_measure(): + console = Console() + code = Syntax("Hello, World", "python") + assert code.__rich_measure__(console, console.options) == Measurement(0, 12) + + code = Syntax("Hello, World", "python", line_numbers=True) + assert code.__rich_measure__(console, console.options) == Measurement(3, 16) + + code = Syntax("Hello, World", "python", code_width=20, line_numbers=True) + assert code.__rich_measure__(console, console.options) == Measurement(3, 24) + + if __name__ == "__main__": syntax = Panel.fit( Syntax(