From 0260177415a5af65ef74021a8f724f1805aa4abe Mon Sep 17 00:00:00 2001 From: Alain Klotz Date: Mon, 25 Sep 2023 16:44:47 +0200 Subject: [PATCH] add method fonctexts_human --- src/guitastro/filenames.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+), 0 deletions(-) diff --git a/src/guitastro/filenames.py b/src/guitastro/filenames.py index e0f20db..2f0e82e 100644 --- a/src/guitastro/filenames.py +++ b/src/guitastro/filenames.py @@ -2882,6 +2882,21 @@ class FileNames(FileNamesException, GuitastroTools): self.extension = fn.extension self._context_set("default") + def fcontexts_human(self) -> str: + """Return a human reading description of all file contexts. Each file context is described in one line. + + Returns: + + Each file context is described in one line. + """ + text = "" + fcname0 = self.fcontext + for fcname in self.fcontexts: + self.fcontext = fcname + text += f"{fcname} : {self.fdescription} {self.rootdir}/[{self.pathing()}]/[{self.naming()}]{self.extension}\n" + self.fcontext = fcname0 + return text + # ============================================= # Managing filenames # ============================================= -- libgit2 0.21.2