uw-course 0.2.0__py3-none-any.whl → 1.0.1__py3-none-any.whl
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/ClassSchedule/SearchInfo.py +1 -1
- uw_course/ClassSchedule/runner.py +5 -4
- uw_course/DB/dbClass.py +1 -1
- uw_course/main.py +15 -8
- {uw_course-0.2.0.dist-info → uw_course-1.0.1.dist-info}/METADATA +1 -1
- {uw_course-0.2.0.dist-info → uw_course-1.0.1.dist-info}/RECORD +10 -10
- {uw_course-0.2.0.dist-info → uw_course-1.0.1.dist-info}/WHEEL +1 -1
- {uw_course-0.2.0.dist-info → uw_course-1.0.1.dist-info}/LICENSE +0 -0
- {uw_course-0.2.0.dist-info → uw_course-1.0.1.dist-info}/entry_points.txt +0 -0
- {uw_course-0.2.0.dist-info → uw_course-1.0.1.dist-info}/top_level.txt +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
from
|
|
1
|
+
from .SearchInfo import Course
|
|
2
|
+
from ..Utiles.randomColor import randomColor, randomGray
|
|
3
|
+
from ..setting import Setting
|
|
4
|
+
from ..Utiles.colorMessage import *
|
|
5
|
+
|
|
2
6
|
from os import remove
|
|
3
|
-
from Utiles.randomColor import randomColor, randomGray
|
|
4
|
-
from setting import Setting
|
|
5
|
-
from Utiles.colorMessage import *
|
|
6
7
|
|
|
7
8
|
setting = Setting()
|
|
8
9
|
|
uw_course/DB/dbClass.py
CHANGED
uw_course/main.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
from DB.dbClass import dbClass
|
|
2
|
-
from ClassSchedule.runner import SearchCourse, makeSchedule, SearchAvalibleInTerm
|
|
3
|
-
from Utiles.colorMessage import *
|
|
1
|
+
from .DB.dbClass import dbClass
|
|
2
|
+
from .ClassSchedule.runner import SearchCourse, makeSchedule, SearchAvalibleInTerm
|
|
3
|
+
from .Utiles.colorMessage import *
|
|
4
|
+
from .setting import Setting
|
|
5
|
+
|
|
4
6
|
from os import system
|
|
5
|
-
from setting import Setting
|
|
6
7
|
import argparse
|
|
7
8
|
import sys
|
|
8
9
|
|
|
@@ -26,7 +27,8 @@ def parse_arguments():
|
|
|
26
27
|
parser = argparse.ArgumentParser(
|
|
27
28
|
description="Course Helper: A tool to manage course details and collections.",
|
|
28
29
|
epilog=f"""Hint: Use --course to specify a course
|
|
29
|
-
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).""",
|
|
30
32
|
)
|
|
31
33
|
parser.add_argument(
|
|
32
34
|
"-c", "--course", type=str, help="Specify the course to check details for."
|
|
@@ -34,15 +36,17 @@ def parse_arguments():
|
|
|
34
36
|
parser.add_argument(
|
|
35
37
|
"-f", "--file", type=str, help="Specify a file with collection of courses."
|
|
36
38
|
)
|
|
39
|
+
parser.add_argument(
|
|
40
|
+
"-e", "--export", action=str, help="Export the schedule to pdf (.out only)."
|
|
41
|
+
)
|
|
37
42
|
parser.add_argument(
|
|
38
43
|
"-g", "--gray", action="store_true", help="Enable gray color mode for output."
|
|
39
44
|
)
|
|
40
45
|
|
|
41
46
|
args = parser.parse_args()
|
|
42
47
|
|
|
43
|
-
# Ensure at least one
|
|
44
|
-
if
|
|
45
|
-
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:
|
|
46
50
|
parser.print_help()
|
|
47
51
|
sys.exit(1)
|
|
48
52
|
|
|
@@ -53,6 +57,9 @@ def main():
|
|
|
53
57
|
gray = args.gray
|
|
54
58
|
if args.course:
|
|
55
59
|
checkDetail(args.course)
|
|
60
|
+
elif args.export:
|
|
61
|
+
system("pdfschedule " + args.export)
|
|
62
|
+
print(OKGREEN + "\n\n ---------------- Done!!! ---------------- \n\n" + ENDC)
|
|
56
63
|
elif args.file:
|
|
57
64
|
with open(args.file, "r") as f:
|
|
58
65
|
collection = f.readline().strip().split("#")[0].strip()
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
uw_course/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
uw_course/main.py,sha256=
|
|
2
|
+
uw_course/main.py,sha256=6uYr5NVlzXG6NO-i9WCJNVnnTPVyCrf1JSOgqiNj9nw,2890
|
|
3
3
|
uw_course/setting.py,sha256=MSJVr85Kc3XMFKW-rFKx34TDJWtbK4axj7TpzO0mTqM,177
|
|
4
|
-
uw_course/ClassSchedule/SearchInfo.py,sha256=
|
|
4
|
+
uw_course/ClassSchedule/SearchInfo.py,sha256=TWYieCibMtn-AISSSgBUXnuh4fLrsDv1Yn2IIfhI8SM,2168
|
|
5
5
|
uw_course/ClassSchedule/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
uw_course/ClassSchedule/runner.py,sha256=
|
|
6
|
+
uw_course/ClassSchedule/runner.py,sha256=ApzVYoSqC2oizwTxaTRvDQQQNJzkeXQTO7ayozfWFmA,2315
|
|
7
7
|
uw_course/DB/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
uw_course/DB/dbClass.py,sha256=
|
|
8
|
+
uw_course/DB/dbClass.py,sha256=1R3_8j4PpTlKCkvZvVvyllu04mIk14wcIN9wPEo_m7k,1006
|
|
9
9
|
uw_course/Utiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
uw_course/Utiles/colorMessage.py,sha256=HlTn2saR96Sh5jRjBZ_P8EvHrzORxOR6-Zzu0ATHuw0,176
|
|
11
11
|
uw_course/Utiles/manageDBClass.py,sha256=0V721lervaRzJyiFHgQrUovNKNYba8uiD9WIEeQLAe4,641
|
|
12
12
|
uw_course/Utiles/randomColor.py,sha256=4zubPBcRxos5Rqb8O-ZmkYYKvzPP9NjSdzZwdTZOmy0,467
|
|
13
|
-
uw_course-0.
|
|
14
|
-
uw_course-0.
|
|
15
|
-
uw_course-0.
|
|
16
|
-
uw_course-0.
|
|
17
|
-
uw_course-0.
|
|
18
|
-
uw_course-0.
|
|
13
|
+
uw_course-1.0.1.dist-info/LICENSE,sha256=3gvYdtz3_nCjhGpKAbUQzU1CT9anApYNOrn-bF6ZhI8,1073
|
|
14
|
+
uw_course-1.0.1.dist-info/METADATA,sha256=XRANyqigvG3jePeKs40lFC7bGVLBa0CvkecYeNMv0KE,2439
|
|
15
|
+
uw_course-1.0.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
16
|
+
uw_course-1.0.1.dist-info/entry_points.txt,sha256=KwZTcAbhGgjmTdkqwUtMDKzhZ1iqGY5OmaH6F7XNgRk,50
|
|
17
|
+
uw_course-1.0.1.dist-info/top_level.txt,sha256=b760hy15dn_4qeUiKj9gQ8jnO9caaRoD-4ks28p81NY,10
|
|
18
|
+
uw_course-1.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|