rs-rich 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rs_rich-0.0.1/PKG-INFO +72 -0
- rs_rich-0.0.1/README.md +56 -0
- rs_rich-0.0.1/pyproject.toml +32 -0
- rs_rich-0.0.1/python/rs_rich/__init__.py +60 -0
- rs_rich-0.0.1/python/rs_rich/__main__.py +8 -0
- rs_rich-0.0.1/python/rs_rich/_native.pyi +4348 -0
- rs_rich-0.0.1/python/rs_rich/_null_file.py +77 -0
- rs_rich-0.0.1/python/rs_rich/align.py +5 -0
- rs_rich-0.0.1/python/rs_rich/art/__init__.py +78 -0
- rs_rich-0.0.1/python/rs_rich/art/ascii.py +5 -0
- rs_rich-0.0.1/python/rs_rich/art/block.py +5 -0
- rs_rich-0.0.1/python/rs_rich/art/braille.py +5 -0
- rs_rich-0.0.1/python/rs_rich/art/figlet.py +8 -0
- rs_rich-0.0.1/python/rs_rich/art/gif.py +5 -0
- rs_rich-0.0.1/python/rs_rich/art/image_art.py +5 -0
- rs_rich-0.0.1/python/rs_rich/art/imagediff.py +8 -0
- rs_rich-0.0.1/python/rs_rich/art/quadrant.py +5 -0
- rs_rich-0.0.1/python/rs_rich/art/sixel.py +10 -0
- rs_rich-0.0.1/python/rs_rich/art/stage.py +5 -0
- rs_rich-0.0.1/python/rs_rich/bar.py +5 -0
- rs_rich-0.0.1/python/rs_rich/box.py +47 -0
- rs_rich-0.0.1/python/rs_rich/cli.py +111 -0
- rs_rich-0.0.1/python/rs_rich/color.py +21 -0
- rs_rich-0.0.1/python/rs_rich/columns.py +5 -0
- rs_rich-0.0.1/python/rs_rich/console.py +27 -0
- rs_rich-0.0.1/python/rs_rich/constrain.py +5 -0
- rs_rich-0.0.1/python/rs_rich/containers.py +5 -0
- rs_rich-0.0.1/python/rs_rich/emoji.py +9 -0
- rs_rich-0.0.1/python/rs_rich/errors.py +25 -0
- rs_rich-0.0.1/python/rs_rich/ext/__init__.py +481 -0
- rs_rich-0.0.1/python/rs_rich/ext/a11y.py +36 -0
- rs_rich-0.0.1/python/rs_rich/ext/ansi_explain.py +28 -0
- rs_rich-0.0.1/python/rs_rich/ext/badge.py +20 -0
- rs_rich-0.0.1/python/rs_rich/ext/cancel.py +12 -0
- rs_rich-0.0.1/python/rs_rich/ext/capabilities.py +22 -0
- rs_rich-0.0.1/python/rs_rich/ext/cli_doc.py +50 -0
- rs_rich-0.0.1/python/rs_rich/ext/countdown.py +26 -0
- rs_rich-0.0.1/python/rs_rich/ext/dashboard.py +12 -0
- rs_rich-0.0.1/python/rs_rich/ext/data.py +86 -0
- rs_rich-0.0.1/python/rs_rich/ext/derive.py +24 -0
- rs_rich-0.0.1/python/rs_rich/ext/diagnostic.py +20 -0
- rs_rich-0.0.1/python/rs_rich/ext/diff.py +66 -0
- rs_rich-0.0.1/python/rs_rich/ext/encoding.py +20 -0
- rs_rich-0.0.1/python/rs_rich/ext/env_inspect.py +24 -0
- rs_rich-0.0.1/python/rs_rich/ext/event.py +12 -0
- rs_rich-0.0.1/python/rs_rich/ext/fidelity.py +24 -0
- rs_rich-0.0.1/python/rs_rich/ext/format.py +46 -0
- rs_rich-0.0.1/python/rs_rich/ext/hex.py +18 -0
- rs_rich-0.0.1/python/rs_rich/ext/highlighter.py +12 -0
- rs_rich-0.0.1/python/rs_rich/ext/hyperlink.py +14 -0
- rs_rich-0.0.1/python/rs_rich/ext/layout.py +22 -0
- rs_rich-0.0.1/python/rs_rich/ext/live.py +16 -0
- rs_rich-0.0.1/python/rs_rich/ext/log_handler.py +20 -0
- rs_rich-0.0.1/python/rs_rich/ext/notify.py +14 -0
- rs_rich-0.0.1/python/rs_rich/ext/qa.py +49 -0
- rs_rich-0.0.1/python/rs_rich/ext/redact.py +26 -0
- rs_rich-0.0.1/python/rs_rich/ext/registry.py +10 -0
- rs_rich-0.0.1/python/rs_rich/ext/sanitize.py +18 -0
- rs_rich-0.0.1/python/rs_rich/ext/size_bar.py +18 -0
- rs_rich-0.0.1/python/rs_rich/ext/source_view.py +12 -0
- rs_rich-0.0.1/python/rs_rich/ext/stacktrace.py +24 -0
- rs_rich-0.0.1/python/rs_rich/ext/table.py +38 -0
- rs_rich-0.0.1/python/rs_rich/ext/target.py +18 -0
- rs_rich-0.0.1/python/rs_rich/ext/testing.py +22 -0
- rs_rich-0.0.1/python/rs_rich/ext/theme.py +16 -0
- rs_rich-0.0.1/python/rs_rich/ext/transfer.py +26 -0
- rs_rich-0.0.1/python/rs_rich/ext/transform.py +20 -0
- rs_rich-0.0.1/python/rs_rich/ext/unicode_inspect.py +24 -0
- rs_rich-0.0.1/python/rs_rich/ext/workflow.py +40 -0
- rs_rich-0.0.1/python/rs_rich/highlighter.py +23 -0
- rs_rich-0.0.1/python/rs_rich/json.py +5 -0
- rs_rich-0.0.1/python/rs_rich/layout.py +23 -0
- rs_rich-0.0.1/python/rs_rich/live.py +5 -0
- rs_rich-0.0.1/python/rs_rich/live_render.py +5 -0
- rs_rich-0.0.1/python/rs_rich/logging.py +5 -0
- rs_rich-0.0.1/python/rs_rich/markdown.py +9 -0
- rs_rich-0.0.1/python/rs_rich/markup.py +6 -0
- rs_rich-0.0.1/python/rs_rich/measure.py +5 -0
- rs_rich-0.0.1/python/rs_rich/mermaid.py +71 -0
- rs_rich-0.0.1/python/rs_rich/padding.py +5 -0
- rs_rich-0.0.1/python/rs_rich/pager.py +5 -0
- rs_rich-0.0.1/python/rs_rich/panel.py +5 -0
- rs_rich-0.0.1/python/rs_rich/plugins.py +73 -0
- rs_rich-0.0.1/python/rs_rich/pretty.py +10 -0
- rs_rich-0.0.1/python/rs_rich/progress.py +45 -0
- rs_rich-0.0.1/python/rs_rich/progress_bar.py +5 -0
- rs_rich-0.0.1/python/rs_rich/prompt.py +21 -0
- rs_rich-0.0.1/python/rs_rich/py.typed +0 -0
- rs_rich-0.0.1/python/rs_rich/rule.py +5 -0
- rs_rich-0.0.1/python/rs_rich/screen.py +5 -0
- rs_rich-0.0.1/python/rs_rich/segment.py +5 -0
- rs_rich-0.0.1/python/rs_rich/spinner.py +5 -0
- rs_rich-0.0.1/python/rs_rich/status.py +5 -0
- rs_rich-0.0.1/python/rs_rich/style.py +5 -0
- rs_rich-0.0.1/python/rs_rich/styled.py +5 -0
- rs_rich-0.0.1/python/rs_rich/syntax.py +13 -0
- rs_rich-0.0.1/python/rs_rich/table.py +5 -0
- rs_rich-0.0.1/python/rs_rich/terminal_theme.py +19 -0
- rs_rich-0.0.1/python/rs_rich/text.py +5 -0
- rs_rich-0.0.1/python/rs_rich/theme.py +5 -0
- rs_rich-0.0.1/python/rs_rich/traceback.py +9 -0
- rs_rich-0.0.1/python/rs_rich/tree.py +5 -0
- rs_rich-0.0.1/rich/Cargo.toml +57 -0
- rs_rich-0.0.1/rich/LICENSE +27 -0
- rs_rich-0.0.1/rich/README.md +74 -0
- rs_rich-0.0.1/rich/src/align.rs +353 -0
- rs_rich-0.0.1/rich/src/ansi.rs +351 -0
- rs_rich-0.0.1/rich/src/bar.rs +153 -0
- rs_rich-0.0.1/rich/src/box.rs +462 -0
- rs_rich-0.0.1/rich/src/cell_widths.rs +7393 -0
- rs_rich-0.0.1/rich/src/cells.rs +682 -0
- rs_rich-0.0.1/rich/src/color.rs +662 -0
- rs_rich-0.0.1/rich/src/color_names.rs +250 -0
- rs_rich-0.0.1/rich/src/columns.rs +389 -0
- rs_rich-0.0.1/rich/src/console.rs +2284 -0
- rs_rich-0.0.1/rich/src/constrain.rs +65 -0
- rs_rich-0.0.1/rich/src/containers.rs +78 -0
- rs_rich-0.0.1/rich/src/control.rs +226 -0
- rs_rich-0.0.1/rich/src/emoji.rs +168 -0
- rs_rich-0.0.1/rich/src/emoji_codes.rs +5843 -0
- rs_rich-0.0.1/rich/src/errors.rs +53 -0
- rs_rich-0.0.1/rich/src/export.rs +225 -0
- rs_rich-0.0.1/rich/src/filesize.rs +155 -0
- rs_rich-0.0.1/rich/src/highlighter.rs +345 -0
- rs_rich-0.0.1/rich/src/json.rs +1721 -0
- rs_rich-0.0.1/rich/src/layout.rs +740 -0
- rs_rich-0.0.1/rich/src/lib.rs +135 -0
- rs_rich-0.0.1/rich/src/live.rs +485 -0
- rs_rich-0.0.1/rich/src/live_render.rs +220 -0
- rs_rich-0.0.1/rich/src/log_render.rs +381 -0
- rs_rich-0.0.1/rich/src/markdown.rs +2953 -0
- rs_rich-0.0.1/rich/src/markdown_url.rs +705 -0
- rs_rich-0.0.1/rich/src/markup.rs +453 -0
- rs_rich-0.0.1/rich/src/measure.rs +65 -0
- rs_rich-0.0.1/rich/src/padding.rs +193 -0
- rs_rich-0.0.1/rich/src/pager.rs +231 -0
- rs_rich-0.0.1/rich/src/panel.rs +567 -0
- rs_rich-0.0.1/rich/src/pretty.rs +94 -0
- rs_rich-0.0.1/rich/src/progress.rs +1860 -0
- rs_rich-0.0.1/rich/src/progress_bar.rs +335 -0
- rs_rich-0.0.1/rich/src/prompt.rs +519 -0
- rs_rich-0.0.1/rich/src/protocol.rs +317 -0
- rs_rich-0.0.1/rich/src/pyformat.rs +825 -0
- rs_rich-0.0.1/rich/src/ratio.rs +148 -0
- rs_rich-0.0.1/rich/src/region.rs +23 -0
- rs_rich-0.0.1/rich/src/repr_patterns.rs +10 -0
- rs_rich-0.0.1/rich/src/rule.rs +287 -0
- rs_rich-0.0.1/rich/src/screen.rs +106 -0
- rs_rich-0.0.1/rich/src/segment.rs +617 -0
- rs_rich-0.0.1/rich/src/spinner.rs +252 -0
- rs_rich-0.0.1/rich/src/spinner_data.rs +159 -0
- rs_rich-0.0.1/rich/src/status.rs +154 -0
- rs_rich-0.0.1/rich/src/style.rs +822 -0
- rs_rich-0.0.1/rich/src/styled.rs +69 -0
- rs_rich-0.0.1/rich/src/svg.rs +467 -0
- rs_rich-0.0.1/rich/src/syntax.rs +1560 -0
- rs_rich-0.0.1/rich/src/syntax_cache.rs +184 -0
- rs_rich-0.0.1/rich/src/syntax_syntect.rs +559 -0
- rs_rich-0.0.1/rich/src/table.rs +1982 -0
- rs_rich-0.0.1/rich/src/terminal_theme.rs +220 -0
- rs_rich-0.0.1/rich/src/text.rs +2285 -0
- rs_rich-0.0.1/rich/src/theme.rs +734 -0
- rs_rich-0.0.1/rich/src/traceback.rs +141 -0
- rs_rich-0.0.1/rich/src/tree.rs +460 -0
- rs_rich-0.0.1/rich/src/wrap.rs +136 -0
- rs_rich-0.0.1/rich-art/Cargo.toml +113 -0
- rs_rich-0.0.1/rich-art/LICENSE +27 -0
- rs_rich-0.0.1/rich-art/README.md +219 -0
- rs_rich-0.0.1/rich-art/examples/assets/ball.gif +0 -0
- rs_rich-0.0.1/rich-art/examples/assets/cat.gif +0 -0
- rs_rich-0.0.1/rich-art/examples/assets/waving_cat.gif +0 -0
- rs_rich-0.0.1/rich-art/examples/banner.rs +23 -0
- rs_rich-0.0.1/rich-art/examples/diff_report.rs +79 -0
- rs_rich-0.0.1/rich-art/examples/gif.rs +42 -0
- rs_rich-0.0.1/rich-art/examples/guide_banners.rs +126 -0
- rs_rich-0.0.1/rich-art/examples/guide_gifs.rs +196 -0
- rs_rich-0.0.1/rich-art/examples/guide_image_diff.rs +189 -0
- rs_rich-0.0.1/rich-art/examples/guide_images.rs +455 -0
- rs_rich-0.0.1/rich-art/examples/make_demo_gif.rs +207 -0
- rs_rich-0.0.1/rich-art/examples/shrink_asset.rs +56 -0
- rs_rich-0.0.1/rich-art/examples/stage.rs +46 -0
- rs_rich-0.0.1/rich-art/fonts/README.md +36 -0
- rs_rich-0.0.1/rich-art/fonts/standard.flf +2237 -0
- rs_rich-0.0.1/rich-art/src/ascii.rs +407 -0
- rs_rich-0.0.1/rich-art/src/block.rs +315 -0
- rs_rich-0.0.1/rich-art/src/braille.rs +158 -0
- rs_rich-0.0.1/rich-art/src/figlet.rs +647 -0
- rs_rich-0.0.1/rich-art/src/gif.rs +848 -0
- rs_rich-0.0.1/rich-art/src/image_art.rs +1915 -0
- rs_rich-0.0.1/rich-art/src/image_color.rs +776 -0
- rs_rich-0.0.1/rich-art/src/imagediff.rs +671 -0
- rs_rich-0.0.1/rich-art/src/lib.rs +225 -0
- rs_rich-0.0.1/rich-art/src/quadrant.rs +352 -0
- rs_rich-0.0.1/rich-art/src/sixel.rs +756 -0
- rs_rich-0.0.1/rich-art/src/stage.rs +470 -0
- rs_rich-0.0.1/rich-art/src/transform.rs +282 -0
- rs_rich-0.0.1/rich-art/tests/alpha_backgrounds.rs +356 -0
- rs_rich-0.0.1/rich-art/tests/figlet_parity.rs +69 -0
- rs_rich-0.0.1/rich-art/tests/fixtures/halo-after.png +0 -0
- rs_rich-0.0.1/rich-art/tests/fixtures/halo-before.png +0 -0
- rs_rich-0.0.1/rich-art/tests/fixtures/halo-expected.json +29 -0
- rs_rich-0.0.1/rich-art/tests/golden/figlet.tsv +18 -0
- rs_rich-0.0.1/rich-art/tests/image_color.rs +233 -0
- rs_rich-0.0.1/rich-art/tests/image_modes.rs +269 -0
- rs_rich-0.0.1/rich-art/tests/imagediff_parity.rs +151 -0
- rs_rich-0.0.1/rich-art/tests/native_sizing_edges.rs +81 -0
- rs_rich-0.0.1/rich-art/tests/raster_acceptance.rs +100 -0
- rs_rich-0.0.1/rich-art/tests/transforms.rs +41 -0
- rs_rich-0.0.1/rich-cli/Cargo.toml +86 -0
- rs_rich-0.0.1/rich-cli/LICENSE +27 -0
- rs_rich-0.0.1/rich-cli/README.md +225 -0
- rs_rich-0.0.1/rich-cli/src/authoring.rs +269 -0
- rs_rich-0.0.1/rich-cli/src/batch.rs +745 -0
- rs_rich-0.0.1/rich-cli/src/batch_output.rs +273 -0
- rs_rich-0.0.1/rich-cli/src/batch_paths.rs +304 -0
- rs_rich-0.0.1/rich-cli/src/batch_races.rs +283 -0
- rs_rich-0.0.1/rich-cli/src/cli_spec.rs +1613 -0
- rs_rich-0.0.1/rich-cli/src/config.rs +1635 -0
- rs_rich-0.0.1/rich-cli/src/controls.rs +154 -0
- rs_rich-0.0.1/rich-cli/src/demo.rs +821 -0
- rs_rich-0.0.1/rich-cli/src/doctor.rs +357 -0
- rs_rich-0.0.1/rich-cli/src/inspect.rs +566 -0
- rs_rich-0.0.1/rich-cli/src/lib.rs +7020 -0
- rs_rich-0.0.1/rich-cli/src/main.rs +12 -0
- rs_rich-0.0.1/rich-cli/src/render_target.rs +62 -0
- rs_rich-0.0.1/rich-cli/src/structured_log.rs +72 -0
- rs_rich-0.0.1/rich-cli/src/tools.rs +542 -0
- rs_rich-0.0.1/rich-cli/src/viewers.rs +962 -0
- rs_rich-0.0.1/rich-cli/src/watch.rs +848 -0
- rs_rich-0.0.1/rich-ext/Cargo.toml +170 -0
- rs_rich-0.0.1/rich-ext/LICENSE +27 -0
- rs_rich-0.0.1/rich-ext/README.md +281 -0
- rs_rich-0.0.1/rich-ext/examples/clap_help.rs +99 -0
- rs_rich-0.0.1/rich-ext/examples/dashboard.rs +24 -0
- rs_rich-0.0.1/rich-ext/examples/diagnostic.rs +27 -0
- rs_rich-0.0.1/rich-ext/examples/expanded_release.rs +71 -0
- rs_rich-0.0.1/rich-ext/examples/guide_a11y.rs +222 -0
- rs_rich-0.0.1/rich-ext/examples/guide_ansi.rs +126 -0
- rs_rich-0.0.1/rich-ext/examples/guide_badges.rs +202 -0
- rs_rich-0.0.1/rich-ext/examples/guide_capabilities.rs +269 -0
- rs_rich-0.0.1/rich-ext/examples/guide_clap.rs +141 -0
- rs_rich-0.0.1/rich-ext/examples/guide_cli.rs +250 -0
- rs_rich-0.0.1/rich-ext/examples/guide_data.rs +336 -0
- rs_rich-0.0.1/rich-ext/examples/guide_diagnostics.rs +305 -0
- rs_rich-0.0.1/rich-ext/examples/guide_diff.rs +280 -0
- rs_rich-0.0.1/rich-ext/examples/guide_extensions.rs +221 -0
- rs_rich-0.0.1/rich-ext/examples/guide_highlighters.rs +131 -0
- rs_rich-0.0.1/rich-ext/examples/guide_live_layout.rs +252 -0
- rs_rich-0.0.1/rich-ext/examples/guide_logging.rs +358 -0
- rs_rich-0.0.1/rich-ext/examples/guide_macros.rs +227 -0
- rs_rich-0.0.1/rich-ext/examples/guide_qa.rs +415 -0
- rs_rich-0.0.1/rich-ext/examples/guide_tables_ext.rs +228 -0
- rs_rich-0.0.1/rich-ext/examples/guide_transfers.rs +266 -0
- rs_rich-0.0.1/rich-ext/examples/guide_transforms.rs +129 -0
- rs_rich-0.0.1/rich-ext/examples/guide_workflow.rs +203 -0
- rs_rich-0.0.1/rich-ext/examples/layout.rs +20 -0
- rs_rich-0.0.1/rich-ext/examples/live_regions.rs +58 -0
- rs_rich-0.0.1/rich-ext/examples/log_adapter.rs +20 -0
- rs_rich-0.0.1/rich-ext/examples/rich_handler.rs +28 -0
- rs_rich-0.0.1/rich-ext/examples/snapshot.rs +27 -0
- rs_rich-0.0.1/rich-ext/examples/structured_data.rs +51 -0
- rs_rich-0.0.1/rich-ext/examples/tracing_adapter.rs +19 -0
- rs_rich-0.0.1/rich-ext/examples/transfers.rs +123 -0
- rs_rich-0.0.1/rich-ext/examples/workflow.rs +134 -0
- rs_rich-0.0.1/rich-ext/src/a11y/contrast.rs +597 -0
- rs_rich-0.0.1/rich-ext/src/a11y/mod.rs +10 -0
- rs_rich-0.0.1/rich-ext/src/a11y/policy.rs +312 -0
- rs_rich-0.0.1/rich-ext/src/a11y/semantic.rs +523 -0
- rs_rich-0.0.1/rich-ext/src/adapters/log.rs +45 -0
- rs_rich-0.0.1/rich-ext/src/adapters/mod.rs +13 -0
- rs_rich-0.0.1/rich-ext/src/adapters/tracing.rs +253 -0
- rs_rich-0.0.1/rich-ext/src/ansi_explain.rs +1221 -0
- rs_rich-0.0.1/rich-ext/src/badge.rs +391 -0
- rs_rich-0.0.1/rich-ext/src/cancel.rs +150 -0
- rs_rich-0.0.1/rich-ext/src/capabilities.rs +1032 -0
- rs_rich-0.0.1/rich-ext/src/cli.rs +93 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/clap.rs +464 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/completion.rs +1121 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/config.rs +366 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/docs.rs +592 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/error.rs +382 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/help.rs +526 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/mod.rs +155 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/precedence.rs +287 -0
- rs_rich-0.0.1/rich-ext/src/cli_doc/spec.rs +626 -0
- rs_rich-0.0.1/rich-ext/src/countdown.rs +737 -0
- rs_rich-0.0.1/rich-ext/src/dashboard.rs +271 -0
- rs_rich-0.0.1/rich-ext/src/data/config.rs +133 -0
- rs_rich-0.0.1/rich-ext/src/data/diff.rs +182 -0
- rs_rich-0.0.1/rich-ext/src/data/dotenv.rs +209 -0
- rs_rich-0.0.1/rich-ext/src/data/explorer.rs +515 -0
- rs_rich-0.0.1/rich-ext/src/data/flatten.rs +218 -0
- rs_rich-0.0.1/rich-ext/src/data/helpers.rs +83 -0
- rs_rich-0.0.1/rich-ext/src/data/ini.rs +203 -0
- rs_rich-0.0.1/rich-ext/src/data/json.rs +102 -0
- rs_rich-0.0.1/rich-ext/src/data/mod.rs +1184 -0
- rs_rich-0.0.1/rich-ext/src/data/redact.rs +169 -0
- rs_rich-0.0.1/rich-ext/src/data/search.rs +487 -0
- rs_rich-0.0.1/rich-ext/src/data/select.rs +868 -0
- rs_rich-0.0.1/rich-ext/src/data/ser.rs +348 -0
- rs_rich-0.0.1/rich-ext/src/data/table.rs +255 -0
- rs_rich-0.0.1/rich-ext/src/data/toml_doc.rs +88 -0
- rs_rich-0.0.1/rich-ext/src/data/transform.rs +300 -0
- rs_rich-0.0.1/rich-ext/src/data/xml.rs +216 -0
- rs_rich-0.0.1/rich-ext/src/data/yaml.rs +466 -0
- rs_rich-0.0.1/rich-ext/src/derive.rs +170 -0
- rs_rich-0.0.1/rich-ext/src/diagnostic.rs +814 -0
- rs_rich-0.0.1/rich-ext/src/diff/assert.rs +287 -0
- rs_rich-0.0.1/rich-ext/src/diff/engine.rs +607 -0
- rs_rich-0.0.1/rich-ext/src/diff/git.rs +1130 -0
- rs_rich-0.0.1/rich-ext/src/diff/mod.rs +79 -0
- rs_rich-0.0.1/rich-ext/src/diff/render.rs +583 -0
- rs_rich-0.0.1/rich-ext/src/diff/source.rs +240 -0
- rs_rich-0.0.1/rich-ext/src/diff/test_report/junit.rs +459 -0
- rs_rich-0.0.1/rich-ext/src/diff/test_report/libtest.rs +231 -0
- rs_rich-0.0.1/rich-ext/src/diff/test_report/mod.rs +484 -0
- rs_rich-0.0.1/rich-ext/src/diff/transform.rs +44 -0
- rs_rich-0.0.1/rich-ext/src/diff/view.rs +417 -0
- rs_rich-0.0.1/rich-ext/src/encoding.rs +143 -0
- rs_rich-0.0.1/rich-ext/src/env_inspect.rs +548 -0
- rs_rich-0.0.1/rich-ext/src/event.rs +342 -0
- rs_rich-0.0.1/rich-ext/src/fidelity.rs +481 -0
- rs_rich-0.0.1/rich-ext/src/format.rs +336 -0
- rs_rich-0.0.1/rich-ext/src/hex.rs +415 -0
- rs_rich-0.0.1/rich-ext/src/highlighter.rs +47 -0
- rs_rich-0.0.1/rich-ext/src/hyperlink.rs +457 -0
- rs_rich-0.0.1/rich-ext/src/layout/constraints.rs +160 -0
- rs_rich-0.0.1/rich-ext/src/layout/mod.rs +9 -0
- rs_rich-0.0.1/rich-ext/src/layout/node.rs +316 -0
- rs_rich-0.0.1/rich-ext/src/layout/overflow.rs +39 -0
- rs_rich-0.0.1/rich-ext/src/layout/overflowing.rs +128 -0
- rs_rich-0.0.1/rich-ext/src/lib.rs +148 -0
- rs_rich-0.0.1/rich-ext/src/live/mod.rs +334 -0
- rs_rich-0.0.1/rich-ext/src/live/region.rs +12 -0
- rs_rich-0.0.1/rich-ext/src/log_handler.rs +579 -0
- rs_rich-0.0.1/rich-ext/src/macros.rs +204 -0
- rs_rich-0.0.1/rich-ext/src/notify.rs +457 -0
- rs_rich-0.0.1/rich-ext/src/qa/bench.rs +621 -0
- rs_rich-0.0.1/rich-ext/src/qa/explain.rs +572 -0
- rs_rich-0.0.1/rich-ext/src/qa/fuzz.rs +1261 -0
- rs_rich-0.0.1/rich-ext/src/qa/lint.rs +764 -0
- rs_rich-0.0.1/rich-ext/src/qa/matrix.rs +456 -0
- rs_rich-0.0.1/rich-ext/src/qa/mod.rs +294 -0
- rs_rich-0.0.1/rich-ext/src/qa/profile.rs +399 -0
- rs_rich-0.0.1/rich-ext/src/qa/screenshot.rs +546 -0
- rs_rich-0.0.1/rich-ext/src/qa/stress.rs +330 -0
- rs_rich-0.0.1/rich-ext/src/redact.rs +1251 -0
- rs_rich-0.0.1/rich-ext/src/registry.rs +906 -0
- rs_rich-0.0.1/rich-ext/src/sanitize.rs +111 -0
- rs_rich-0.0.1/rich-ext/src/size_bar.rs +301 -0
- rs_rich-0.0.1/rich-ext/src/source_view.rs +528 -0
- rs_rich-0.0.1/rich-ext/src/stacktrace.rs +787 -0
- rs_rich-0.0.1/rich-ext/src/table/data.rs +284 -0
- rs_rich-0.0.1/rich-ext/src/table/group.rs +297 -0
- rs_rich-0.0.1/rich-ext/src/table/mod.rs +410 -0
- rs_rich-0.0.1/rich-ext/src/table/sort.rs +265 -0
- rs_rich-0.0.1/rich-ext/src/table/stream.rs +653 -0
- rs_rich-0.0.1/rich-ext/src/table/transform.rs +26 -0
- rs_rich-0.0.1/rich-ext/src/target.rs +226 -0
- rs_rich-0.0.1/rich-ext/src/testing/conformance.rs +336 -0
- rs_rich-0.0.1/rich-ext/src/testing.rs +166 -0
- rs_rich-0.0.1/rich-ext/src/theme.rs +111 -0
- rs_rich-0.0.1/rich-ext/src/transfer.rs +1127 -0
- rs_rich-0.0.1/rich-ext/src/transform.rs +357 -0
- rs_rich-0.0.1/rich-ext/src/unicode_inspect.rs +569 -0
- rs_rich-0.0.1/rich-ext/src/workflow/command.rs +689 -0
- rs_rich-0.0.1/rich-ext/src/workflow/mod.rs +363 -0
- rs_rich-0.0.1/rich-ext/src/workflow/summary.rs +324 -0
- rs_rich-0.0.1/rich-ext/src/workflow/tasks.rs +731 -0
- rs_rich-0.0.1/rich-lumis/Cargo.toml +55 -0
- rs_rich-0.0.1/rich-lumis/LICENSE +27 -0
- rs_rich-0.0.1/rich-lumis/README.md +30 -0
- rs_rich-0.0.1/rich-lumis/src/lib.rs +449 -0
- rs_rich-0.0.1/rich-mermaid/Cargo.toml +50 -0
- rs_rich-0.0.1/rich-mermaid/LICENSE +27 -0
- rs_rich-0.0.1/rich-mermaid/README.md +60 -0
- rs_rich-0.0.1/rich-mermaid/src/flowchart.rs +990 -0
- rs_rich-0.0.1/rich-mermaid/src/layout.rs +1268 -0
- rs_rich-0.0.1/rich-mermaid/src/lib.rs +358 -0
- rs_rich-0.0.1/rich-mermaid/src/mmdc.rs +331 -0
- rs_rich-0.0.1/rich-plugin-api/Cargo.toml +36 -0
- rs_rich-0.0.1/rich-plugin-api/LICENSE +27 -0
- rs_rich-0.0.1/rich-plugin-api/README.md +32 -0
- rs_rich-0.0.1/rich-plugin-api/src/lib.rs +320 -0
- rs_rich-0.0.1/rich-py/.gitignore +6 -0
- rs_rich-0.0.1/rich-py/Cargo.lock +2806 -0
- rs_rich-0.0.1/rich-py/Cargo.toml +48 -0
- rs_rich-0.0.1/rich-py/README.md +56 -0
- rs_rich-0.0.1/rich-py/examples/star_wars.py +24 -0
- rs_rich-0.0.1/rich-py/oracles/.gitignore +1 -0
- rs_rich-0.0.1/rich-py/oracles/README.md +21 -0
- rs_rich-0.0.1/rich-py/oracles/fill_expected.py +40 -0
- rs_rich-0.0.1/rich-py/src/art/diff.rs +244 -0
- rs_rich-0.0.1/rich-py/src/art/figlet.rs +214 -0
- rs_rich-0.0.1/rich-py/src/art/gif.rs +354 -0
- rs_rich-0.0.1/rich-py/src/art/image.rs +1140 -0
- rs_rich-0.0.1/rich-py/src/art/mermaid.rs +632 -0
- rs_rich-0.0.1/rich-py/src/art.rs +319 -0
- rs_rich-0.0.1/rich-py/src/boxes.rs +104 -0
- rs_rich-0.0.1/rich-py/src/cli.rs +63 -0
- rs_rich-0.0.1/rich-py/src/code/highlighter.rs +500 -0
- rs_rich-0.0.1/rich-py/src/code/inspect.rs +450 -0
- rs_rich-0.0.1/rich-py/src/code/json.rs +170 -0
- rs_rich-0.0.1/rich-py/src/code/layout.rs +222 -0
- rs_rich-0.0.1/rich-py/src/code/markdown.rs +212 -0
- rs_rich-0.0.1/rich-py/src/code/pretty.rs +2014 -0
- rs_rich-0.0.1/rich-py/src/code/syntax.rs +783 -0
- rs_rich-0.0.1/rich-py/src/code/traceback.rs +1389 -0
- rs_rich-0.0.1/rich-py/src/code.rs +111 -0
- rs_rich-0.0.1/rich-py/src/color/emoji.rs +158 -0
- rs_rich-0.0.1/rich-py/src/color/markup.rs +58 -0
- rs_rich-0.0.1/rich-py/src/color.rs +620 -0
- rs_rich-0.0.1/rich-py/src/console.rs +2736 -0
- rs_rich-0.0.1/rich-py/src/convert.rs +136 -0
- rs_rich-0.0.1/rich-py/src/errors.rs +37 -0
- rs_rich-0.0.1/rich-py/src/ext/cli_doc.rs +927 -0
- rs_rich-0.0.1/rich-py/src/ext/common.rs +358 -0
- rs_rich-0.0.1/rich-py/src/ext/data.rs +1392 -0
- rs_rich-0.0.1/rich-py/src/ext/diagnostic.rs +1728 -0
- rs_rich-0.0.1/rich-py/src/ext/diff.rs +1091 -0
- rs_rich-0.0.1/rich-py/src/ext/inspect.rs +778 -0
- rs_rich-0.0.1/rich-py/src/ext/layout.rs +652 -0
- rs_rich-0.0.1/rich-py/src/ext/qa.rs +764 -0
- rs_rich-0.0.1/rich-py/src/ext/registry.rs +27 -0
- rs_rich-0.0.1/rich-py/src/ext/status.rs +993 -0
- rs_rich-0.0.1/rich-py/src/ext/tables.rs +886 -0
- rs_rich-0.0.1/rich-py/src/ext/terminal.rs +1313 -0
- rs_rich-0.0.1/rich-py/src/ext/transform.rs +201 -0
- rs_rich-0.0.1/rich-py/src/ext/widgets.rs +680 -0
- rs_rich-0.0.1/rich-py/src/ext/workflow.rs +1018 -0
- rs_rich-0.0.1/rich-py/src/ext.rs +46 -0
- rs_rich-0.0.1/rich-py/src/lib.rs +87 -0
- rs_rich-0.0.1/rich-py/src/limits.rs +69 -0
- rs_rich-0.0.1/rich-py/src/live/glue.py +279 -0
- rs_rich-0.0.1/rich-py/src/live/live_display.rs +886 -0
- rs_rich-0.0.1/rich-py/src/live/live_render.rs +252 -0
- rs_rich-0.0.1/rich-py/src/live/logging.rs +358 -0
- rs_rich-0.0.1/rich-py/src/live/progress.rs +2956 -0
- rs_rich-0.0.1/rich-py/src/live/progress_bar.rs +316 -0
- rs_rich-0.0.1/rich-py/src/live/prompt.rs +453 -0
- rs_rich-0.0.1/rich-py/src/live/screen.rs +529 -0
- rs_rich-0.0.1/rich-py/src/live/status.rs +424 -0
- rs_rich-0.0.1/rich-py/src/live/util.rs +408 -0
- rs_rich-0.0.1/rich-py/src/live.rs +107 -0
- rs_rich-0.0.1/rich-py/src/panel.rs +418 -0
- rs_rich-0.0.1/rich-py/src/plugins/adapters.rs +603 -0
- rs_rich-0.0.1/rich-py/src/plugins/code.rs +679 -0
- rs_rich-0.0.1/rich-py/src/plugins/errors.rs +237 -0
- rs_rich-0.0.1/rich-py/src/plugins/plugin.rs +410 -0
- rs_rich-0.0.1/rich-py/src/plugins/registry.rs +533 -0
- rs_rich-0.0.1/rich-py/src/plugins/types.rs +285 -0
- rs_rich-0.0.1/rich-py/src/plugins.rs +52 -0
- rs_rich-0.0.1/rich-py/src/protocol.rs +475 -0
- rs_rich-0.0.1/rich-py/src/renderable.rs +925 -0
- rs_rich-0.0.1/rich-py/src/renderables/align.rs +460 -0
- rs_rich-0.0.1/rich-py/src/renderables/bar.rs +158 -0
- rs_rich-0.0.1/rich-py/src/renderables/columns.rs +245 -0
- rs_rich-0.0.1/rich-py/src/renderables/constrain.rs +160 -0
- rs_rich-0.0.1/rich-py/src/renderables/containers.rs +284 -0
- rs_rich-0.0.1/rich-py/src/renderables/layout.rs +903 -0
- rs_rich-0.0.1/rich-py/src/renderables/padding.rs +234 -0
- rs_rich-0.0.1/rich-py/src/renderables/rule.rs +182 -0
- rs_rich-0.0.1/rich-py/src/renderables/spinner.rs +423 -0
- rs_rich-0.0.1/rich-py/src/renderables/tree.rs +238 -0
- rs_rich-0.0.1/rich-py/src/renderables.rs +226 -0
- rs_rich-0.0.1/rich-py/src/segment.rs +249 -0
- rs_rich-0.0.1/rich-py/src/style.rs +847 -0
- rs_rich-0.0.1/rich-py/src/table.rs +848 -0
- rs_rich-0.0.1/rich-py/src/terminal_theme.rs +92 -0
- rs_rich-0.0.1/rich-py/src/text/lines.rs +166 -0
- rs_rich-0.0.1/rich-py/src/text/ops.rs +428 -0
- rs_rich-0.0.1/rich-py/src/text.rs +1238 -0
- rs_rich-0.0.1/rich-py/src/theme.rs +211 -0
- rs_rich-0.0.1/rich-py/tests/conftest.py +46 -0
- rs_rich-0.0.1/rich-py/tests/smoke.py +39 -0
- rs_rich-0.0.1/rich-py/tests/test_api.py +113 -0
- rs_rich-0.0.1/rich-py/tests/test_art.py +935 -0
- rs_rich-0.0.1/rich-py/tests/test_cli.py +312 -0
- rs_rich-0.0.1/rich-py/tests/test_code.py +645 -0
- rs_rich-0.0.1/rich-py/tests/test_compat.py +400 -0
- rs_rich-0.0.1/rich-py/tests/test_console.py +487 -0
- rs_rich-0.0.1/rich-py/tests/test_docs.py +98 -0
- rs_rich-0.0.1/rich-py/tests/test_ext.py +67 -0
- rs_rich-0.0.1/rich-py/tests/test_ext_data.py +200 -0
- rs_rich-0.0.1/rich-py/tests/test_ext_diagnostic.py +281 -0
- rs_rich-0.0.1/rich-py/tests/test_ext_diff.py +178 -0
- rs_rich-0.0.1/rich-py/tests/test_ext_expected.py +302 -0
- rs_rich-0.0.1/rich-py/tests/test_ext_inspect.py +185 -0
- rs_rich-0.0.1/rich-py/tests/test_ext_layout.py +212 -0
- rs_rich-0.0.1/rich-py/tests/test_ext_terminal.py +219 -0
- rs_rich-0.0.1/rich-py/tests/test_ext_workflow.py +309 -0
- rs_rich-0.0.1/rich-py/tests/test_integration.py +367 -0
- rs_rich-0.0.1/rich-py/tests/test_live.py +686 -0
- rs_rich-0.0.1/rich-py/tests/test_mermaid.py +647 -0
- rs_rich-0.0.1/rich-py/tests/test_modules.py +126 -0
- rs_rich-0.0.1/rich-py/tests/test_panel.py +189 -0
- rs_rich-0.0.1/rich-py/tests/test_plugins.py +899 -0
- rs_rich-0.0.1/rich-py/tests/test_protocol.py +328 -0
- rs_rich-0.0.1/rich-py/tests/test_renderables.py +557 -0
- rs_rich-0.0.1/rich-py/tests/test_robustness_console.py +372 -0
- rs_rich-0.0.1/rich-py/tests/test_robustness_extras.py +300 -0
- rs_rich-0.0.1/rich-py/tests/test_robustness_live.py +221 -0
- rs_rich-0.0.1/rich-py/tests/test_robustness_renderables.py +403 -0
- rs_rich-0.0.1/rich-py/tests/test_style.py +68 -0
- rs_rich-0.0.1/rich-py/tests/test_table.py +184 -0
- rs_rich-0.0.1/rich-py/tests/test_text.py +179 -0
- rs_rich-0.0.1/rich-py/tests/test_text_style.py +743 -0
rs_rich-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rs-rich
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
5
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: Programming Language :: Rust
|
|
8
|
+
Classifier: Topic :: Terminals
|
|
9
|
+
Summary: Rich-compatible terminal rendering, backed by the rs-rich Rust port
|
|
10
|
+
License: MIT
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
|
+
Project-URL: Documentation, https://buchochelliq-labs.github.io/rs-rich-cli/python/
|
|
14
|
+
Project-URL: Repository, https://github.com/buchochelliq-labs/rs-rich-cli
|
|
15
|
+
|
|
16
|
+
# rs-rich (Python)
|
|
17
|
+
|
|
18
|
+
Rich-compatible terminal rendering for Python, backed by
|
|
19
|
+
[rs-rich](https://github.com/buchochelliq-labs/rs-rich-cli), a Rust port of
|
|
20
|
+
[Rich](https://github.com/Textualize/rich).
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install rs-rich
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Documentation: <https://buchochelliq-labs.github.io/rs-rich-cli/python/>, with a
|
|
27
|
+
[getting started guide](https://buchochelliq-labs.github.io/rs-rich-cli/python/getting-started/)
|
|
28
|
+
and an API reference for every module.
|
|
29
|
+
|
|
30
|
+
Move a Rich program over by changing its imports:
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from rs_rich.console import Console # was: from rich.console import Console
|
|
34
|
+
from rs_rich.table import Table # was: from rich.table import Table
|
|
35
|
+
|
|
36
|
+
table = Table(title="Star Wars Movies")
|
|
37
|
+
table.add_column("Released", justify="right", style="cyan", no_wrap=True)
|
|
38
|
+
table.add_column("Title", style="magenta")
|
|
39
|
+
table.add_row("Dec 20, 2019", "Star Wars: The Rise of Skywalker")
|
|
40
|
+
|
|
41
|
+
console = Console()
|
|
42
|
+
console.print(table)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
All rendering happens in Rust. The Python package only maps Rich's classes
|
|
46
|
+
and arguments onto the Rust ones, so output matches Rich 15.0.0 byte for
|
|
47
|
+
byte (the documentation's Python section lists the few known differences).
|
|
48
|
+
What the port cannot do (Jupyter output, a handful of `Table` options) raises
|
|
49
|
+
`NotImplementedError` rather than rendering something different.
|
|
50
|
+
|
|
51
|
+
## What is in it
|
|
52
|
+
|
|
53
|
+
| | Modules |
|
|
54
|
+
|---|---|
|
|
55
|
+
| All of Rich's API | `rs_rich` (`print`, `print_json`, `inspect`, ...), `console`, `text`, `style`, `color`, `theme`, `markup`, `emoji`, `segment`, `measure`, `box`, `errors`, `terminal_theme`, `table`, `panel`, `rule`, `padding`, `align`, `constrain`, `styled`, `bar`, `spinner`, `columns`, `containers`, `layout`, `tree`, `markdown`, `syntax`, `pretty`, `json`, `highlighter`, `traceback`, `live`, `live_render`, `status`, `screen`, `pager`, `progress`, `progress_bar`, `prompt`, `logging` |
|
|
56
|
+
| rs-rich's extensions | `rs_rich.ext` and its 38 submodules: diagnostics, structured data, diffs and test reports, transforms, workflows, tables and badges, terminal capabilities, inspectors, live layouts, CLI docs, testing and QA |
|
|
57
|
+
| Images and diagrams | `rs_rich.art` (images, Sixel, FIGlet, GIFs, image diffs; Pillow images when Pillow is installed), `rs_rich.mermaid` |
|
|
58
|
+
| Plugins | `rs_rich.plugins`: write highlighters, code highlighters, themes, boxes, renderers, fence renderers and transforms in Python, checked by the Rust plugin host |
|
|
59
|
+
| The command line | `python -m rs_rich` and the `rich-rs` script: rs-rich's `rich` command |
|
|
60
|
+
|
|
61
|
+
Your own classes render through `__rich__`, `__rich_console__` and
|
|
62
|
+
`__rich_measure__`, anywhere a renderable goes.
|
|
63
|
+
|
|
64
|
+
The `lumis` (tree-sitter) code highlighter is a separate build
|
|
65
|
+
(`maturin build --features lumis`), and Mermaid's `mmdc` backend needs
|
|
66
|
+
`--features mmdc` and Mermaid's own CLI.
|
|
67
|
+
|
|
68
|
+
## Versions
|
|
69
|
+
|
|
70
|
+
The package has its own version (0.0.1) and is released from `python-v…`
|
|
71
|
+
tags. It bundles the rs-rich Rust crate from the same commit.
|
|
72
|
+
|
rs_rich-0.0.1/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# rs-rich (Python)
|
|
2
|
+
|
|
3
|
+
Rich-compatible terminal rendering for Python, backed by
|
|
4
|
+
[rs-rich](https://github.com/buchochelliq-labs/rs-rich-cli), a Rust port of
|
|
5
|
+
[Rich](https://github.com/Textualize/rich).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install rs-rich
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Documentation: <https://buchochelliq-labs.github.io/rs-rich-cli/python/>, with a
|
|
12
|
+
[getting started guide](https://buchochelliq-labs.github.io/rs-rich-cli/python/getting-started/)
|
|
13
|
+
and an API reference for every module.
|
|
14
|
+
|
|
15
|
+
Move a Rich program over by changing its imports:
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from rs_rich.console import Console # was: from rich.console import Console
|
|
19
|
+
from rs_rich.table import Table # was: from rich.table import Table
|
|
20
|
+
|
|
21
|
+
table = Table(title="Star Wars Movies")
|
|
22
|
+
table.add_column("Released", justify="right", style="cyan", no_wrap=True)
|
|
23
|
+
table.add_column("Title", style="magenta")
|
|
24
|
+
table.add_row("Dec 20, 2019", "Star Wars: The Rise of Skywalker")
|
|
25
|
+
|
|
26
|
+
console = Console()
|
|
27
|
+
console.print(table)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
All rendering happens in Rust. The Python package only maps Rich's classes
|
|
31
|
+
and arguments onto the Rust ones, so output matches Rich 15.0.0 byte for
|
|
32
|
+
byte (the documentation's Python section lists the few known differences).
|
|
33
|
+
What the port cannot do (Jupyter output, a handful of `Table` options) raises
|
|
34
|
+
`NotImplementedError` rather than rendering something different.
|
|
35
|
+
|
|
36
|
+
## What is in it
|
|
37
|
+
|
|
38
|
+
| | Modules |
|
|
39
|
+
|---|---|
|
|
40
|
+
| All of Rich's API | `rs_rich` (`print`, `print_json`, `inspect`, ...), `console`, `text`, `style`, `color`, `theme`, `markup`, `emoji`, `segment`, `measure`, `box`, `errors`, `terminal_theme`, `table`, `panel`, `rule`, `padding`, `align`, `constrain`, `styled`, `bar`, `spinner`, `columns`, `containers`, `layout`, `tree`, `markdown`, `syntax`, `pretty`, `json`, `highlighter`, `traceback`, `live`, `live_render`, `status`, `screen`, `pager`, `progress`, `progress_bar`, `prompt`, `logging` |
|
|
41
|
+
| rs-rich's extensions | `rs_rich.ext` and its 38 submodules: diagnostics, structured data, diffs and test reports, transforms, workflows, tables and badges, terminal capabilities, inspectors, live layouts, CLI docs, testing and QA |
|
|
42
|
+
| Images and diagrams | `rs_rich.art` (images, Sixel, FIGlet, GIFs, image diffs; Pillow images when Pillow is installed), `rs_rich.mermaid` |
|
|
43
|
+
| Plugins | `rs_rich.plugins`: write highlighters, code highlighters, themes, boxes, renderers, fence renderers and transforms in Python, checked by the Rust plugin host |
|
|
44
|
+
| The command line | `python -m rs_rich` and the `rich-rs` script: rs-rich's `rich` command |
|
|
45
|
+
|
|
46
|
+
Your own classes render through `__rich__`, `__rich_console__` and
|
|
47
|
+
`__rich_measure__`, anywhere a renderable goes.
|
|
48
|
+
|
|
49
|
+
The `lumis` (tree-sitter) code highlighter is a separate build
|
|
50
|
+
(`maturin build --features lumis`), and Mermaid's `mmdc` backend needs
|
|
51
|
+
`--features mmdc` and Mermaid's own CLI.
|
|
52
|
+
|
|
53
|
+
## Versions
|
|
54
|
+
|
|
55
|
+
The package has its own version (0.0.1) and is released from `python-v…`
|
|
56
|
+
tags. It bundles the rs-rich Rust crate from the same commit.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.8,<2"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "rs-rich"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
description = "Rich-compatible terminal rendering, backed by the rs-rich Rust port"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Rust",
|
|
17
|
+
"Topic :: Terminals",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
# `rich` belongs to rich-cli; this package's command is `rich-rs`.
|
|
22
|
+
rich-rs = "rs_rich.cli:main"
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Repository = "https://github.com/buchochelliq-labs/rs-rich-cli"
|
|
26
|
+
Documentation = "https://buchochelliq-labs.github.io/rs-rich-cli/python/"
|
|
27
|
+
|
|
28
|
+
[tool.maturin]
|
|
29
|
+
module-name = "rs_rich._native"
|
|
30
|
+
features = ["extension-module"]
|
|
31
|
+
manifest-path = "rich-py/Cargo.toml"
|
|
32
|
+
python-source = "python"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Rich-compatible terminal rendering, backed by the rs-rich Rust port.
|
|
2
|
+
|
|
3
|
+
Every class here is implemented in Rust (``rs_rich._native``); these modules
|
|
4
|
+
only re-export them under Rich's module paths, so a program can move from
|
|
5
|
+
``rich`` by changing its imports. See the supported surface in the README.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from typing import IO, Any, Optional
|
|
9
|
+
|
|
10
|
+
from . import _native
|
|
11
|
+
from ._native import __version__
|
|
12
|
+
from .console import Console
|
|
13
|
+
|
|
14
|
+
__all__ = ["Console", "__version__", "get_console", "inspect", "print", "print_json", "reconfigure"]
|
|
15
|
+
|
|
16
|
+
_console: Optional[Console] = None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def get_console() -> Console:
|
|
20
|
+
"""The global console ``rs_rich.print`` writes to, created on first use."""
|
|
21
|
+
global _console
|
|
22
|
+
if _console is None:
|
|
23
|
+
_console = Console()
|
|
24
|
+
return _console
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def reconfigure(**kwargs: Any) -> None:
|
|
28
|
+
"""``rich.reconfigure``: replace the global console with ``Console(**kwargs)``.
|
|
29
|
+
|
|
30
|
+
Rich changes the existing console in place; rs_rich's native console
|
|
31
|
+
cannot be, so ``get_console()`` returns a new object afterwards.
|
|
32
|
+
"""
|
|
33
|
+
global _console
|
|
34
|
+
_console = Console(**kwargs)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def print( # noqa: A001
|
|
38
|
+
*objects: Any,
|
|
39
|
+
sep: str = " ",
|
|
40
|
+
end: str = "\n",
|
|
41
|
+
file: Optional[IO[str]] = None,
|
|
42
|
+
flush: bool = False,
|
|
43
|
+
) -> None:
|
|
44
|
+
"""``rich.print``: print objects to the global console (or to ``file``)."""
|
|
45
|
+
write_console = get_console() if file is None else Console(file=file)
|
|
46
|
+
write_console.print(*objects, sep=sep, end=end)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def print_json(json: Optional[str] = None, *, data: Any = None, **kwargs: Any) -> None:
|
|
50
|
+
"""``rich.print_json``: pretty-print JSON on the global console."""
|
|
51
|
+
get_console().print_json(json, data=data, **kwargs)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def inspect(obj: Any, **kwargs: Any) -> None:
|
|
55
|
+
"""``rich.inspect``: provided by ``_native.inspect`` once the code area adds it."""
|
|
56
|
+
implementation = getattr(_native, "inspect", None)
|
|
57
|
+
if implementation is None:
|
|
58
|
+
raise NotImplementedError("rs_rich.inspect is not implemented yet")
|
|
59
|
+
kwargs.setdefault("console", get_console())
|
|
60
|
+
implementation(obj, **kwargs)
|