From 2e058526d896ab4ee5173ceb80d1248ac08ff594 Mon Sep 17 00:00:00 2001 From: Pridon Tetradze Date: Sun, 26 Jun 2022 13:46:59 +0400 Subject: Flag ASCII art, remove tabularization & refactor (#3) * initial flag image converter * add flags caching * refactor, remove tabularization, make flag ASCII optional. * update readme * update readme --- src/environment/environment.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/environment') diff --git a/src/environment/environment.ts b/src/environment/environment.ts index ef48c3d..18434f8 100644 --- a/src/environment/environment.ts +++ b/src/environment/environment.ts @@ -2,9 +2,15 @@ import home_dir from "https://deno.land/x/dir@1.4.0/home_dir/mod.ts"; import { join } from "https://deno.land/std@0.144.0/path/mod.ts"; export const environment = { + // Backend from where the information is fetched baseUrl: "https://restcountries.com/v3.1/", + // Update cache if it has been longer than given DAYS since last sync syncInterval: 7, + // Directory where country information should be stored. cacheDir: join(home_dir() as string, ".cache", "countryfetch"), + // Determines the size of ASCII art flag size + flagWidth: 40, + // Fields that should be fetched from API queries: - "all?fields=name,capital,currencies,population,flag,languages,region,subregion,timezones,latlng,capitalInfo,tld", + "all?fields=name,capital,currencies,population,flag,languages,region,subregion,timezones,latlng,capitalInfo,tld,flags", }; -- cgit v1.2.3