Skip to content

Commit ca4af0c

Browse files
committed
more projects
1 parent 7451a4d commit ca4af0c

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

src/textual/demo2/projects.py

+29-31
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,14 @@ class ProjectInfo:
2222
"Posting",
2323
"Darren Burns",
2424
"https://posting.sh/",
25-
"""A powerful HTTP client that lives in your terminal.
26-
27-
Posting is an HTTP client, not unlike Postman and Insomnia. As a TUI application, it can be used over SSH and enables efficient keyboard-centric workflows. """,
25+
"""Posting is an HTTP client, not unlike Postman and Insomnia. As a TUI application, it can be used over SSH and enables efficient keyboard-centric workflows. """,
2826
"4.7k",
2927
),
3028
ProjectInfo(
3129
"Memray",
3230
"Bloomberg",
3331
"https://github.com/bloomberg/memray",
34-
"""Memray is a memory profiler for Python. It can track memory allocations in Python code, in native extension modules, and in the Python interpreter itself. It can generate several different types of reports to help you analyze the captured memory usage data.""",
32+
"""Memray is a memory profiler for Python. It can track memory allocations in Python code, in native extension modules, and in the Python interpreter itself.""",
3533
"13.2k",
3634
),
3735
ProjectInfo(
@@ -52,8 +50,7 @@ class ProjectInfo:
5250
"Harlequin",
5351
"Ted Conbeer",
5452
"https://harlequin.sh/",
55-
"""Portable, powerful, colorful.
56-
An easy, fast, and beautiful database client for the terminal.""",
53+
"""Portable, powerful, colorful. An easy, fast, and beautiful database client for the terminal.""",
5754
"3.7k",
5855
),
5956
ProjectInfo(
@@ -68,9 +65,7 @@ class ProjectInfo:
6865
"Trogon",
6966
"Textualize",
7067
"https://github.com/Textualize/trogon",
71-
"""Auto-generate friendly terminal user interfaces for command line apps.
72-
73-
Trogon works with the popular Click library for Python, but will support other libraries and languages in the future.""",
68+
"Auto-generate friendly terminal user interfaces for command line apps.",
7469
"2.5k",
7570
),
7671
ProjectInfo(
@@ -84,18 +79,14 @@ class ProjectInfo:
8479
"RecoverPy",
8580
"Pablo Lecolinet",
8681
"https://github.com/PabloLec/RecoverPy",
87-
"""RecoverPy is a powerful tool that leverages your system capabilities to recover lost files.
88-
89-
Unlike others, you can not only recover deleted files but also overwritten data.""",
82+
"""RecoverPy is a powerful tool that leverages your system capabilities to recover lost files.""",
9083
"1.3k",
9184
),
9285
ProjectInfo(
9386
"Frogmouth",
9487
"Dave Pearson",
9588
"https://github.com/Textualize/frogmouth",
96-
"""Frogmouth is a Markdown viewer / browser for your terminal, built with Textual.
97-
98-
Frogmouth can open *.md files locally or via a URL. There is a familiar browser-like navigation stack, history, bookmarks, and table of contents.""",
89+
"""Frogmouth is a Markdown viewer / browser for your terminal, built with Textual.""",
9990
"2.5k",
10091
),
10192
ProjectInfo(
@@ -105,6 +96,20 @@ class ProjectInfo:
10596
"The text-based terminal client for Ollama.",
10697
"1k",
10798
),
99+
ProjectInfo(
100+
"logmerger",
101+
"Paul McGuire",
102+
"https://github.com/ptmcg/logmerger",
103+
"logmerger is a TUI for viewing a merged display of multiple log files, merged by timestamp.",
104+
"162",
105+
),
106+
ProjectInfo(
107+
"doit",
108+
"Murli Tawari",
109+
"https://github.com/kraanzu/dooit",
110+
"A todo manager that you didn't ask for, but needed!",
111+
"2.1k",
112+
),
108113
]
109114

110115

@@ -138,7 +143,6 @@ class Project(Vertical, can_focus=True):
138143
border: tall transparent;
139144
opacity: 0.8;
140145
box-sizing: border-box;
141-
142146
&:focus-within {
143147
border: tall $accent;
144148
background: $primary 40%;
@@ -176,12 +180,13 @@ def __init__(self, project_info: ProjectInfo) -> None:
176180
super().__init__()
177181

178182
def compose(self) -> ComposeResult:
183+
info = self.project_info
179184
with Horizontal(classes="header"):
180-
yield Label(self.project_info.title, id="title")
181-
yield Label(f"★ {self.project_info.stars}", classes="stars")
182-
yield Label(self.project_info.author, id="author")
183-
yield Link(self.project_info.url)
184-
yield Static(self.project_info.description, classes="description")
185+
yield Label(info.title, id="title")
186+
yield Label(f"★ {info.stars}", classes="stars")
187+
yield Label(info.author, id="author")
188+
yield Link(info.url)
189+
yield Static(info.description, classes="description")
185190

186191
@on(events.Enter)
187192
@on(events.Leave)
@@ -195,24 +200,17 @@ def action_open_repository(self) -> None:
195200

196201
class ProjectsScreen(PageScreen):
197202
DEFAULT_CSS = """
198-
ProjectsScreen {
199-
200-
# margin: 1;
203+
ProjectsScreen {
201204
Grid {
202205
margin: 1 2;
203206
padding: 1 2;
204207
background: $boost;
205208
width: 1fr;
206-
height: auto;
207-
# grid-size: 2;
209+
height: auto;
208210
grid-gutter: 1 1;
209211
grid-rows: auto;
210212
hatch: right $accent 80%;
211-
keyline:heavy $secondary;
212-
213-
}
214-
Placeholder {
215-
height: auto;
213+
keyline:heavy $secondary;
216214
}
217215
}
218216
"""

0 commit comments

Comments
 (0)