From 482794473972a1265308fcb89069066483bbdda0 Mon Sep 17 00:00:00 2001 From: Starfall Date: Wed, 7 Feb 2024 17:54:47 -0600 Subject: dropcalc: Median XL .txt parser Was intended to eventually become a drop calculator. Might work for other Diablo II mods without changes, I don't think there are any MXL-specific fields involved in this. Abandoned due to lack of organizational structure on the project and ... creative differences with one of the lead devs. --- dropcalc/mxl_types/dao.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 dropcalc/mxl_types/dao.py (limited to 'dropcalc/mxl_types/dao.py') diff --git a/dropcalc/mxl_types/dao.py b/dropcalc/mxl_types/dao.py new file mode 100644 index 0000000..db459e7 --- /dev/null +++ b/dropcalc/mxl_types/dao.py @@ -0,0 +1,13 @@ +from sqlalchemy.orm import DeclarativeBase + + +class BaseDAO(DeclarativeBase): + __csv_to_db__ = dict() + + def is_valid(self): + return True + + def __init__(self, iterable=(), **kwargs): + self.__dict__.update(iterable, **kwargs) + for this, that in self.__csv_to_db__.items(): + self.__dict__[this] = self.__dict__[that] -- cgit