From 989a563b1d2285bf98cfb4bbd39ef7ef1abf7c2f Mon Sep 17 00:00:00 2001 From: Cyberes Date: Fri, 27 Oct 2023 16:30:38 -0600 Subject: [PATCH] rename --- export.py | 8 ++++---- {stuff => module}/__init__.py | 0 {stuff => module}/const.py | 0 {stuff => module}/download.py | 0 {stuff => module}/download_canvas.py | 8 ++++---- {stuff => module}/get_canvas.py | 6 +++--- {stuff => module}/helpers.py | 0 {stuff => module}/items.py | 2 +- {stuff => module}/singlefile.py | 0 {stuff => module}/threading.py | 10 +++++----- 10 files changed, 17 insertions(+), 17 deletions(-) rename {stuff => module}/__init__.py (100%) rename {stuff => module}/const.py (100%) rename {stuff => module}/download.py (100%) rename {stuff => module}/download_canvas.py (98%) rename {stuff => module}/get_canvas.py (97%) rename {stuff => module}/helpers.py (100%) rename {stuff => module}/items.py (98%) rename {stuff => module}/singlefile.py (100%) rename {stuff => module}/threading.py (92%) diff --git a/export.py b/export.py index c460839..3bd56d1 100644 --- a/export.py +++ b/export.py @@ -6,10 +6,10 @@ import jsonpickle import yaml from canvasapi import Canvas -from stuff.const import COURSES_TO_SKIP, DL_LOCATION -from stuff.download_canvas import download_assignment_pages, download_course_announcement_pages, download_course_discussion_pages, download_course_files, download_course_home_page_html, download_course_html, download_course_module_pages, download_submission_attachments -from stuff.get_canvas import find_course_announcements, find_course_assignments, find_course_discussions, find_course_modules, find_course_pages -from stuff.items import CourseView +from module.const import COURSES_TO_SKIP, DL_LOCATION +from module.download_canvas import download_assignment_pages, download_course_announcement_pages, download_course_discussion_pages, download_course_files, download_course_home_page_html, download_course_html, download_course_module_pages, download_submission_attachments +from module.get_canvas import find_course_announcements, find_course_assignments, find_course_discussions, find_course_modules, find_course_pages +from module.items import CourseView with open("credentials.yaml", 'r') as f: credentials = yaml.full_load(f) diff --git a/stuff/__init__.py b/module/__init__.py similarity index 100% rename from stuff/__init__.py rename to module/__init__.py diff --git a/stuff/const.py b/module/const.py similarity index 100% rename from stuff/const.py rename to module/const.py diff --git a/stuff/download.py b/module/download.py similarity index 100% rename from stuff/download.py rename to module/download.py diff --git a/stuff/download_canvas.py b/module/download_canvas.py similarity index 98% rename from stuff/download_canvas.py rename to module/download_canvas.py index 05d4586..02d70af 100644 --- a/stuff/download_canvas.py +++ b/module/download_canvas.py @@ -6,10 +6,10 @@ from http.cookiejar import MozillaCookieJar import requests from tqdm import tqdm -from stuff.singlefile import download_page -from stuff.const import DL_LOCATION, MAX_FOLDER_NAME_SIZE -from stuff.helpers import make_valid_filename, make_valid_folder_path, shorten_file_name -from stuff.threading import download_assignment, download_module_item +from module.singlefile import download_page +from module.const import DL_LOCATION, MAX_FOLDER_NAME_SIZE +from module.helpers import make_valid_filename, make_valid_folder_path, shorten_file_name +from module.threading import download_assignment, download_module_item def download_course_files(course, course_view): diff --git a/stuff/get_canvas.py b/module/get_canvas.py similarity index 97% rename from stuff/get_canvas.py rename to module/get_canvas.py index 1d82971..d1bbfc4 100644 --- a/stuff/get_canvas.py +++ b/module/get_canvas.py @@ -6,9 +6,9 @@ import requests from bs4 import BeautifulSoup from tqdm import tqdm -from stuff.const import DATE_TEMPLATE, DL_LOCATION, MAX_FOLDER_NAME_SIZE -from stuff.helpers import make_valid_filename, shorten_file_name -from stuff.items import AssignmentView, AttachmentView, DiscussionView, ModuleItemView, ModuleView, PageView, SubmissionView, TopicEntryView, TopicReplyView +from module.const import DATE_TEMPLATE, DL_LOCATION, MAX_FOLDER_NAME_SIZE +from module.helpers import make_valid_filename, shorten_file_name +from module.items import AssignmentView, AttachmentView, DiscussionView, ModuleItemView, ModuleView, PageView, SubmissionView, TopicEntryView, TopicReplyView def find_course_modules(course, course_view): diff --git a/stuff/helpers.py b/module/helpers.py similarity index 100% rename from stuff/helpers.py rename to module/helpers.py diff --git a/stuff/items.py b/module/items.py similarity index 98% rename from stuff/items.py rename to module/items.py index 2ba0f6c..5dcc06d 100644 --- a/stuff/items.py +++ b/module/items.py @@ -1,4 +1,4 @@ -from stuff.helpers import make_valid_filename +from module.helpers import make_valid_filename class ModuleItemView: diff --git a/stuff/singlefile.py b/module/singlefile.py similarity index 100% rename from stuff/singlefile.py rename to module/singlefile.py diff --git a/stuff/threading.py b/module/threading.py similarity index 92% rename from stuff/threading.py rename to module/threading.py index c75dc06..ce2c5dd 100644 --- a/stuff/threading.py +++ b/module/threading.py @@ -1,11 +1,11 @@ import os from pathlib import Path -from stuff.singlefile import download_page -from stuff.const import MAX_FOLDER_NAME_SIZE -from stuff.download import download_file -from stuff.get_canvas import get_extra_assignment_files -from stuff.helpers import make_valid_filename, shorten_file_name +from module.singlefile import download_page +from module.const import MAX_FOLDER_NAME_SIZE +from module.download import download_file +from module.get_canvas import get_extra_assignment_files +from module.helpers import make_valid_filename, shorten_file_name def download_module_item(module, item, modules_dir, cookies_path):