2011年3月24日 星期四

如何下載學務處的成績

>  請問我要如何從資料庫把學務處部的資料抓出來?需要「記功嘉獎、評語、出缺席、...」等等資料,請
問是在哪個資料表?

有5個相關資料表,都是以smb_sn表示學生,smb_sn是記錄每一個學生的每一學期唯一編號
每一學生的唯一編號是stud_sn,透過 sxs_stud_seme_base 可以找到smb_sn
在X學務系統裡大多數的學生資料都是用smb_sn為key來記錄。
請參考底下的網址
http://163.30.191.22/wiki/index.php/X%E5%AD%B8%E5%8B%99%E7%B3%BB%E7%B5%B1%E5%9
F%BA%E6%9C%AC%E8%B3%87%E6%BA%90


各資料表說明
1. 出缺席:
每日記載於 sxs_half_absent 學期寫入於 sxs_stud_seme_absent
2. 獎懲:
sxs_half_reward
3. 特殊優良表現
sxs_stud_excell
4. 團體活動
sxs_half_corpor
5. 日常生/公共/校外/其他表現
sxs_instruct_others 各欄位說明如下
io_desc_daily   日常描述
io_desc_public  公共描述
io_desc_outschool 校外描述
io_desc_other   其他描述
io_score_daily  日常加減分(10)
io_score_public 公共加減分(5)
io_score_outschool 校外加減分(5)
io_score_other 其他加減分(5)

2011年3月6日 星期日

擷取odp檔中的文字,圖片

odf檔的圖片都是在pictures資料夾中
所以 unzip aaa.odp pictures 就把圖片取出了
文字是描述於 content.xml中,我們必須把tag去掉
unzip aaa.odp content.xml
cat content.xml | perl -pe 's/<([^>]*)>//g' | perl([ \t\n]+)/$1/g' > aaa.txt