-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge pull request #55 from davep/tidy-commands
Tidy up everything to do with messages, commands and command providers
- Loading branch information
Showing
15 changed files
with
140 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,66 @@ | ||
"""Provides the command palette command provides for the application.""" | ||
"""Provides command-oriented messages for the application. | ||
These messages differ a little from other messages in that they have a | ||
common base class and provide information such as help text, binding | ||
information, etc. | ||
""" | ||
|
||
############################################################################## | ||
# Local imports. | ||
from .collections import CollectionCommands | ||
from .commands_provider import CommandsProvider | ||
from .main import MainCommands | ||
from .tags import TagCommands | ||
from .base import Command | ||
from .commands import ( | ||
AddRaindrop, | ||
ChangeTheme, | ||
CheckTheWaybackMachine, | ||
ClearFilters, | ||
CompactMode, | ||
CopyLinkToClipboard, | ||
DeleteRaindrop, | ||
Details, | ||
EditRaindrop, | ||
Escape, | ||
Help, | ||
Logout, | ||
Quit, | ||
Redownload, | ||
Search, | ||
SearchCollections, | ||
SearchTags, | ||
ShowAll, | ||
ShowUnsorted, | ||
ShowUntagged, | ||
TagOrder, | ||
VisitLink, | ||
VisitRaindrop, | ||
) | ||
|
||
############################################################################## | ||
# Exports. | ||
__all__ = ["CollectionCommands", "CommandsProvider", "MainCommands", "TagCommands"] | ||
__all__ = [ | ||
"Command", | ||
"AddRaindrop", | ||
"ChangeTheme", | ||
"CheckTheWaybackMachine", | ||
"ClearFilters", | ||
"CompactMode", | ||
"CopyLinkToClipboard", | ||
"DeleteRaindrop", | ||
"Details", | ||
"EditRaindrop", | ||
"Escape", | ||
"Help", | ||
"Logout", | ||
"Quit", | ||
"Redownload", | ||
"Search", | ||
"SearchCollections", | ||
"SearchTags", | ||
"ShowAll", | ||
"ShowUnsorted", | ||
"ShowUntagged", | ||
"TagOrder", | ||
"VisitLink", | ||
"VisitRaindrop", | ||
] | ||
|
||
### __init__.py ends here |
File renamed without changes.
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
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,34 @@ | ||
"""The main application messages.""" | ||
|
||
############################################################################## | ||
# Python imports. | ||
from dataclasses import dataclass | ||
|
||
############################################################################## | ||
# Textual imports. | ||
from textual.message import Message | ||
|
||
############################################################################## | ||
# Local imports. | ||
from ...raindrop import Collection, Tag | ||
|
||
|
||
############################################################################## | ||
@dataclass | ||
class ShowCollection(Message): | ||
"""A message that requests that a particular collection is shown.""" | ||
|
||
collection: Collection | ||
"""The collection to show.""" | ||
|
||
|
||
############################################################################## | ||
@dataclass | ||
class ShowTagged(Message): | ||
"""A message that requests that Raindrops with a particular tag are shown.""" | ||
|
||
tag: Tag | ||
"""The tag to show.""" | ||
|
||
|
||
### main.py ends here |
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,14 @@ | ||
"""Provides the command palette command provides for the application.""" | ||
|
||
############################################################################## | ||
# Local imports. | ||
from .collections import CollectionCommands | ||
from .commands_provider import CommandsProvider | ||
from .main import MainCommands | ||
from .tags import TagCommands | ||
|
||
############################################################################## | ||
# Exports. | ||
__all__ = ["CollectionCommands", "CommandsProvider", "MainCommands", "TagCommands"] | ||
|
||
### __init__.py ends here |
File renamed without changes.
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
File renamed without changes.
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
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
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