We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9dd1a6 commit f7b69d6Copy full SHA for f7b69d6
1 file changed
colrev/packages/colrev_cli_pdf_prep_man/src/pdf_prep_man_cli.py
@@ -27,6 +27,11 @@
27
# pylint: disable=too-few-public-methods
28
29
30
+def clear_screen() -> None:
31
+ """Clear the terminal without spawning a subprocess."""
32
+ print("\033[2J\033[H", end="")
33
+
34
35
class CoLRevCLIPDFManPrep(base_classes.PDFPrepManPackageBaseClass):
36
"""Manually prepare PDFs based on a CLI (not yet implemented)."""
37
@@ -297,11 +302,7 @@ def _man_pdf_prep_item_init(
297
302
item: dict,
298
303
stat: str,
299
304
) -> dict:
300
- current_platform = platform.system()
301
- if current_platform in ["Linux", "Darwin"]:
- os.system("clear")
- else:
- os.system("cls")
305
+ clear_screen()
306
307
# to do : if authors mismatch: color those that do/do not match
308
print(stat)
0 commit comments