diff options
| author | Dennis Fink | 2018-04-14 17:21:29 +0200 |
|---|---|---|
| committer | Dennis Fink | 2018-04-14 17:21:29 +0200 |
| commit | 4429d6a569745536ca96ea95a28ff3fb6a002f75 (patch) | |
| tree | e7ca8a6ef75245a1d9e9c64d64def302c11c3db3 | |
| parent | 676232736996a38186cdee6744efe3fe0cf5d9a0 (diff) | |
| download | patternutils-4429d6a569745536ca96ea95a28ff3fb6a002f75.tar.gz patternutils-4429d6a569745536ca96ea95a28ff3fb6a002f75.zip | |
Add docstring to tmv
| -rw-r--r-- | patternutils/commands/tmv.py | 8 |
1 files changed, 8 insertions, 0 deletions
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: |
