mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-13 07:55:05 +02:00
Add sync_url flag to only print the summary
The flag is --only-summarize.
This commit is contained in:
parent
c1ab7485e2
commit
f4531906f6
1 changed files with 6 additions and 1 deletions
|
|
@ -81,6 +81,8 @@ def main() -> None:
|
||||||
help="Don't prompt for confirmation, delete and overwrite local files")
|
help="Don't prompt for confirmation, delete and overwrite local files")
|
||||||
parser.add_argument('--no-delete', action="store_true",
|
parser.add_argument('--no-delete', action="store_true",
|
||||||
help="Don't prompt for confirmation, overwrite local files, don't delete")
|
help="Don't prompt for confirmation, overwrite local files, don't delete")
|
||||||
|
parser.add_argument('--only-summarize', action="store_true",
|
||||||
|
help="Only print the final summary")
|
||||||
parser.add_argument('url', help="URL to the course page")
|
parser.add_argument('url', help="URL to the course page")
|
||||||
parser.add_argument('folder', nargs='?', default=None, help="Folder to put stuff into")
|
parser.add_argument('folder', nargs='?', default=None, help="Folder to put stuff into")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
@ -139,6 +141,7 @@ def main() -> None:
|
||||||
else:
|
else:
|
||||||
file_confilict_resolver = resolve_prompt_user
|
file_confilict_resolver = resolve_prompt_user
|
||||||
|
|
||||||
|
if not args.only_summarize:
|
||||||
pferd.enable_logging()
|
pferd.enable_logging()
|
||||||
|
|
||||||
# fetch
|
# fetch
|
||||||
|
|
@ -153,6 +156,8 @@ def main() -> None:
|
||||||
transform=sanitize_windows_path
|
transform=sanitize_windows_path
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if args.only_summarize:
|
||||||
|
pferd.enable_logging()
|
||||||
pferd.print_summary()
|
pferd.print_summary()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue