Created
December 9, 2014 08:05
-
-
Save mnjul/734ed5543bc1368f38db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// put this Node JS file in ./gaia/apps/keyboard/ and run. | |
// this script iterates through and parses layout js files and lists if | |
// we support a specific keyboard layout, which IMEngine that layout uses, | |
// and if dictionary is available (by this auto correction and prediction works) | |
let fs = require('fs'); | |
const LAYOUTS_DIR = 'js/layouts/'; | |
// dummies | |
const KeyEvent = {}; | |
const KeyboardEvent = {}; | |
let Keyboards = {}; | |
fs.readdirSync(LAYOUTS_DIR).forEach(function(js_filename){ | |
let layout_js = | |
fs.readFileSync(LAYOUTS_DIR + js_filename, {encoding: 'utf-8'}); | |
eval(layout_js); | |
}); | |
Object.keys(Keyboards).forEach(function(key){ | |
var layout = Keyboards[key]; | |
console.log(key + "," + | |
layout.label + "," + | |
layout.imEngine + "," + | |
layout.autoCorrectLanguage); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment