Merge branch 'tkinter' of https://github.com/snsd0805/ChiSteward into tkinter
This commit is contained in:
commit
89a74eac3a
@ -1,5 +1,5 @@
|
||||
from tkinter import *
|
||||
from api.moodle import Moodle
|
||||
from api.moodle import MoodleAPI
|
||||
from config import CONFIG
|
||||
from tkhtmlview import HTMLLabel
|
||||
|
||||
@ -14,7 +14,7 @@ def getIdAndName(course):
|
||||
|
||||
|
||||
def createMoodleWin():
|
||||
moodle = Moodle(CONFIG['moodle']['username'], CONFIG['moodle']['password'])
|
||||
moodle = MoodleAPI(CONFIG['moodle']['username'], CONFIG['moodle']['password'])
|
||||
|
||||
if moodle.status:
|
||||
# ===== 取得課程ID與名稱 =====
|
||||
|
||||
4
Ncnu.py
4
Ncnu.py
@ -1,11 +1,11 @@
|
||||
from tkinter import *
|
||||
from api.ncnu import NCNU
|
||||
from api.ncnu import NcnuAPI
|
||||
from config import CONFIG
|
||||
from tkinter import messagebox
|
||||
from tkhtmlview import HTMLLabel
|
||||
|
||||
def createNcnuWin():
|
||||
ncnu = NCNU(CONFIG['NCNU']['username'], CONFIG['NCNU']['password'])
|
||||
ncnu = NcnuAPI(CONFIG['NCNU']['username'], CONFIG['NCNU']['password'])
|
||||
if ncnu.status:
|
||||
def dlCurriculum(sem):
|
||||
if ncnu.getCourseTable(sem):
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
from tkinter import *
|
||||
from tkhtmlview import HTMLLabel
|
||||
from api.ncnuMain import NcnuMain
|
||||
from api.ncnuMain import NcnuMainAPI
|
||||
|
||||
def createNcnuMainWin():
|
||||
win=Tk()
|
||||
win.title("暨大官網最新資訊!")
|
||||
win.geometry("600x600")
|
||||
main = NcnuMain()
|
||||
main = NcnuMainAPI()
|
||||
Link='''<span style="background-color:#ffcccc"><ul>'''
|
||||
textLb=Label(win,text="暨大校園最新資訊",font="Helvetica 20",bg="#ffcccc")
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ class MoodleAPI():
|
||||
return [{
|
||||
'name': " ".join( link.text.split(' ')[:-1] ),
|
||||
'type': link.text.split(' ')[-1],
|
||||
'link': link.find('a').get('href')
|
||||
'link': link.find('a').get('href') if link.find('a') != None else ""
|
||||
} for link in links]
|
||||
else:
|
||||
return None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user