diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2024-02-21 13:29:12 +0100 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2024-02-21 13:29:12 +0100 |
| commit | 256a6932c3eef45908c5e6d29552d0f35b76c4e7 (patch) | |
| tree | 8d0a093cd4fadb49c4cc2938eb2bed54a813e064 | |
| parent | e8b7eaf6255ce94660fd0e66e2da24a01bf651d9 (diff) | |
Centralize printing of subpaths
| -rw-r--r-- | pnote/tools/search.py | 4 | ||||
| -rw-r--r-- | pnote/tools/tool.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/pnote/tools/search.py b/pnote/tools/search.py index 298010b..ece7fff 100644 --- a/pnote/tools/search.py +++ b/pnote/tools/search.py @@ -28,7 +28,7 @@ class ToolSearch(Tool): if not content_only: if not first: print() - print("=> "+subpath) + self.printsubpath(subpath) self.catsubpath(project,subpath) first=False @@ -50,7 +50,7 @@ class ToolSearch(Tool): if not content_only: if not first: print() - print("=> "+subpath) + self.printsubpath(subpath) for line in entry[1]: ln=line[0] content=line[1] diff --git a/pnote/tools/tool.py b/pnote/tools/tool.py index 5aa7901..5764a72 100644 --- a/pnote/tools/tool.py +++ b/pnote/tools/tool.py @@ -6,3 +6,6 @@ class Tool: def run(self, project, args): pass + + def printsubpath(self, subpath): + print("======= "+subpath+" =======") |
