mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
readme
This commit is contained in:
parent
3a950e8d43
commit
7f3f0a8f74
9 changed files with 70 additions and 10 deletions
|
@ -11,7 +11,7 @@ Welcome to Rich's documentation!
|
|||
:caption: Contents:
|
||||
|
||||
introduction.rst
|
||||
console.rst
|
||||
console.rst
|
||||
style.rst
|
||||
markup.rst
|
||||
tables.rst
|
||||
|
|
|
@ -9,7 +9,7 @@ Use Rich to make command line applications more visually appealing and present d
|
|||
Installation
|
||||
------------
|
||||
|
||||
You can install Rich with your favorite PyPi package manager::
|
||||
You can install Rich with from PyPi with `pip` or your favorite package manager::
|
||||
|
||||
pip install rich
|
||||
|
||||
|
|
|
@ -19,4 +19,3 @@ Rich can render Markdown to the console. To render markdown, construct a :class:
|
|||
console.print(md)
|
||||
|
||||
Note that code blocks are rendered with full syntax highlighting!
|
||||
|
|
@ -10,9 +10,9 @@ One way to add a style to Text is the :meth:`~tich.text.Text.styleize` method wh
|
|||
text.styleize(0, 6, "bold magenta")
|
||||
console.print(text)
|
||||
|
||||
This will print "Hello, World!" to the terminal, with the first word in bold.
|
||||
This will print "Hello, World!" to the terminal, with the first word in bold magenta.
|
||||
|
||||
Alternatively, you can construct style text by calling :meth:`~rich.text.Text.append` to add a string and style to the end of the Text. Here's an example::
|
||||
Alternatively, you can construct styled text by calling :meth:`~rich.text.Text.append` to add a string and style to the end of the Text. Here's an example::
|
||||
|
||||
text = Text()
|
||||
text.append("Hello", style="bold magenta")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue