Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenni009 committed Sep 24, 2023
1 parent 3bc2f3b commit 376bc18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"tasks": {
"run": "deno run --allow-read --allow-write main.ts",
"build": "deno compile --allow-read --allow-write main.ts"
},
"imports": {
"flags": "https://deno.land/std@0.202.0/flags/mod.ts"
}
}
9 changes: 5 additions & 4 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// import packages
import { XMLParser } from "npm:fast-xml-parser";
import { decode } from "npm:html-entities";
import { parse } from "https://deno.land/std@0.178.0/flags/mod.ts";
import { parse } from "flags";

// get CLI args
const args = parse(Deno.args);
Expand Down Expand Up @@ -89,14 +89,15 @@ for (let i = 0; i < files.length; i++) {
langData[langKey] ??= {};
continue;
}
const langValue = entry.Property!['@value'];
if (!entry?.Property) continue;
const langValue = entry.Property['@value'];
if (!langValue) continue;
const language = entry['@name'];
if (languageArgs.length && !languageArgs.includes(language.toLowerCase())) continue;
langData[langKey!][language] = decode(langValue, { level: 'xml' });
langData[langKey!][language] = decode(langValue, { level: 'xml' }); // NoSonar this is necessary, for some reason TS complains here :shrug:
}
}
console.log(`${i + 1} / ${files.length} (${Math.round(((i + 1) / files.length) * 100)}%) - Processed ${fullFileName}`);
console.log(`${i + 1} / ${files.length} (${Math.round(((i + 1) / files.length) * 100)}%) - Processed ${fullFileName}`); // NoSonar this is just percentage calculation
}
const textContent = [];
for (const key in langData) {
Expand Down

0 comments on commit 376bc18

Please sign in to comment.