Commit e57d2255 authored by LiberIT's avatar LiberIT

fixed up translation command line scripts

parent 2b62de6a
Pipeline #139616379 failed with stages
in 6 minutes and 12 seconds
......@@ -4,22 +4,9 @@
const fs = require('fs');
const input = process.argv[2];
fs.readFile("program/pyashWords.h", "utf8", function(err, contents) {
if (err) return Error(err);
let example = new RegExp(input, 'i');
let lines = contents.split('\n');
let produce = lines.filter((line) => {
return example.test(line);
});
if (produce.length == 0) {
fs.readFile("dictionary_en.json", "utf8", function(err, contents) {
if (err) return Error(err);
let dictionary = JSON.parse(contents);
//console.log(dictionary);
console.log(dictionary.en.blacklist['X' + input]);
});
} else {
console.log(produce.join("\n"));
}
});
#!/bin/bash
cat program/pyashWords.h | grep [email protected]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment