diff --git a/README.md b/README.md index 1f6687b..7eecd94 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ python script that runs `from demomgr.main_app import MainApp; MainApp()`. ### Installation instructions (exe): -There is an experimental [nuitka](https://nuitka.net/) build of Demomgr available in the "Releases" section, only for 64bit Windows. +There is an experimental [nuitka](https://nuitka.net/) build of Demomgr available in the "Releases" section for Windows. Extract it to a good place for programs to be and run the contained `demomgr.exe`. ### Getting started: diff --git a/demomgr/helpers.py b/demomgr/helpers.py index df2f6ad..547235b 100644 --- a/demomgr/helpers.py +++ b/demomgr/helpers.py @@ -14,15 +14,12 @@ _CONVPREF_CENTER = 8 -def build_date_formatter(cfg): +def build_date_formatter(fmt): """ Creates a date formatter method that takes an UNIX timestamp and - converts it to what's dictated by "date_fmt" in the supplied cfg - dict, value not bound to cfg as long as it's immutable. + converts it to what's dictated by the given `fmt`. """ - # i sure hope that docstring is correct - dfmt = cfg.date_format - return lambda ts: datetime.datetime.fromtimestamp(ts).strftime(dfmt) + return lambda ts: datetime.datetime.fromtimestamp(ts).strftime(fmt) def convertunit(inp, ext = "B"): """ diff --git a/demomgr/main_app.py b/demomgr/main_app.py index 7d73405..fa98fda 100644 --- a/demomgr/main_app.py +++ b/demomgr/main_app.py @@ -23,7 +23,7 @@ from demomgr.threadgroup import ThreadGroup, THREADGROUPSIG from demomgr.threads import THREADSIG, ThreadFilter, ThreadReadFolder, ReadDemoMetaThread -__version__ = "1.9.0" +__version__ = "1.9.1" __author__ = "Square789" class DemoOp(): @@ -200,7 +200,7 @@ def _setupgui(self): "dblclick_cmd": lambda _: self._managebookmarks()}, {"name": "Creation time", "col_id": "col_ctime", "sort": True, "weight": round(0.9 * mfl.WEIGHT), - "formatter": build_date_formatter(self.cfg)}, + "formatter": build_date_formatter(self.cfg.date_format)}, {"name": "Size", "col_id": "col_filesize", "sort": True, "weight": round(0.42 * mfl.WEIGHT), "formatter": convertunit} ), @@ -373,7 +373,7 @@ def _opensettings(self): # what a hardcoded piece of garbage, there must be better ways if self.cfg.date_format != dialog.result.data["date_format"]: self.listbox.config_column( - "col_ctime", formatter = build_date_formatter(dialog.result.data) + "col_ctime", formatter = build_date_formatter(dialog.result.data["date_format"]) ) self.cfg.update(**dialog.result.data) self.reloadgui() diff --git a/setup_nuitka.py b/setup_nuitka.py index e0ccbaf..9c5ccc7 100644 --- a/setup_nuitka.py +++ b/setup_nuitka.py @@ -81,6 +81,7 @@ def main(): "--follow-imports", "--plugin-enable=tk-inter", f"--output-dir={build_dir}", + "--remove-output", run_py, ))