維基專題:微格式

維基百科,自由的百科全書
(重新導向自Wikipedia:微格式專題
微格式專題
捷徑UF
分類使用微格式的模板
維基共享資源Commons:Category:Templates generating microformats Templates generating microformats
用戶框{{User Pigsonthewing Microformats}}

什麼是微格式?[編輯]

微格式(Microformat),是通過語意相關讓內容人機可讀。網頁上的允許的微格式數據包括事件、人物、地點等,它可以被其他的軟體檢測到,並提取出相應的信息,以及對信息進行索引,搜索,跨平台的參考,把這些信息以其他形式重複使用或組合。

從技術上來說,這些數據是一些語義標記,用標準的(X)HTML中的class名稱設置。他是開放、可用、自由的,可以被任何人使用。

例如一個地理坐標:52.48,-1.89,普通人無法理解這些數字的含義。現在我們可以把它做成微格式(geo),表示如下:

      <span class="geo"><span class="latitude">52.48</span>, <span class="longitude">-1.89</span></span>

這樣機器就可以正確地理解這些數字的含義,可以對他進行索引,在地圖上看他的位置,把它導出到GPS設備,以及其他的用途。

其他還有很多的微格式,還有很多正在開發階段。

Firefox3和[1][2]Internet Explorer8都將可能支持微格式。[3]

在維基百科上如何使用微格式?[編輯]

可以通過模板在單個頁面上使用微格式。這也就是說一般的編輯者不需要知道如何使用這些複雜的微格式標記,只需要知道如何使用模板就可以。大部分的模板都需要做一些小修改,為目前的內容增加上微格式的標記。

Firefox 瀏覽器可以通過使用 OperatorMobile 擴展讀取並使用維基百科條目上的微格式數據。

microdata[編輯]

Mediawiki自1.21/wmf5起,支持"data", "time", "meta", and "link"元素

參與者[編輯]

用戶框[編輯]

在用戶頁上使用{{User Pigsonthewing Microformats}}來表示你參與這個項目。

橫幅[編輯]

在相應條目的對話頁放{{ProjectMicroformats}}。

Meta templates[編輯]

For articles[編輯]

For talk pages[編輯]

模板文檔[編輯]

分類[編輯]

相關項目[編輯]

任務[編輯]

需要志願者!

  • 增加hCard標記到與人物和地點有關的模板,可以參考一些例子
  • 完善{{coord}}系統,添加geo標記並更新相關條目。

當前可用微格式[編輯]

Geo[編輯]

Geo 用來標記地理坐標(經度和緯度)。

Geo 可以被索引(例如"尋找距離X地點2公里範圍內的所有地點"),在其他網站上看這個地點,或者為 GPS 等設備提供支持。

維基百科上所有的地點性質的條目都應該使用。

在維基百科上,{{coord}} 將 Geo 格式應用到坐標上。 它被設計用來替換 coor 模板家族,簡化數據條目。

請參考:

維基百科上的 Geo 舉例[編輯]

參考 Category:經緯模板

舉例:

拓展[編輯]

There are three active proposals, none mutually-exclusive, and all backwards-compatible, to extend the geo microformat:

hCard[編輯]

en:hCard可以提供人物 (人物條目和用戶屬性), 組織和地點的詳細信息。

See Wikipedia:WikiProject Microformats/hcard for more.

hCalendar[編輯]

en:hCalendar則是提供事件的信息,可以直接把這些信息添加到日曆、日程表或網站上。

維基百科上的歷史上的今天欄目,新聞動態欄目應該會用的上(電視劇或電視節目?)


hAtom[編輯]

hAtom is for making feeds.

hReview[編輯]

hReview is for marking up reviews, and could be used by, for example, Template:Infobox Album.

Other[編輯]

Pseudo-microformats[編輯]

Though not formally microformats (because they have not been developed using the "microformats process", and/ or involve hidden metadata), the following are related:

Under development[編輯]

Species[編輯]

The draft species microformat has been applied to the {{Taxobox}} template (with 37,140 examples as at the time of posting).

It is recognised by the Operator extension for Firefox (using an add-in user script, itself in development).

Wikipedia editors are invited to comment on or contribute to the development of this microformat, via Template talk:Taxobox#'Species' microformat, or the "microformats-new" mailing list.

"Species" will allow the disambiguation of common names, and the lookup of species in databases, recording software, etc. - and the look up from such sites or software, on Wikipedia.

Forthcoming[編輯]

Citations[編輯]

The proposed citation microformat will obviously be very relevant to Wikipedia, both for on-page citations and bibliographies, and for allowing people to cite Wikipedia, elsewhere. See Template talk:Cite book#Use in Bibliography and User:Omegatron#COinS for work which is laying some of the groundwork for application of that microformat, once it is ready.

Citation microformats would allow the look-up of cited articles or books in libraries or shops, and the extraction of citation data for the page being voted, if it is to be cited elsewhere.

Currency[編輯]

The proposed currency microformat may be useful, especially if the suggestion to include a date field for historical amounts is included., for example, on 1922 in Germany

  • "Despite the ending of cash payments for the rest of 1922, the main cause of Germany's inability to pay, the steady depreciation of the mark, was ongoing. Towards the end of the year it assumed a disastrous rapidity. On August 1, the US Dollar still stood at 643 Marks to the Dollar and the British Pound at 2,850 Marks to the Pound. But on September 5 the dollar had already risen to 1,440 Marks and the pound to 6,525 Marks, and in December the pound was worth between 30,000 and 40,000 marks and the dollar between 7,000 and 9,000."

Currency would allow automatic conversion of amounts into other currencies ("how much is that in dollars?") or time ("how much would that be today?")

Other MediaWiki uses[編輯]

Wikivoyage[編輯]

Wikivoyage is using microformats, not least in Wikivoyage listings

問題[編輯]

  • We need to be able to add classes to internal and external links, to generate, for example:
<a href="example.com" class="xxx">

or:

<a href="example.com" rel="yyy">

or a combination of both, where "xxx" is a valid microformat attribute such as "url" and "yyy" is a valid rel attribute such as "directory", "tag" or "colleague" (the latter from XFN).


參考文獻[編輯]

  1. ^ Resig, John. Microformats in Firefox 3. 2007-02-01 [2007-03-25]. 
  2. ^ Kaply, Mike. Microformats and Firefox 3 (for Developers). 2007-05-09 [2007-05-23]. 
  3. ^ Bounds, Darren. Microsoft drops hints about Internet Explorer 8. 2007-05-02 [2007-05-02]. 

維基百科專題列表

 

維基百科專題委員會

 

維基百科專題指引