Compare commits
3 Commits
c44f5de168
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c5b5d8299 | |||
| b5be627097 | |||
| 51410b3321 |
12
README.md
12
README.md
@@ -1,3 +1,13 @@
|
|||||||
# ytdlp-tui
|
# ytdlp-tui
|
||||||
|
|
||||||
A TUI wrapper for my yt-dlp commands
|
A TUI wrapper for my yt-dlp commands
|
||||||
|
|
||||||
|
This is a little tool to collect all my yt-dlp commands in one CLI app.
|
||||||
|
It aims to teach me how to write an TUI application in python.
|
||||||
|
|
||||||
|
## Libaries used
|
||||||
|
|
||||||
|
- pytest
|
||||||
|
- textual
|
||||||
|
- textual-dev (for command line development)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
pytest
|
||||||
|
textual
|
||||||
|
textual-dev
|
||||||
|
|||||||
0
src/dl-tui/__init__.py
Normal file
0
src/dl-tui/__init__.py
Normal file
20
src/dl-tui/ytdlp-tui.py
Normal file
20
src/dl-tui/ytdlp-tui.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# from dllib.logger import logger
|
||||||
|
|
||||||
|
from textual.app import App, ComposeResult
|
||||||
|
from textual.widgets import Label, Button
|
||||||
|
|
||||||
|
|
||||||
|
class QuestionApp(App[str]):
|
||||||
|
def compose(self) -> ComposeResult:
|
||||||
|
yield Label("Do you love Textual?")
|
||||||
|
yield Button("Yes", id="yes", variant="primary")
|
||||||
|
yield Button("No", id="no", variant="error")
|
||||||
|
|
||||||
|
def on_button_pressed(self, event: Button.Pressed) -> None:
|
||||||
|
self.exit(event.button.id)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app = QuestionApp()
|
||||||
|
reply = app.run()
|
||||||
|
print(reply)
|
||||||
0
src/dllib/__init__.py
Normal file
0
src/dllib/__init__.py
Normal file
Reference in New Issue
Block a user