From 0663ed34a45e2db02f6bf2b44e5183106d4c3b59 Mon Sep 17 00:00:00 2001 From: Bill D Date: Tue, 16 Mar 2021 14:10:29 +0400 Subject: [PATCH] oops --- get-verbs.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/get-verbs.js b/get-verbs.js index d6194d1..9fbd425 100644 --- a/get-verbs.js +++ b/get-verbs.js @@ -9,9 +9,10 @@ const fs = require("fs"); const fetch = require("node-fetch"); const path = require("path"); -const { readDictionary } = require("@lingdocs/pashto-inflector"); const collectionPath = path.join(".", "verbs"); -const verbTsFiles = fs.readdirSync(collectionPath) +const verbTsFiles = fs.readdirSync(collectionPath); +const protoModels = require("./dictionary-models.js"); +const Pbf = require("pbf"); const allTsS = [...new Set(verbTsFiles.reduce((arr, fileName) => { const TsS = require("./verbs/"+fileName); @@ -19,7 +20,8 @@ const allTsS = [...new Set(verbTsFiles.reduce((arr, fileName) => { }, []))]; fetch(process.env.LINGDOCS_DICTIONARY_URL).then(res => res.arrayBuffer()).then(buffer => { - const dictionary = readDictionary(buffer); + const pbf = new Pbf(buffer); + const dictionary = protoModels.Dictionary.read(pbf); const entries = dictionary.entries; const allVerbs = getFromTsS(entries); const content = `