uw-course 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {uw_course-1.0.0/uw_course.egg-info → uw_course-1.0.1}/PKG-INFO +1 -1
- {uw_course-1.0.0 → uw_course-1.0.1}/pyproject.toml +1 -1
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/main.py +10 -4
- {uw_course-1.0.0 → uw_course-1.0.1/uw_course.egg-info}/PKG-INFO +1 -1
- {uw_course-1.0.0 → uw_course-1.0.1}/LICENSE +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/README.md +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/setup.cfg +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/ClassSchedule/SearchInfo.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/ClassSchedule/__init__.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/ClassSchedule/runner.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/DB/__init__.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/DB/dbClass.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/Utiles/__init__.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/Utiles/colorMessage.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/Utiles/manageDBClass.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/Utiles/randomColor.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/__init__.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course/setting.py +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course.egg-info/SOURCES.txt +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course.egg-info/dependency_links.txt +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course.egg-info/entry_points.txt +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course.egg-info/requires.txt +0 -0
- {uw_course-1.0.0 → uw_course-1.0.1}/uw_course.egg-info/top_level.txt +0 -0
|
@@ -27,7 +27,8 @@ def parse_arguments():
|
|
|
27
27
|
parser = argparse.ArgumentParser(
|
|
28
28
|
description="Course Helper: A tool to manage course details and collections.",
|
|
29
29
|
epilog=f"""Hint: Use --course to specify a course
|
|
30
|
-
or --file to specify a file with courses using schema: {url}
|
|
30
|
+
or --file to specify a file with courses using schema: {url}
|
|
31
|
+
or --export to export the schedule to pdf (.out only).""",
|
|
31
32
|
)
|
|
32
33
|
parser.add_argument(
|
|
33
34
|
"-c", "--course", type=str, help="Specify the course to check details for."
|
|
@@ -35,15 +36,17 @@ def parse_arguments():
|
|
|
35
36
|
parser.add_argument(
|
|
36
37
|
"-f", "--file", type=str, help="Specify a file with collection of courses."
|
|
37
38
|
)
|
|
39
|
+
parser.add_argument(
|
|
40
|
+
"-e", "--export", action=str, help="Export the schedule to pdf (.out only)."
|
|
41
|
+
)
|
|
38
42
|
parser.add_argument(
|
|
39
43
|
"-g", "--gray", action="store_true", help="Enable gray color mode for output."
|
|
40
44
|
)
|
|
41
45
|
|
|
42
46
|
args = parser.parse_args()
|
|
43
47
|
|
|
44
|
-
# Ensure at least one
|
|
45
|
-
if
|
|
46
|
-
print("\nError: You must specify at least one of --course or --file.\n")
|
|
48
|
+
# Ensure at least one argument is provided
|
|
49
|
+
if len(sys.argv) == 1:
|
|
47
50
|
parser.print_help()
|
|
48
51
|
sys.exit(1)
|
|
49
52
|
|
|
@@ -54,6 +57,9 @@ def main():
|
|
|
54
57
|
gray = args.gray
|
|
55
58
|
if args.course:
|
|
56
59
|
checkDetail(args.course)
|
|
60
|
+
elif args.export:
|
|
61
|
+
system("pdfschedule " + args.export)
|
|
62
|
+
print(OKGREEN + "\n\n ---------------- Done!!! ---------------- \n\n" + ENDC)
|
|
57
63
|
elif args.file:
|
|
58
64
|
with open(args.file, "r") as f:
|
|
59
65
|
collection = f.readline().strip().split("#")[0].strip()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|