(lang: str)
| 1530 | |
| 1531 | items = folder_sizes_report(root, top_n=max(1, top_n), include_hidden=include_hidden, follow_symlinks=follow, ignore=ignore) |
| 1532 | out = format_sizes_report(items) or t('placeholder_empty', lang) |
| 1533 | print(out) |
| 1534 | export_path = prompt_text(lang, "prompt_export", "") |
| 1535 | export_text(lang, export_path, out) |
| 1536 | |
| 1537 | def run_recent(lang: str) -> None: |
| 1538 | print(t("recent_title", lang)) |
| 1539 | root = prompt_path(lang, Path(".")) |
| 1540 | if not root.exists(): |
| 1541 | print(t("err_path_missing", lang, path=root)) |
| 1542 | return |
| 1543 | try: |
| 1544 | days = int(prompt_text(lang, "prompt_days", "7") or "7") |
| 1545 | except ValueError: |
| 1546 | days = 7 |
| 1547 | try: |
| 1548 | top_n = int(prompt_text(lang, "prompt_top", "200") or "200") |
| 1549 | except ValueError: |
| 1550 | top_n = 200 |
| 1551 | depth = prompt_int(lang, 10) |
| 1552 | hide_dot = yesno(lang, "prompt_hide_dot", False) |
| 1553 | include_hidden = not hide_dot |
| 1554 | follow = yesno(lang, "prompt_follow", False) |
| 1555 | ignore = normalize_patterns(prompt_text(lang, "prompt_ignore", "")) |
| 1556 | |
| 1557 | items = list_recent_files(root, days=max(0, days), max_results=max(0, top_n), max_depth=depth, include_hidden=include_hidden, follow_symlinks=follow, ignore=ignore) |
| 1558 | out = format_recent(items) or t('placeholder_empty', lang) |
| 1559 | print(out) |
no test coverage detected