diff --git a/riocli/constants/__init__.py b/riocli/constants/__init__.py new file mode 100644 index 00000000..67fb31a4 --- /dev/null +++ b/riocli/constants/__init__.py @@ -0,0 +1,18 @@ +# Copyright 2023 Rapyuta Robotics +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from riocli.constants.colors import Colors +from riocli.constants.symbols import Symbols + +__all__ = [Colors, Symbols] diff --git a/riocli/constants/colors.py b/riocli/constants/colors.py new file mode 100644 index 00000000..e2be344e --- /dev/null +++ b/riocli/constants/colors.py @@ -0,0 +1,41 @@ +# Copyright 2023 Rapyuta Robotics +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from enum import Enum + + +class Colors(str, Enum): + """ + Colors is a str enum based on the colors supported by click. + https://github.com/pallets/click/blob/main/examples/colors/colors.py + """ + def __str__(self): + return str(self.value).lower() + + BLACK = 'black' + RED = 'red' + GREEN = 'green' + YELLOW = 'yellow' + BLUE = 'blue' + MAGENTA = 'magenta' + CYAN = 'cyan' + WHITE = 'white' + BRIGHT_BLACK = 'bright_black' + BRIGHT_RED = 'bright_red' + BRIGHT_GREEN = 'bright_green' + BRIGHT_YELLOW = 'bright_yellow' + BRIGHT_BLUE = 'bright_blue' + BRIGHT_MAGENTA = 'bright_magenta' + BRIGHT_CYAN = 'bright_cyan' + BRIGHT_WHITE = 'bright_white' diff --git a/riocli/constants/symbols.py b/riocli/constants/symbols.py new file mode 100644 index 00000000..ad21d817 --- /dev/null +++ b/riocli/constants/symbols.py @@ -0,0 +1,20 @@ +# Copyright 2023 Rapyuta Robotics +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +class Symbols: + INFO = '🛈' + ERROR = '✘' + SUCCESS = '✔' + WARNING = '⚠' + WAITING = '⧖'