archey4/archey/constants.py
Anthony Lannutti 4dcf479826 Software Architecture major rework (#41)
* Moved constants and logo ascii art out of the main file
* Moved Configuration class to separate file
* Moved Output class to a separate file
* Moved hostname class definition to it's own separate file
* Moved Model class definition to it's own file
* Moved Kernel class to its own file
* Moved uptime class definition to it's own file
* Moved Disk class definition to its own file
* Moved RAM class definition to it's own file
* Moved CPU class definition to it's own file
* Moved LanIp class definition to it's own file
* Moved WanIp class definition to a separate file
* Moved Packages class definition to separate file
* Moved User class definition to its own file
* Moved entry class definitions to their own directory
* Moved GPU entry class definition to a separate file
* Moved temperature entry class definition to a separate file
* Moved terminal entry class definition to separate file
* Moved shell entry class definition to separate file
* Rewrited the `LanIp` module to handle more cases and optimizations
* Moved window manager and desktop environment class definitions to separate files
* Moved distro class definition to separate file
* Removed direct use of COLOR_DICT in disk.py and ram.py
* Moved unit tests and modified import paths
* Moved {DE,WM}_DICT constants to their respective modules
* Made `Configuration` & `Processes` (new class) act as singletons
* Set the `Configuration` internal `config` dictionary to "private" attribute

+ Now relies on a `.pylintrc` file for Pylint (now almost fully-compliant)
+ Fixed typos
+ Added another dependency on `netifaces`, but this should remove the assumption about tools available in the user's environment
+ The project may now be run as a Python module
+ Marked Python 3.8 as supported for SetupTools
+ Added instructions (and tests) to build a standalone version of Archey
+ Adds @lannuttia to COPYRIGHT (initiator of the major rework)

- Removed the dependency to `net-tools`


Co-authored-by: Samuel FORESTIER <dev@samuel.domains>
2019-07-22 11:56:03 +02:00

45 lines
1.8 KiB
Python

"""Logos colors and distributions / logos matching"""
import archey.logos as logos
from archey.distributions import Distributions
COLOR_DICT = {
Distributions.ARCH_LINUX: ['\x1b[0;34m', '\x1b[1;34m'],
Distributions.BUNSENLABS: ['\x1b[1;37m', '\x1b[1;33m', '\x1b[0;33m'],
Distributions.CRUNCHBANG: ['\x1b[1;37m', '\x1b[1;37m'],
Distributions.DEBIAN: ['\x1b[0;31m', '\x1b[1;31m'],
Distributions.FEDORA: ['\x1b[1;37m', '\x1b[0;34m'],
Distributions.GENTOO: ['\x1b[1;37m', '\x1b[1;35m'],
Distributions.KALI_LINUX: ['\x1b[1;37m', '\x1b[1;34m'],
Distributions.MANJARO_LINUX: ['\x1b[0;32m', '\x1b[1;32m'],
Distributions.LINUX: ['\x1b[1;33m', '\x1b[1;37m'],
Distributions.LINUX_MINT: ['\x1b[1;37m', '\x1b[1;32m'],
Distributions.OPENSUSE: ['\x1b[1;37m', '\x1b[1;32m'],
Distributions.RED_HAT: ['\x1b[1;37m', '\x1b[1;31m', '\x1b[0;31m'],
Distributions.SLACKWARE: ['\x1b[0;34m', '\x1b[1;34m', '\x1b[1;0m'],
Distributions.UBUNTU: ['\x1b[0;31m', '\x1b[1;31m', '\x1b[0;33m'],
Distributions.WINDOWS: ['\x1b[1;31m', '\x1b[1;34m',
'\x1b[1;32m', '\x1b[0;33m'],
'sensors': ['\x1b[0;32m', '\x1b[0;33m', '\x1b[0;31m'],
'clear': '\x1b[0m'
}
LOGOS_DICT = {
Distributions.ARCH_LINUX: logos.ARCH_LINUX,
Distributions.BUNSENLABS: logos.BUNSENLABS,
Distributions.CRUNCHBANG: logos.CRUNCHBANG,
Distributions.DEBIAN: logos.DEBIAN,
Distributions.FEDORA: logos.FEDORA,
Distributions.GENTOO: logos.GENTOO,
Distributions.KALI_LINUX: logos.KALI_LINUX,
Distributions.MANJARO_LINUX: logos.MANJARO,
Distributions.LINUX: logos.LINUX,
Distributions.LINUX_MINT: logos.LINUX_MINT,
Distributions.OPENSUSE: logos.OPENSUSE,
Distributions.RED_HAT: logos.RED_HAT,
Distributions.SLACKWARE: logos.SLACKWARE,
Distributions.UBUNTU: logos.UBUNTU,
Distributions.WINDOWS: logos.WINDOWS
}