2023-12-25 22:44:16 +00:00
|
|
|
import fs from 'fs';
|
|
|
|
import process from 'process';
|
2023-12-26 20:01:14 +00:00
|
|
|
import { diagnosticsRequests, getDiagnostics, parseLsp } from './parser';
|
2023-12-31 15:33:43 +00:00
|
|
|
import { add_personal } from './languagetool';
|
2023-12-25 22:44:16 +00:00
|
|
|
|
|
|
|
if (process.argv.length !== 3) {
|
|
|
|
console.log("Please provide only one pass");
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
const file = fs.readFileSync(process.argv[2]).toString();
|
|
|
|
|
|
|
|
const res = parseLsp(file);
|
|
|
|
|
|
|
|
fs.writeFileSync('./res', res.text);
|
|
|
|
|
2023-12-31 15:33:43 +00:00
|
|
|
//const diag = await diagnosticsRequests(res);
|
|
|
|
const diag = await getDiagnostics(file);
|
|
|
|
|
|
|
|
//add_personal(['AutoML']);
|