From 25ee244cadd79eb5c5ab98087581f4e4663218bb Mon Sep 17 00:00:00 2001 From: Pavlo Karatsiuba Date: Sun, 5 Mar 2023 11:06:03 +0100 Subject: [PATCH] Added log message to see skipped languages. Description typos fixed --- README.md | 2 +- steps/get.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c160093..6a6220f 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ npm i && npm start The above will eventually output a ZIM file to ```dist/``` ## Command line arguments -`--withoutLanguageVariants` uses to exclude languages with County variant. For example `en_ca` will not be present in zim with this argument. +`--withoutLanguageVariants` uses to exclude languages with Country variant. For example `en_CA` will not be present in zim with this argument. Available only on GET step: ```bash diff --git a/steps/get.ts b/steps/get.ts index 2942b5b..a1d7e4a 100644 --- a/steps/get.ts +++ b/steps/get.ts @@ -82,6 +82,7 @@ const fetchLanguages = async (): Promise => { const url = $(item).find('td.list-highlight-background:first-child a').attr('href') const slug = /locale=(.*)$/.exec(url)?.pop() if (argv.withoutLanguageVariants && slug.includes('_')) { + log.info(`Skipping ${slug} language`) return } const name = $(item).find('td.list-highlight-background:first-child a span').text()