本館粉絲專頁

使用者:Kaoru/Kaoru's工作日誌/200507

分享此網頁到Facebook
分享此網頁到Plurk
分享此網頁到百度搜藏
分享此網頁到Twitter
分享此網頁到Del.icio.us
最近作者:Kaoru 2005年9月10日 (星期六)22:20
台灣棒球維基館
跳轉到: 導覽搜尋

目次

0711

NDAP

  • Google獲取新聞程式
→ 試試看放在這裡,看Google會不會抓到...
台灣44年以來的棒球新聞事件摘要


0712

NDAP

  • Google獲取新聞程式
→ 因為新聞仍屬過濾階段,所以XML檔常有錯誤無法出現,
    目前已擋掉"<img"標籤,但仍會出現「此處需輸入分號」以及「此處不可空白」等錯誤訊息,無法完全將新聞以HTML呈現。
→ 為使近期新聞也能全文閱讀連結,修改ndap/querynews2.jsp查詢資料表為baseballupdate。
  • 目前將各年度的呈現情況加以整理如下↓
1960年代 1970年代 1980年代 1990年代 2000年代
  1970 - OK 1980 - OK 1990 - OK 2000 - 空白
1961 - OK 1971 - OK 1981 - OK 1991 - OK 2001 - 分號
1962 - OK 1972 - OK 1982 - OK 1992 - 空白 2002 - 空白
1963 - OK 1973 - OK 1983 - OK 1993 - OK 2003 - 分號
1964 - 標記 1974 - OK 1984 - OK 1994 - 空白 2004 - 分號
1965 - OK 1975 - OK 1985 - OK 1995 - OK  
1966 - OK 1976 - OK 1986 - OK 1996 - OK  
1967 - OK 1977 - OK 1987 - OK 1997 - 分號  
1968 - OK 1978 - OK 1988 - OK 1998 - 空白  
1969 - OK 1979 - OK 1989 - OK 1999 - 分號  
  • 今天Google還搜尋不到這個頁面。
  • 另外發現Google也可以找到XML檔,以「台灣棒球史上的今天」搜尋Google,查詢結果如下圖↓

050712Google.jpg

0714

OAI-PMH

→ 目前resumptionToken採「TwBsBall-紀錄編號」,其實原本是想仿照「紀錄/全部紀錄」的紀錄方式,
    可是rs.RecordCount不管我怎測都顯示-1...T_T...就是讀不到全部紀錄集,無法解決只好先檔掉不顯示它*爆汗*。
Open Archives Initiative :: Protocol for Metadata Harvesting v2.0
RE Protocol Tester 1.46 :: UCT AIM :: January 2005

(1) Testing : Identify
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=Identify
Test Result : OK
---- [ Repository Name = NDAP Data Provider ]
---- [ Protocol Version = 2.0 ]
---- [ Base URL = http://ndap.dils.tku.edu.tw/site/oai/oai.asp ]
---- [ Admin Email = kaorukang@hotmail.com ]
---- [ Granularity = YYYY-MM-DD ]
---- [ Earliest Datestamp = 1961-01-02 ]

(2) Testing : Identify (illegal_parameter)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=Identify&test=test
Test Result : OK

(3) Testing : ListMetadataFormats
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListMetadataFormats
Test Result : OK
---- [ Only oai_dc supported ]

(4) Testing : ListSets
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListSets
Test Result : OK
---- [ Sample Set Spec = apple ]

(5) Skipping : ListSets (resumptionToken)
This test is being skipped because it cannot or should not be performed.

(6) Testing : ListIdentifiers (oai_dc)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc
Test Result : OK
---- [ Sample Identifier = oai:ndap.dils.tku.edu.tw:T0000001 ]
---- [ Identifier Resumption Token = TwBsBall-15 ]

(7) Testing : ListIdentifiers (resumptionToken)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&resumptionToken=TwBsBall-15
Test Result : OK

(8) Testing : ListIdentifiers (resumptionToken, oai_dc)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&resumptionToken=TwBsBall-15&metadataPrefix=oai_dc
Test Result : OK

(9) Testing : ListIdentifiers (oai_dc, from/until)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&from=2000-01-01&until=2000-01-01
Test Result : OK

(10) Testing : ListIdentifiers (oai_dc, set, from/until)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&set=apple&from=2000-01-01&until=2000-01-01
Test Result : OK

(11) Testing : ListIdentifiers (oai_dc, illegal_set, illegal_from/until)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&set=really_wrong_set&from=some_random_date&until=some_random_date
Test Result : OK

(12) Testing : ListIdentifiers (oai_dc, from granularity != until granularity)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&from=2001-01-01&until=2002-01-01T00:00:00Z
Test Result : OK

(13) Testing : ListIdentifiers (oai_dc, from > until)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&from=2000-01-01&until=1999-01-01
Test Result : OK

(14) Testing : ListIdentifiers ()
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers
Test Result : OK

(15) Skipping : ListIdentifiers (metadataPrefix)
This test is being skipped because it cannot or should not be performed.

(16) Testing : ListIdentifiers (illegal_mdp)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=illegal_mdp
Test Result : OK

(17) Testing : ListIdentifiers (mdp, mdp)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&metadataPrefix=oai_dc
Test Result : OK

(18) Testing : ListIdentifiers (illegal_resumptiontoken)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&resumptionToken=junktoken
Test Result : OK

(19) Testing : ListIdentifiers (oai_dc, from YYYY-MM-DD)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&from=2001-01-01
Test Result : OK

(20) Testing : ListIdentifiers (oai_dc, from YYYY-MM-DDThh:mm:ssZ)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&from=2001-01-01T00:00:00Z
Test Result : OK

(21) Testing : ListIdentifiers (oai_dc, from YYYY)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&from=2001
Test Result : OK

(22) Testing : ListMetadataFormats (identifier)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListMetadataFormats&identifier=oai:ndap.dils.tku.edu.tw:T0000001
Test Result : OK
---- [ Only oai_dc supported ]

(23) Testing : ListMetadataFormats (illegal_id)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListMetadataFormats&identifier=really_wrong_id
Test Result : OK

(24) Skipping : GetRecord (identifier, metadataPrefix)
This test is being skipped because it cannot or should not be performed.

(25) Testing : GetRecord (identifier, oai_dc)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=GetRecord&identifier=oai:ndap.dils.tku.edu.tw:T0000001&metadataPrefix=oai_dc
Test Result : OK

(26) Testing : GetRecord (identifier)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=GetRecord&identifier=oai:ndap.dils.tku.edu.tw:T0000001
Test Result : OK

(27) Testing : GetRecord (identifier, illegal_mdp)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=GetRecord&identifier=oai:ndap.dils.tku.edu.tw:T0000001&metadataPrefix=really_wrong_mdp
Test Result : OK

(28) Testing : GetRecord (oai_dc)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=GetRecord&metadataPrefix=oai_dc
Test Result : OK

(29) Testing : GetRecord (illegal_id, oai_dc)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=GetRecord&identifier=really_wrong_id&metadataPrefix=oai_dc
Test Result : OK

(30) Testing : GetRecord (invalid_id, oai_dc)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=GetRecord&identifier=invalid\"id&metadataPrefix=oai_dc
Test Result : OK

(31) Testing : ListRecords (oai_dc, from/until)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListRecords&metadataPrefix=oai_dc&from=2000-01-01&until=2000-01-01
Test Result : OK

(32) Skipping : ListRecords (resumptionToken)
This test is being skipped because it cannot or should not be performed.

(33) Skipping : ListRecords (metadataPrefix, from/until)
This test is being skipped because it cannot or should not be performed.

(34) Testing : ListRecords (oai_dc, illegal_set, illegal_from/until)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListRecords&metadataPrefix=oai_dc&set=really_wrong_set&from=some_random_date&until=some_random_date
Test Result : OK

(35) Testing : ListRecords
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListRecords
Test Result : OK

(36) Testing : ListRecords (oai_dc, from granularity != until granularity)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListRecords&metadataPrefix=oai_dc&from=2001-01-01&until=2002-01-01T00:00:00Z
Test Result : OK

(37) Testing : ListRecords (oai_dc, until before earliestDatestamp)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListRecords&metadataPrefix=oai_dc&until=1960-01-02
Test Result : OK

(38) Testing : ListRecords (oai_dc)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListRecords&metadataPrefix=oai_dc
Test Result : OK

(39) Testing : ListRecords (illegal_resumptiontoken)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListRecords&resumptionToken=junktoken
Test Result : OK

(40) Testing : ListIdentifiers (oai_dc, set)
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=ListIdentifiers&metadataPrefix=oai_dc&set=apple
Test Result : OK

(41) Skipping : GetRecord (identifier, oai_dc)
This test is being skipped because it cannot or should not be performed.

(42) Testing : IllegalVerb
URL : http://ndap.dils.tku.edu.tw/site/oai/oai.asp?verb=IllegalVerb
Test Result : OK


---- Total Errors : 0


--------------------------------------------------------------------------------

Congratulations !
→ 第三步是安裝UTF8的調節器...有點看不懂怎用,可我們之後要改成BIG5編碼...那這步驟需要嗎?@_@?

SUMMARY:

Total exceptions improperly handled: 0 out of 15 Total error count: 0


Your repository validated (at Protocol Version 2.0) according to our OAI protocol conformance tester.

Your repository has not been registered in the OAI database of conforming repositories.

The OAI identifier ndap.dils.tku.edu.tw has not been reserved for your use.

...............................................................................

Total number of exceptions missed: 0

Total error count: 0

Your repository is robust as well as compliant

Note: only spot checks have been made to check for UTF-8 correctness. To make sure your entire site is clean, or to fix it so that it works, you might use Simeon Warner's utf8conditioner, found on the OAI tools page or downloadable from http://www.cs.cornell.edu/people/simeon/software/utf8conditioner/

0715

InterWiki

  • UTF8轉換big5程式
  • 參考資料
簡易的使用PHP做編碼轉換
Windows下安裝PHP的iconv的方法
<?
$t = $_GET['q'];
$i = $_GET['input'];
$o = $_GET['output'];
if (!$f=file_get_contents($t) and !$mime=mime_content_type($t)) {
    die("Failed");
}

$f = iconv($i,$o,$f);
header('Content-Type: $mime; charset=$o');
echo $f;
exit;
?>
  • 目前測試結果@ndap
Warning: file_get_contents(謝國城): failed to open stream: Invalid argument in D:\web\changecharset.php on line 5

Fatal error: Call to undefined function: mime_content_type() in D:\web\changecharset.php on line 5
  • 目前測試結果@TwBsBall → 一片空白...@_@
  • 結論:目前測試 q 以Utf8編碼傳送 $t 可以轉換為Big5編碼的字串,但此程式原本用於RSS訂閱轉換編碼用,所以是抓取檔案內容編碼轉換,應加以改成:
  1. 只抓取 q 字串轉換;
  2. 將 $t 再丟回 http://ndap.dils.tku.edu.tw/site/search/select.asp?q=$t 作查詢動作。
  • 對php函數意義不太瞭解...如何達成這兩部分還要研究研究...

Wiki

  • wiki每頁出現的副標題
→ 其實加的副標題是對的,會出現在每頁標題下,但是很怪預設面板中卻沒有,可換成其他面板就會出現。
→ 更怪的是呢...去看了面板的檔案,卻只在MonoBook中有找到引用tagline這個參數,另外有出現副標的其他面板卻沒找到這個參數,
    但我非常確定那副標的確是引用tagline這個參數阿...@@"...不知該怎麼改才能讓副標出現...*惱*
Tagline.jpg

0726

Wiki

  • 名人錄轉換DC格式
目標:以interwiki的寫法轉出DC格式的名人錄頁面內容。
→ 目前的作法是想利用<cur_title對應文字>為開頭以及<↓>為結尾,以InStr與Mid來查找該段敘述的位置。
。&nbsp;
dc:王貞治
try:王貞治
dc:陳金鋒
try:陳金鋒
dc:林易增
try:林易增
  • 結論:本來想法是直接送出頁面標題,但是因為編碼問題,所以先改用cur_id,可是結果還是不行>_<,
   如何讓BIG5與UTF8互通,真是個大問題呢!

0728

Wiki

  • 心得:
1. 以機構命名之頁面名稱,較易產生混淆,故更改為「機構名+棒球隊」,但若該球隊有其慣用或特殊名稱,則應以轉向功能指定至完整名稱之頁面。
2. 單一頁面名稱,若可代表兩個頁面,則該如何標示呢?!
→ 目前參考紅葉之注錄方式,以同位語稱之。
  • 如:兄弟棒球隊可代表
→ 成棒時期 ─ 業餘球隊 兄弟飯店棒球隊
→ 職棒時期 ─ 職業棒球隊 兄弟象隊
3. 此外,不了解兄弟飯店該做轉向至兄弟飯店棒球隊,還是該視兄弟飯店為棒球相關機構加以闡述內容呢?
→ 目前做法先將兄弟飯店視為一機構,參考台北市立棒球場注錄方式加以闡述。

0729

Wiki

  • 心得:
1.相關賽事、組織與地點,應區分其內容,而在各別內容中提及三者之關係,以便於使用者釐清。
→ 如:
→ 所以我國參加之各屆賽事應注錄於世界少棒聯盟錦標賽,而在世界少棒聯盟威廉波特中應提及其三者之關係。
2. 兄弟飯店應算是一組織還是一地點呢? 可能需要稍為討論一下。
→ 目前先注錄為「頁面分類: 地點 | 國內地點 | 組織 | 國內組織」
3. 建立Template:消歧義,用以說明該頁面可能代表之個別異意,以便利使用者區別。
→ 目前用於兄弟棒球隊與榮工少棒隊。
→ 同名同姓之人不知能否使用此概念?