Commons:Géppel olvasható adatok
A Wikimédia Commonson rengeteg metaadat (a licencet és a szerzőt is beleértve) nem géppel olvasható. Van egy API-modul (iiprop=extmetadata
), amivel bizonyos adatok kinyerhetők (példa), de mivel az információkat szabad szövegként kell bevinni közvetlenül a fájl leírólapjára, ez nem tökéletes. A folyamatban lévő Strukturált adatok a Commonson projekt célja az adatokat teljesen strukturálttá tenni, és egyszer elavulttá fogja tenni az ezen a lapon bemutatott géppel olvasható adatokat.
In the meantime, and to ease a transition towards more structured data at a future time, Wikimedia Commons use a set of standard templates which have been made machine-readable in some ways, through HTML elements. Some scripts already make use of that. It is worth noting that this data is available for any wiki using Wikimedia Commons, where it can be read from the html of the File: page just as other local data.
Géppel olvasható adatok
Infoboxsablonok által beállított géppel olvasható adatok
These are several standard infobox templates tagging different elements of the template with different tags to allow parsing of the information. Several different styles of tags are used:
- Microformat tags follow industry standards and can be parsed by already existing tools.
- <td> id attributes (identifiers) are custom markings which allow more complete tags, which have to be read by custom tools. Most universal infoboxes have two column structure: column #1 holds name of the field and column #2 holds the value
- Traditionally <td> id attributes were used to tag the name call in the first column in a row. To get the data, you would need to get the contents of the following
<td>
cell in the second column. - {{Creator}} and {{Institution}} templates have more complicated structure, so the cells with the actual data are tagged with
attributes using magenta background
.
- Traditionally <td> id attributes were used to tag the name call in the first column in a row. To get the data, you would need to get the contents of the following
Sablon | Sablonparaméter neve | Leírás | <td> id-attribútuma | Mikroformátum | Megjegyzés |
---|---|---|---|---|---|
{{Information}} | description | fájl leírása | fileinfotpl_desc |
hProduct.description. | Often contains multiple languages annotated with {{Lang}}. |
{{Information}} | date | az eredeti mű készítési dátuma | fileinfotpl_date |
hCalendar vevent.dtstart | Néha a közzététel dátumát – vagy a közzététel dátumát is – tartalmazza. A készítés és a közzététel dátumának szerzői jogi szempontból eltérő jelentése van. A {{Date context}} – ha használva van – tudja jelezni a különbséget. A mikroformátumot a {{Date}} sablon adja hozzá. |
{{Information}} | source | a fájl forrása | fileinfotpl_src |
Often contains entire tables. We have no good way to deal with this source templates yet. Source templates often have references to catalogue IDs, but these are also not machine readable. | |
{{Information}} | author | a fájl szerzője | fileinfotpl_aut |
This can be author, creator and/or copyright holder and is used mixed. Often contains the {{Creator}} template which is described below. | |
{{Information}} | permission | engedély/licenc a fájlhoz | fileinfotpl_perm |
||
{{Information}} | other versions | a fájl más változatai | fileinfotpl_ver |
||
{{Artwork}} | description | a műalkotás leírása | fileinfotpl_desc |
hProduct.description | |
{{Artwork}} | date | az eredeti műalkotás készítésének dátuma | fileinfotpl_date |
hCalendar vevent.dtstart | microformat added by {{Date}} template |
{{Artwork}} | source | a fájl forrása | fileinfotpl_src |
||
{{Artwork}} | artist | a műalkotás készítője | fileinfotpl_aut |
"hProduct.fn value" | |
{{Artwork}} | author | a műalkotás szerzője | fileinfotpl_aut |
"hProduct.fn value" | |
{{Artwork}} | permission | engedély/licenc a fájlhoz és a műalkotáshoz | fileinfotpl_perm |
||
{{Artwork}} | other versions | a fájl más változatai | fileinfotpl_ver |
||
{{Artwork}} | title | a műalkotás címe | fileinfotpl_art_title |
hProduct.fn | |
{{Artwork}} | object type | artwork object type | fileinfotpl_art_object_type |
||
{{Artwork}} | medium | a műalkotás technikája vagy anyaga | fileinfotpl_art_medium |
||
{{Artwork}} | dimensions | a műalkotás méretei | fileinfotpl_art_dimensions |
||
{{Artwork}} | gallery | a műalkotást tároló intézmény | fileinfotpl_art_gallery |
||
{{Artwork}} | location | a műalkotás helye az intézményen belül | fileinfotpl_art_location |
hProduct.locality | |
{{Artwork}} | accession number | a műalkotás leltári száma | fileinfotpl_art_id |
hProduct.identifier | |
{{Artwork}} | object history | a műalkotás származástörténete | fileinfotpl_art_object_history |
||
{{Artwork}} | exhibition history | a műalkotás kiállítástörténete | fileinfotpl_art_exhibition_history |
||
{{Artwork}} | credit line | credit line of the artwork | fileinfotpl_art_credit_line |
||
{{Artwork}} | inscriptions | a műalkotás feliratai | fileinfotpl_art_inscriptions |
||
{{Artwork}} | notes | jegyzetek a műalkotásról | fileinfotpl_art_notes |
||
{{Artwork}} | references | a műalkotáshoz kapcsolódó forráshivatkozások | fileinfotpl_art_references |
||
{{Book}} | Author | a könyv szerője | fileinfotpl_author |
||
{{Book}} | Editor | a könyv szerkesztője | fileinfotpl_book_editor |
||
{{Book}} | Translator | a könyv fordítója | fileinfotpl_book_translator |
||
{{Book}} | Illustrator | a könyv illusztrátora | fileinfotpl_book_illustrator |
||
{{Book}} | Title | a könyv címe | fileinfotpl_book_title |
||
{{Book}} | Subtitle | a könyv alcíme | fileinfotpl_book_subtitle |
||
{{Book}} | Series title | a könyv sorozatcíme | fileinfotpl_book_series-title |
||
{{Book}} | Authority file | névkezelési adatok | fileinfotpl_book_authority |
||
{{Book}} | Publisher | a könyv kiadója | fileinfotpl_book_publisher |
||
{{Book}} | Printer | a könyv nyomtatója | fileinfotpl_book_printer |
||
{{Book}} | Year of publication | a könyv kiadásának dátuma vagy éve | fileinfotpl_date |
||
{{Book}} | Place of publication | a könyv kiadásának helye vagy városa | fileinfotpl_book_place-of-publication |
||
{{Book}} | Language | a könyv nyelve | fileinfotpl_book_language |
||
{{Book}} | Description | a könyv leírása | fileinfotpl_desc |
||
{{Creator}} | Name | a szerző neve | creator |
vCard.fn | |
{{Creator}} | Alternative names | a szerző további nevei | fileinfotpl_creator_alt-name_value |
vCard.nickname | |
{{Creator}} | Description | a szerző nemzetisége és foglalkozása(i) | fileinfotpl_creator_desc_value |
vCard.note | |
{{Creator}} | Date of death | a szerző halálozási dátuma | fileinfotpl_creator_deathdate_value |
||
{{Creator}} | Date of birth | a szerző születési dátuma | fileinfotpl_creator_birthdate_value |
vCard.bday | |
{{Creator}} | Location of birth/death | a szerző halálának helye | fileinfotpl_creator_deathloc_value |
||
{{Creator}} | Location of birth | a szerző születési helye | fileinfotpl_creator_birthloc_value |
||
{{Creator}} | Work period | a szerző munkásságának időszaka | fileinfotpl_creator_work-period_value |
||
{{Creator}} | Work location | a szerző munkásságának helye | fileinfotpl_creator_work-location_valuev |
||
{{Creator}} | Image | a szerzőt ábrázoló festmény vagy fénykép | fileinfotpl_creator_image |
||
{{Creator}} | Authority file | a szerzőhöz kapcsolódó névkezelő rendszerek | fileinfotpl_creator_authority_value |
| |
{{FileContentsByBot}} | (változó) | változó, lásd a {{FileContentsByBot}} sablonban | (various) |
hproduct-by-bot | sok adat van beállítva és folyamatosan nő, lásd a {{FileContentsByBot}} sablont |
{{Photograph}} | title | a fénykép címe | fileinfotpl_art_title |
hProduct.fn | |
{{Photograph}} | description | a fénykép leírása | fileinfotpl_desc |
hProduct.description | |
{{Photograph}} | original description | az eredeti archívum leírása a fényképről | fileinfotpl_desc |
hProduct.description | |
{{Photograph}} | date | az eredeti műalkotás készítési dátuma | fileinfotpl_date |
hCalendar vevent.dtstart | microformat added by {{Date}} template |
{{Photograph}} | medium | a fénykép technikája vagy anyaga | fileinfotpl_art_medium |
||
{{Photograph}} | dimensions | a fénykép méretei | fileinfotpl_art_dimensions |
||
{{Photograph}} | artist | a fénykép készítője | fileinfotpl_aut |
"hProduct.fn value" | |
{{Photograph}} | institution | a műalkotást tároló intézmény | fileinfotpl_art_gallery |
||
{{Photograph}} | location | a fénykép helye az intézményen belül | fileinfotpl_art_location |
hProduct.locality | |
{{Photograph}} | source | a fájl forrása | fileinfotpl_src |
||
{{Photograph}} | permission | engedély/licenc a fájlhoz és a műalkotáshoz | fileinfotpl_perm |
||
{{Photograph}} | other versions | a fájl más változatai | fileinfotpl_ver |
||
{{Photograph}} | accession number | a fénykép leltári száma | hProduct.identifier |
Alternative format for CommonsMetadata
Because the table + id based format proved very hard to add to templates which were not formatted similarly to the Commons information template, CommonsMetadata allows an alternative format, similar to license templates: the whole information template has to be enclosed in a fileinfotpl
class and the tag containing the specific information needs to have a fileinfotpl_*
class (same names as above, but class, not id).
Licencsablonok által beállított géppel olvasható adatok
2010 októbere óta <span class="licensetpl_XXX">
típusú osztályok használatával
licensetpl
- Egy licencet azonosító elem. Beburkolja egy teljes licenc kódját, és egy EGYEDI licencnek kell lennie, nem egy többes licencnek.
licensetpl_short
- A licenc rövid neve: „Public domain”, „CC BY SA 3.0”, „CC by 2.0 fr” stb.
licensetpl_long
- A licenc hosszú neve: „Public domain”, „Creative Commons Attribution-Share Alike 3.0”, „Creative Commons Attribution 2.0 France” stb.
licensetpl_attr_req
- Szükséges-e szerzőmegjelölés. „true” vagy „false”.
licensetpl_attr
- A szükséges szerzőmegjelölés: szabad szöveg.
licensetpl_link_req
- Szükséges-e linkelni a licencre. „true” vagy „false”.
licensetpl_link
- A link a licenc összefoglalójára. „www.creativecommons.org/licenses/by-sa/XXX/YYY”
licensetpl_nonfree
- „true”, ha ez egy nem szabad licenc (nincs használatban a Commonson, csak EDP-vel rendelkező wikiken).
Több azonos műhöz tartozó licensetpl
-blokk be lehet burkolva egyetlen, licensetpl_wrapper
osztályt használó blokkba.
Ezeket az információkat beállító sablonok
- Templates setting
licensetpl
include:
{{PD-Layout}}, {{Cc-by-sa-3.0-migrated}}, {{Cc-by-layout}}, {{Cc-by-sa-layout}}, {{Cc-zero}}, {{FAL}}, {{GFDL}}, {{GFDL-1.2}}, {{GPL}} és {{LGPL}}.
Formázósablonok által beállított géppel olvasható adatok
A stílusformázó sablonok, amik arra vannak, hogy egységes stílust szolgáltassanak különböző nem-licenc sablonoknak, hordoznak géppel olvasható adatokat, amik azonosítják ezeket a sabloncsaládokat.
Sablon | Cél | Osztály neve |
---|---|---|
{{Restriction-Layout}} | used by Restriction tags | restrictiontemplate
|
{{FoP-Layout}} | used by freedom of panorama tags | foptemplate
|
{{Partnership-Layout}} | used by Partnership templates | partnershiptemplate
|
{{Source-Layout}} | used by generic Source templates | sourcetemplate
|
{{Created with}} | used by Created with ... templates | createdwithtemplate
|
Machine readable data set by non-copyright restriction templates
Templates regarding non-copyright legal restrictions carry these classes to identify specific types of restrictions.
Template(s) | Purpose | class name |
---|---|---|
{{Trademarked}} | Trademarked images | restriction-trademarked
|
{{Copydesign}} | Copyrighted designs | restriction-design
|
{{Communist symbol}} | Communist symbols | restriction-communist
|
{{Italy-MiBAC-disclaimer}} {{Soprintendenza}} | Italian cultural goods | restriction-ita-mibac
|
{{Australian Commonwealth reserve}} | Australian reserves | restriction-aus-reserve
|
{{Personality rights}} {{Romania personality rights}} | Personality rights | restriction-personality
|
{{2257}} | Child Protection and Obscenity Enforcement Act warning (United States) | restriction-2257
|
{{Costume}} | Costuming | restriction-costume
|
{{Fan art}} | Fan art | restriction-fan-art
|
{{Currency}} | Currency | restriction-currency
|
{{IHL Symbol}} | Symbols restricted by International Humanitarian Law | restriction-ihl
|
{{Nazi symbol}} | Nazi and fascist symbols | restriction-nazi
|
{{Insignia}} | Official insignia | restriction-insignia
|
Specifikus sablonok által beállított géppel olvasható adatok
More machine-readable data are set. Here is a non-exhaustive list:
- {{Personality rights}}
<span class="commons-template-name" style="display:none" id="commons-template-personality-rights">Personality rights</span>
- {{Credit line}}
<td id="fileinfotpl_credit" class="fileinfo-paramfield fileinfotpl_credit" style=""></td>
Machine-readable data set by location templates
{{Location}} and similar templates add machine-readable geocodes in the following format: <span class="geo">12.34;24.68</span>
(latitude and longitude as floating-point numbers, separated by a semicolon). The coordinates use the en:WGS84 system (same as the GPS and most online maps). See Commons:Geocoding for more details.
Usage
MediaWiki API
(Open in API Sandbox) that returns some useful parameters such as Credit, Artist, LicenseUrl and Copyrighted and is used by Media Viewer, for example.
Scripts using machine-readable data
- MediaWiki:Gadget-Stockphoto.js
- MediaWiki:GallerySlideshow.js
- MediaWiki:Gadget-AddInformation.js
- MediaWiki:FileContentsByBot.js
External tools
See also
- Category:Templates generating microformats
- Commons:WikiProject Microformats
- Category:Files with lack of machine-readability
- Experimental, discontinued projects: Commons:API, Commons:Commons API
Defining new machine readable data
- Do NOT use HTML id's, use classes. An ID can only be used once per page and most of these fields can occur multiple times per page. Consider for instance descriptions of derivative works, which can include information about the original and the derivative.
- When possible, wrap the actual data, not some field header. This last method is historically used for all our Information templates, but much harder to support in the long run.
- Wrap data, not the way the data is formatted.
- Expect that formatting is lost when converting to data. Visual dress up is not part of the information.
- Don't wrap multiple units of information inside one field. There is a difference between a publication date and a creation date. Both are dates, but both are different 'data fields'. Also CC BY-SA-4.0-3.0-2.5 is not a license name, those would be 3 licenses with the name CC BY-SA-##.
- Make sure that the data value has one unit, or outputs one consistent unit.
Problems
There are a few things that are currently NOT or badly recognizable. These include:
- Derivative works
- Works included in works. See also Category:FoP_templates
- licenses derivates or works included in works are a mess.
- Author vs. Copyright holder
- usernames vs 'real names'
- Catalogue IDs etc
- VRTS permissions
- Publication date vs creation date
- Donating institutions of materials
- Anything that is NOT using the above structures is not recognizable at all and will require manual cleanup at some point.
- Heirs: {{Heirs-license}}
- Multilicensed CC works, that use {{Cc-by-3.0,2.5,2.0,1.0}}, {{Cc-by-sa-2.5,2.0,1.0}}, {{Cc-by-sa-4.0,3.0,2.5,2.0,1.0}} or {{Cc-by-all}}.
- Non-licensed works: {{Copyrighted free use}}, {{Attribution}} (Problem, how to describe this grant of rights success ?)
- Improvised File description templates like User:Tevaprapas/Information
- Templates denoting the copyright of partials of the work: {{Copyright information}}