維基專題:微格式
此維基專題目前不活躍。 如果您目前不是該專題的成員,請考慮加入該專題來幫忙。如果活動恢復,或此模板更改錯誤,則此狀態可能會更改。 |
快捷方式 | UF |
---|---|
分類 | 使用微格式的模板 |
維基共享資源 | 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 瀏覽器可以通過使用 Operator、Mobile 擴展讀取並使用維基百科條目上的微格式數據。
microdata
Mediawiki自1.21/wmf5起,支持"data", "time", "meta", and "link"元素
參與者
用戶框
在用戶頁上使用{{User Pigsonthewing Microformats}}來表示你參與這個項目。
橫幅
在相應條目的對話頁放{{ProjectMicroformats}}。
Meta templates
For articles
- {{UF-coord-th}} - table header for columns of coordinates using {{coord}}.
For talk pages
模板文檔
- {{UF-hcard-geo}}
- {{UF-hcard-org}}
- {{UF-hcard-part}}
- {{UF-hcard-person}}
- {{UF-hcard-place}}
- {{UF-coord}}
分類
相關項目
- See also: en:Wikipedia:Metadata
- google提供的一個微格式檢測工具
任務
需要志願者!
當前可用微格式
Geo
Geo 用來標記地理坐標(經度和緯度)。
Geo 可以被索引(例如"尋找距離X地點2公里範圍內的所有地點"),在其他網站上看這個地點,或者為 GPS 等設備提供支持。
維基百科上所有的地點性質的條目都應該使用。
在維基百科上,{{coord}} 將 Geo 格式應用到坐標上。 它被設計用來替換 coor 模板家族,簡化數據條目。
請參考:
維基百科上的 Geo 舉例
舉例:
- Geo (microformat)#Example
- All of the articles using {{template:coord}} . Examples:
- Most of the articles in Category:Lists of coordinates
- Great Barr
- {{Geolinks-AUS-suburbscale}}
- GeoTemplate, which is called by many thousands of other Wikipedia pages.
- Example: the coordinates (top right) in Great Barr link to a list of maps for Great Barr; the latter now has a Geo microformat.
- 在 hCard 數據中使用 Geo 的條目列表:
- Robert Baden-Powell, 1st Baron Baden-Powell Featured Article uses {{coord}}, both "title" and "inline".
拓展
There are three active proposals, none mutually-exclusive, and all backwards-compatible, to extend the geo microformat:
- geo-extension - for representing coordinates on other planets, moons etc., and with non-WSG84 schema
- Of use for Template:Lunar crater data
- geo-elevation - for representing altitude
- geo-waypoint - for representing routes and boundaries, using waypoints
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).
參考文獻
- ^ Resig, John. Microformats in Firefox 3. 2007-02-01 [2007-03-25].
- ^ Kaply, Mike. Microformats and Firefox 3 (for Developers). 2007-05-09 [2007-05-23].
- ^ Bounds, Darren. Microsoft drops hints about Internet Explorer 8. 2007-05-02 [2007-05-02].