mirror of
https://github.com/Textualize/rich.git
synced 2025-07-07 21:04:58 +00:00
more scrubbing
This commit is contained in:
parent
0852511024
commit
365932b7d9
3 changed files with 11 additions and 27 deletions
|
@ -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.
|
||||
|
|
|
@ -10,10 +10,9 @@ from rich.align import Align
|
|||
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()
|
||||
|
||||
|
@ -40,34 +39,26 @@ def make_sponsor_message() -> Panel:
|
|||
sponsor_message = Table.grid(padding=1)
|
||||
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",
|
||||
)
|
||||
sponsor_message.add_row(
|
||||
"Twitter",
|
||||
"[u blue link=https://twitter.com/textualize]https://twitter.com/textualize",
|
||||
)
|
||||
sponsor_message.add_row(
|
||||
"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 @@ layout["box1"].update(Panel(layout.tree, border_style="red"))
|
|||
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)
|
||||
|
|
|
@ -227,10 +227,6 @@ if __name__ == "__main__": # pragma: no cover
|
|||
|
||||
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 @@ if __name__ == "__main__": # pragma: no cover
|
|||
"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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue