-
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.
- Loading branch information
1 parent
a3091f5
commit 5e7f75d
Showing
4 changed files
with
37 additions
and
29 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
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 |
---|---|---|
|
@@ -50,27 +50,13 @@ def get_console(self, rule: str = "") -> Console: | |
:param rule: string to match a specific highlighting rule | ||
""" | ||
theme = self.get_theme() | ||
match rule: | ||
case "openstack": | ||
highlighter_object = OpenstackRegexHighlighter() | ||
return Console(highlighter=OpenstackRegexHighlighter(), theme=theme) | ||
case "juju": | ||
highlighter_object = JujuRegexHighlighter() | ||
return Console(highlighter=JujuRegexHighlighter(), theme=theme) | ||
case "kubernetes": | ||
highlighter_object = KubernetesRegexHighlighter() | ||
return Console(highlighter=KubernetesRegexHighlighter(), theme=theme) | ||
case _: | ||
highlighter_object = None | ||
if highlighter_object: | ||
return Console(highlighter=highlighter_object, theme=self.get_theme()) | ||
return Console() | ||
|
||
|
||
# if __name__ == "__main__": | ||
# string = "Send cloud disabled lost XXX funds :) to [email protected] " | ||
# string += "downbadxxx xxx and active make it ACTIVE lol but not 2023-10-10 down" | ||
|
||
# dc = Dispatcher() | ||
# console = dc.get_console("openstack") | ||
# console.print(string) | ||
|
||
# console = dc.get_console() | ||
# console.print(string) | ||
return Console() |
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