-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,646 additions
and
1,497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,4 +160,4 @@ cython_debug/ | |
#.idea/ | ||
|
||
.DS_Store | ||
/.vscode/launch.json | ||
/media |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Module", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "textual_dev", | ||
"args": ["run", "--dev", "sachi:SachiApp"], | ||
"cwd": "${input:cwd}", | ||
"preLaunchTask": "Textual Development Console", | ||
"justMyCode": true | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "cwd", | ||
"description": "Current working directory", | ||
"type": "promptString", | ||
"default": "${workspaceFolder}/media" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Textual Development Console", | ||
"type": "process", | ||
"command": "poetry", | ||
"args": ["run", "textual", "console"], | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "always" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from sachi.cli import app | ||
from sachi.engine import SachiEngine | ||
from sachi.app import SachiApp | ||
from sachi.cli import cli_app | ||
|
||
__all__ = [ | ||
"app", | ||
"SachiEngine", | ||
"SachiApp", | ||
"cli_app", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from sachi.cli import app | ||
from sachi.cli import cli_app | ||
|
||
if __name__ == "__main__": | ||
app() | ||
cli_app() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from pathlib import Path | ||
|
||
from textual.app import App | ||
|
||
from sachi.screens.episodes import EpisodesScreen | ||
from sachi.screens.rename import RenameScreen | ||
|
||
|
||
class SachiApp(App): | ||
TITLE = "Sachi" | ||
CSS_PATH = __file__.replace(".py", ".tcss") | ||
SCREENS = { | ||
"episodes": EpisodesScreen(), | ||
} | ||
BINDINGS = [ | ||
("1", "switch_screen('rename')", "Rename"), | ||
("2", "switch_screen('episodes')", "Episodes"), | ||
("q", "quit", "Quit"), | ||
] | ||
|
||
def __init__(self, file_or_dir: Path = Path.cwd(), **kwargs): | ||
super().__init__(**kwargs) | ||
self.file_or_dir = file_or_dir | ||
|
||
def on_mount(self): | ||
rename_screen = RenameScreen(self.file_or_dir) | ||
self.install_screen(rename_screen, name="rename") | ||
self.push_screen(rename_screen) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.