readme
This commit is contained in:
parent
a27aa18f40
commit
fe96f19eca
|
@ -9,7 +9,7 @@ Major changes:
|
||||||
- Added progress bars.
|
- Added progress bars.
|
||||||
- Use threading where possible.
|
- Use threading where possible.
|
||||||
- Save assignment attachements.
|
- Save assignment attachements.
|
||||||
- Download all user files (as seen in the file manager at `/files` on your Canvas platform.)
|
- Save all user files.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ The tool exports all of the following data for each course:
|
||||||
- Modules
|
- Modules
|
||||||
- Single file webpage of the Canvas page for assignments, announcements, discussions, and modules
|
- Single file webpage of the Canvas page for assignments, announcements, discussions, and modules
|
||||||
|
|
||||||
Your data in will be exported in JSON format and organized into folders per term.
|
Additionally, all your files stored on Canvas (such as historic submissions and attachments) will be downloaded.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,6 @@ def download_course_module_pages(api_url, course_view, cookies_path):
|
||||||
for module in tqdm(list(course_view.modules), desc='Downloading Module Pages'):
|
for module in tqdm(list(course_view.modules), desc='Downloading Module Pages'):
|
||||||
bar = tqdm(list(module.items), leave=False, desc=module.name)
|
bar = tqdm(list(module.items), leave=False, desc=module.name)
|
||||||
futures = [executor.submit(download_module_item, module, item, modules_dir, cookies_path) for item in module.items]
|
futures = [executor.submit(download_module_item, module, item, modules_dir, cookies_path) for item in module.items]
|
||||||
for future in as_completed(futures):
|
for _ in as_completed(futures):
|
||||||
bar.update()
|
bar.update()
|
||||||
bar.close()
|
bar.close()
|
||||||
|
|
|
@ -31,9 +31,5 @@ def download_user_files(canvas: canvasapi.Canvas, base_path: str):
|
||||||
with ThreadPoolExecutor(max_workers=10) as executor:
|
with ThreadPoolExecutor(max_workers=10) as executor:
|
||||||
bar = tqdm(files, desc='Downloading User Files')
|
bar = tqdm(files, desc='Downloading User Files')
|
||||||
futures = [executor.submit(do_download, task) for task in files]
|
futures = [executor.submit(do_download, task) for task in files]
|
||||||
for future in as_completed(futures):
|
for _ in as_completed(futures):
|
||||||
bar.update()
|
bar.update()
|
||||||
|
|
||||||
# for file, out_path in tqdm(files, desc='Downloading User Files'):
|
|
||||||
# if not out_path.exists():
|
|
||||||
# file.download(out_path)
|
|
||||||
|
|
Loading…
Reference in New Issue