Add extracted tools: CitrineOS, OpenOCPP, ShapeShifter

- CitrineOS core extracted (CSMS OCPP 2.0.1)
- OpenOCPP extracted (firmware OCPP 1.6J/2.0.1)
- ShapeShifter library installed (pip install -e)
- ShapeShifter specification extracted
- EVerest extracted

TODO updated with progress
This commit is contained in:
Eric F
2026-06-08 00:38:27 -04:00
parent 468cfeaa50
commit d398a6ced2
7326 changed files with 1177561 additions and 7 deletions

View File

@@ -0,0 +1,37 @@
import logging
from datetime import datetime
from termcolor import colored
color_map = {
logging.DEBUG: "cyan",
logging.INFO: "green",
logging.WARNING: "yellow",
logging.ERROR: "red",
logging.CRITICAL: "magenta",
}
class ShapeshifterLogFormatter(logging.Formatter):
"""
Formatter for the shapeshifter logs.
"""
def format(self, record):
"""
Format log recors using colors.
"""
color = color_map[record.levelno]
return (
colored(f"{record.levelname:10}", color)
+ f"{datetime.now().astimezone().isoformat()} - {record.getMessage()}"
)
handler = logging.StreamHandler()
handler.setFormatter(ShapeshifterLogFormatter())
handler.setLevel(logging.DEBUG)
logger = logging.getLogger("shapeshifter-uftp")
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)