diff --git a/macli.py b/macli.py index 5c282c5..8719cec 100644 --- a/macli.py +++ b/macli.py @@ -189,6 +189,7 @@ def archive_to_dir(directory, url): with open('index.html', 'wt') as f: f.write(archived_content.prettify()) + progbar.clean() os.chdir(current_path) diff --git a/progress_meter.py b/progress_meter.py index 54cddd8..7aecd3c 100644 --- a/progress_meter.py +++ b/progress_meter.py @@ -28,3 +28,9 @@ class ProgressBar: def next_iter(self, msg=''): self.current_element += 1 self.show(msg) + + def clean(self): + print('\r' # Go to the start of the line + '\x1b[K' # Clear line + '\x1b[0m', # Restart the "style" + end='')