KDE Core/OpenCodes: Difference between revisions

From KDE Community Wiki
No edit summary
Line 5: Line 5:
OpenCodes will be a single git repository containing a set of scripts to maintain the ISO Codes data as well as the data files themselves. The repo will not contain any code APIs to utilise the data, this is to ensure the project is completely standalone and can be utilised by as many other projects as possible.
OpenCodes will be a single git repository containing a set of scripts to maintain the ISO Codes data as well as the data files themselves. The repo will not contain any code APIs to utilise the data, this is to ensure the project is completely standalone and can be utilised by as many other projects as possible.


A python script will use the Wikidata Query API once available (or other tools such as [https://tools.wmflabs.org/wikidata-todo/autolist2.php Autolists] in the interim) to list all Items for the ISO code Property and then obtain all the required Properties for each Item instance. This data will then be merged with any extra fields OpenCodes requires and written to the base set of json files which will be committed to the repo.  
The data files will be in JSON format with a schema defined using the JSON Schema standard will will allow for automated verification and consumption.


A second python script will generate the payload files from the base files in a choice of formats:
A Python script will use the Wikidata Query API once available (or other tools such as [https://tools.wmflabs.org/wikidata-todo/autolist2.php Autolists] in the interim) to list all Items for the ISO code Property and then obtain all the required Properties for each Item instance. This data will then be merged with any extra fields OpenCodes requires and written to the base set of json files which will be committed to the repo.
 
A second Python script will generate the payload files from the base files in a choice of formats:
* Data as separate files for each ISO code instance or a single file containing all instances
* Data as separate files for each ISO code instance or a single file containing all instances
* Translations as .po files or JSON translation files (node.js format, and any others) or inline in data files
* Translations as .po files or JSON translation files (node.js format, and any others required) or inline in data files





Revision as of 14:02, 6 July 2014

The OpenCodes project is part of the KDE Open Data initiative seeking to develop a standard json file format for ISO Codes and to provide a set of data files derived from Wikidata.

Architecture

OpenCodes will be a single git repository containing a set of scripts to maintain the ISO Codes data as well as the data files themselves. The repo will not contain any code APIs to utilise the data, this is to ensure the project is completely standalone and can be utilised by as many other projects as possible.

The data files will be in JSON format with a schema defined using the JSON Schema standard will will allow for automated verification and consumption.

A Python script will use the Wikidata Query API once available (or other tools such as Autolists in the interim) to list all Items for the ISO code Property and then obtain all the required Properties for each Item instance. This data will then be merged with any extra fields OpenCodes requires and written to the base set of json files which will be committed to the repo.

A second Python script will generate the payload files from the base files in a choice of formats:

  • Data as separate files for each ISO code instance or a single file containing all instances
  • Translations as .po files or JSON translation files (node.js format, and any others required) or inline in data files


For Linux installs generated using 'make install' the base files will be installed to /usr/share/opencodes and .po translation files installed to /usr/locale/.

Translations will be sourced from both Wikidata and KDE. It is expected that Wikidata will have a greater number of languages supported than KDE so will be the preferred source, but KDE may have some languages unsupported in WIkidata so we need to cater for this. It is hoped KDE translators will submit translations directly to Wikidata, but we cannot automate this as Wikidata uses CC-0 licensing.

Country Code

JSON File Format

Wikidata Feed

The following Items will be used: