From 4429d6a569745536ca96ea95a28ff3fb6a002f75 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 14 Apr 2018 17:21:29 +0200 Subject: Add docstring to tmv --- patternutils/commands/tmv.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/patternutils/commands/tmv.py b/patternutils/commands/tmv.py index 145a261..3f618d2 100644 --- a/patternutils/commands/tmv.py +++ b/patternutils/commands/tmv.py @@ -47,6 +47,14 @@ def tmv( verbose: bool, ) -> None: + """Rename files based on the OUTPUT_PATTERN. + + It read a JSON list containing objects. The object needs to have a + key named _abspath, which points to the file to move. The rest of the + keys will be supplied to the templating engine to generate the new + filename. + """ + try: data = json.load(read_from) # type: ignore except json.JSONDecodeError: -- cgit v1.3.1