From 1cc8c9f6be22084ca2f082f0b0d5e910aa8eacf2 Mon Sep 17 00:00:00 2001 From: "James R. Cogley" Date: Wed, 4 Dec 2024 10:40:10 +0900 Subject: [PATCH] Refactor holidays pull from TLS1.2 server to use curl --- _config.ts | 6 ++ deno.lock | 125 +++++++++++++++++++++++++++++++++- src/_data.ts | 11 +++ src/_data/futureholidays.json | 1 + src/repo-readme.vto | 2 +- 5 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 src/_data/futureholidays.json diff --git a/_config.ts b/_config.ts index 2a8add8..0e679d0 100644 --- a/_config.ts +++ b/_config.ts @@ -14,11 +14,17 @@ site.ignore("README.md"); site.ignore("*.DS_Store"); site.ignore("archive"); +// Prepare script to get holidays from dbflex +site.script("getholidays", "cd src/_data && curl https://pro.dbflex.net/secure/api/v2/15331/${API_KEY_01}/Work%20Holiday/API%20Holidays%20Today%20or%20Later/select.json -o futureholidays.json"); + // Prepare script to copy the generated readme to the repo root site.script( "copyreadme", "cd _site && cp repo-readme.md ../README.md", ); + +// Execute scripts before build +site.addEventListener("beforeBuild", "getholidays"); // Execute scripts after build site.addEventListener("afterBuild", "copyreadme"); diff --git a/deno.lock b/deno.lock index 5f8ce73..b3c70ff 100644 --- a/deno.lock +++ b/deno.lock @@ -508,7 +508,9 @@ }, "redirects": { "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts", - "https://deno.land/x/rss/mod.ts": "https://deno.land/x/rss@1.1.1/mod.ts" + "https://deno.land/x/decurl/decurl.ts": "https://deno.land/x/decurl@0.13.0/decurl.ts", + "https://deno.land/x/rss/mod.ts": "https://deno.land/x/rss@1.1.1/mod.ts", + "https://esm.sh/ky": "https://esm.sh/ky@1.7.2" }, "remote": { "https://colorjs.io/dist/color.js": "b3ccef6621a9470641f7c23462bc277ac5360ae7da4066762d2f7efa451f9c9c", @@ -525,6 +527,60 @@ "https://deno.land/std@0.170.0/path/posix.ts": "b859684bc4d80edfd4cad0a82371b50c716330bed51143d6dcdbe59e6278b30c", "https://deno.land/std@0.170.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", "https://deno.land/std@0.170.0/path/win32.ts": "7cebd2bda6657371adc00061a1d23fdd87bcdf64b4843bb148b0b24c11b40f69", + "https://deno.land/std@0.203.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee", + "https://deno.land/std@0.203.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56", + "https://deno.land/std@0.203.0/encoding/_util.ts": "f368920189c4fe6592ab2e93bd7ded8f3065b84f95cd3e036a4a10a75649dcba", + "https://deno.land/std@0.203.0/encoding/hex.ts": "d41e9c3f7dd9d4738c40c2b9e6db5eb32e9dc103360291aff63a5c3fccdb45a6", + "https://deno.land/std@0.203.0/fmt/colors.ts": "c51c4642678eb690dcf5ffee5918b675bf01a33fba82acf303701ae1a4f8c8d9", + "https://deno.land/std@0.203.0/fs/_util.ts": "fbf57dcdc9f7bc8128d60301eece608246971a7836a3bb1e78da75314f08b978", + "https://deno.land/std@0.203.0/fs/copy.ts": "23cc1c465babe5ca4d69778821e2f8addc44593e30a5ca0b902b3784eed75bb6", + "https://deno.land/std@0.203.0/fs/empty_dir.ts": "2e52cd4674d18e2e007175c80449fc3d263786a1361e858d9dfa9360a6581b47", + "https://deno.land/std@0.203.0/fs/ensure_dir.ts": "dc64c4c75c64721d4e3fb681f1382f803ff3d2868f08563ff923fdd20d071c40", + "https://deno.land/std@0.203.0/fs/ensure_file.ts": "39ac83cc283a20ec2735e956adf5de3e8a3334e0b6820547b5772f71c49ae083", + "https://deno.land/std@0.203.0/fs/ensure_link.ts": "c15e69c48556d78aae31b83e0c0ece04b7b8bc0951412f5b759aceb6fde7f0ac", + "https://deno.land/std@0.203.0/fs/ensure_symlink.ts": "b389c8568f0656d145ac7ece472afe710815cccbb2ebfd19da7978379ae143fe", + "https://deno.land/std@0.203.0/fs/eol.ts": "f1f2eb348a750c34500741987b21d65607f352cf7205f48f4319d417fff42842", + "https://deno.land/std@0.203.0/fs/exists.ts": "cb59a853d84871d87acab0e7936a4dac11282957f8e195102c5a7acb42546bb8", + "https://deno.land/std@0.203.0/fs/expand_glob.ts": "52b8b6f5b1fa585c348250da1c80ce5d820746cb4a75d874b3599646f677d3a7", + "https://deno.land/std@0.203.0/fs/mod.ts": "bc3d0acd488cc7b42627044caf47d72019846d459279544e1934418955ba4898", + "https://deno.land/std@0.203.0/fs/move.ts": "b4f8f46730b40c32ea3c0bc8eb0fd0e8139249a698883c7b3756424cf19785c9", + "https://deno.land/std@0.203.0/fs/walk.ts": "a16146724a6aaf9efdb92023a74e9805195c3469900744ce5de4113b07b29779", + "https://deno.land/std@0.203.0/path/_basename.ts": "057d420c9049821f983f784fd87fa73ac471901fb628920b67972b0f44319343", + "https://deno.land/std@0.203.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://deno.land/std@0.203.0/path/_dirname.ts": "355e297236b2218600aee7a5301b937204c62e12da9db4b0b044993d9e658395", + "https://deno.land/std@0.203.0/path/_extname.ts": "eaaa5aae1acf1f03254d681bd6a8ce42a9cb5b7ff2213a9d4740e8ab31283664", + "https://deno.land/std@0.203.0/path/_format.ts": "4a99270d6810f082e614309164fad75d6f1a483b68eed97c830a506cc589f8b4", + "https://deno.land/std@0.203.0/path/_from_file_url.ts": "6eadfae2e6f63ad9ee46b26db4a1b16583055c0392acedfb50ed2fc694b6f581", + "https://deno.land/std@0.203.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://deno.land/std@0.203.0/path/_is_absolute.ts": "05dac10b5e93c63198b92e3687baa2be178df5321c527dc555266c0f4f51558c", + "https://deno.land/std@0.203.0/path/_join.ts": "815f5e85b042285175b1492dd5781240ce126c23bd97bad6b8211fe7129c538e", + "https://deno.land/std@0.203.0/path/_normalize.ts": "a19ec8706b2707f9dd974662a5cd89fad438e62ab1857e08b314a8eb49a34d81", + "https://deno.land/std@0.203.0/path/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", + "https://deno.land/std@0.203.0/path/_parse.ts": "0f9b0ff43682dd9964eb1c4398610c4e165d8db9d3ac9d594220217adf480cfa", + "https://deno.land/std@0.203.0/path/_relative.ts": "27bdeffb5311a47d85be26d37ad1969979359f7636c5cd9fcf05dcd0d5099dc5", + "https://deno.land/std@0.203.0/path/_resolve.ts": "7a3616f1093735ed327e758313b79c3c04ea921808ca5f19ddf240cb68d0adf6", + "https://deno.land/std@0.203.0/path/_to_file_url.ts": "a141e4a525303e1a3a0c0571fd024552b5f3553a2af7d75d1ff3a503dcbb66d8", + "https://deno.land/std@0.203.0/path/_to_namespaced_path.ts": "0d5f4caa2ed98ef7a8786286df6af804b50e38859ae897b5b5b4c8c5930a75c8", + "https://deno.land/std@0.203.0/path/_util.ts": "4e191b1bac6b3bf0c31aab42e5ca2e01a86ab5a0d2e08b75acf8585047a86221", + "https://deno.land/std@0.203.0/path/basename.ts": "bdfa5a624c6a45564dc6758ef2077f2822978a6dbe77b0a3514f7d1f81362930", + "https://deno.land/std@0.203.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", + "https://deno.land/std@0.203.0/path/dirname.ts": "b6533f4ee4174a526dec50c279534df5345836dfdc15318400b08c62a62a39dd", + "https://deno.land/std@0.203.0/path/extname.ts": "62c4b376300795342fe1e4746c0de518b4dc9c4b0b4617bfee62a2973a9555cf", + "https://deno.land/std@0.203.0/path/format.ts": "110270b238514dd68455a4c54956215a1aff7e37e22e4427b7771cefe1920aa5", + "https://deno.land/std@0.203.0/path/from_file_url.ts": "9f5cb58d58be14c775ec2e57fc70029ac8b17ed3bd7fe93e475b07280adde0ac", + "https://deno.land/std@0.203.0/path/glob.ts": "593e2c3573883225c25c5a21aaa8e9382a696b8e175ea20a3b6a1471ad17aaed", + "https://deno.land/std@0.203.0/path/is_absolute.ts": "0b92eb35a0a8780e9f16f16bb23655b67dace6a8e0d92d42039e518ee38103c1", + "https://deno.land/std@0.203.0/path/join.ts": "31c5419f23d91655b08ec7aec403f4e4cd1a63d39e28f6e42642ea207c2734f8", + "https://deno.land/std@0.203.0/path/mod.ts": "6e1efb0b13121463aedb53ea51dabf5639a3172ab58c89900bbb72b486872532", + "https://deno.land/std@0.203.0/path/normalize.ts": "6ea523e0040979dd7ae2f1be5bf2083941881a252554c0f32566a18b03021955", + "https://deno.land/std@0.203.0/path/parse.ts": "be8de342bb9e1924d78dc4d93c45215c152db7bf738ec32475560424b119b394", + "https://deno.land/std@0.203.0/path/posix.ts": "0a1c1952d132323a88736d03e92bd236f3ed5f9f079e5823fae07c8d978ee61b", + "https://deno.land/std@0.203.0/path/relative.ts": "8bedac226afd360afc45d451a6c29fabceaf32978526bcb38e0c852661f66c61", + "https://deno.land/std@0.203.0/path/resolve.ts": "133161e4949fc97f9ca67988d51376b0f5eef8968a6372325ab84d39d30b80dc", + "https://deno.land/std@0.203.0/path/separator.ts": "40a3e9a4ad10bef23bc2cd6c610291b6c502a06237c2c4cd034a15ca78dedc1f", + "https://deno.land/std@0.203.0/path/to_file_url.ts": "00e6322373dd51ad109956b775e4e72e5f9fa68ce2c6b04e4af2a6eed3825d31", + "https://deno.land/std@0.203.0/path/to_namespaced_path.ts": "1b1db3055c343ab389901adfbda34e82b7386bcd1c744d54f9c1496ee0fd0c3d", + "https://deno.land/std@0.203.0/path/win32.ts": "8b3f80ef7a462511d5e8020ff490edcaa0a0d118f1b1e9da50e2916bdd73f9dd", "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", @@ -604,6 +660,46 @@ "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", + "https://deno.land/x/byte_type@0.3.0/src/array/array.ts": "508e9c99d08ca3c5c880b1679637fdde93d617255c9e5949359d952e130dcf07", + "https://deno.land/x/byte_type@0.3.0/src/array/array_buffer.ts": "3e78940e9d481e23cc271d14ed9fa4c45e4e7e6bdbcc602f26e8a70ff28ba6bb", + "https://deno.land/x/byte_type@0.3.0/src/array/mod.ts": "e05ffebeb4b90cc2a1565c44f76089f5eabdb44f5e44b225aef47b837eb08dec", + "https://deno.land/x/byte_type@0.3.0/src/array/typed_array.ts": "30d0efa7a8b63c0d0803c03e6dc3491abebc00729f99f6805f28f3a33f07d6f1", + "https://deno.land/x/byte_type@0.3.0/src/bitflags/_common.ts": "0b6bbfa1a39e9301f157c4f552c55d28128e49429d71e6b1c4a270429346b703", + "https://deno.land/x/byte_type@0.3.0/src/bitflags/bitflags16.ts": "1ebd50d376db22cdfaece2ac48505360d34fbf8b207844eaa07ab5d52d1a0856", + "https://deno.land/x/byte_type@0.3.0/src/bitflags/bitflags32.ts": "8e8c9d7ff79d3b19d9e08a37a21887a9b0778eb21d602bbd54cb73d74262e05a", + "https://deno.land/x/byte_type@0.3.0/src/bitflags/bitflags64.ts": "51c89f3836146b534294b28808a3d7744d9b635707eee702f5057733d83e8f2e", + "https://deno.land/x/byte_type@0.3.0/src/bitflags/bitflags8.ts": "d6e71d70c745d1ffcfba9c440628d989790ce271b61688d9cf12f99a2466be73", + "https://deno.land/x/byte_type@0.3.0/src/bitflags/mod.ts": "1897c05a4349ab257e80125968cab75103b57c90620e9cf5f0e6747c95f1541e", + "https://deno.land/x/byte_type@0.3.0/src/compound/mod.ts": "ec09d5a20d1c77f62fdd7ec2bcd57ccf72516bedef0ec652a5d7fd7b9d400d6f", + "https://deno.land/x/byte_type@0.3.0/src/compound/struct.ts": "f513de2a5e7605521615695b31e8df3d39dc62500dd8acf8afb19b15208bfa80", + "https://deno.land/x/byte_type@0.3.0/src/compound/tagged_union.ts": "0d0a0345c60eb471ade595f6c922056612b7fe276b30dc1081ef18d4701cfd5a", + "https://deno.land/x/byte_type@0.3.0/src/compound/tuple.ts": "339be2611bfdbaff3a8e590adeb50d5b70c4d2156446cf2097f0a350e78727e9", + "https://deno.land/x/byte_type@0.3.0/src/mod.ts": "855780c4734004714af53c5184782a22f01747094c4f1c53d60947186f3914c1", + "https://deno.land/x/byte_type@0.3.0/src/primitives/bool.ts": "44ffce3af4124d73e32b0be99771ca40120e443cdbae00b664d1186daf3f8c2a", + "https://deno.land/x/byte_type@0.3.0/src/primitives/f32.ts": "526e69a9c9ec0c789c8ce4a99d2fa682f62084816d33f77fa983d3edf8172dad", + "https://deno.land/x/byte_type@0.3.0/src/primitives/f64.ts": "93f906ab13c0d892cff8f0ee2a535b1879891e51fb71b58c7a04c062c2c16cdf", + "https://deno.land/x/byte_type@0.3.0/src/primitives/i16.ts": "2b67df808ec7e8aed88208ea3ecf6d2d1f839e6cec1412d6de60a71af6b1b049", + "https://deno.land/x/byte_type@0.3.0/src/primitives/i32.ts": "bbe02f3cd67cedac6e57b4405d65e9b6d63b0c70e97a2009fff0c80ff25c6c88", + "https://deno.land/x/byte_type@0.3.0/src/primitives/i64.ts": "a463af6e9bddd4679ec3781f9ba4fc8b57f7c33009501b684129e6ad4ef91da8", + "https://deno.land/x/byte_type@0.3.0/src/primitives/i8.ts": "7364275ad10b940c7ca771b61e4d0165894c2e2da6bd7b9a76c70a16630b8fb6", + "https://deno.land/x/byte_type@0.3.0/src/primitives/mod.ts": "cf6fd271c658b77ed27da3589342ff4c508af041ac97bf05c764bfc3814591ef", + "https://deno.land/x/byte_type@0.3.0/src/primitives/u16.ts": "7304d0c19d4f7dd27b355831e104947a62d8ec4b073340d4a76883ebcbf347bc", + "https://deno.land/x/byte_type@0.3.0/src/primitives/u32.ts": "848d5146bd1648751f1427651217e8d8fcd62449dd053fed1044bed3edaa4b41", + "https://deno.land/x/byte_type@0.3.0/src/primitives/u64.ts": "538eca5e167c297cc34b3ab983811ef9c21439748a6f5b681c2599b65b08fd20", + "https://deno.land/x/byte_type@0.3.0/src/primitives/u8.ts": "d9faa4a3d1a18778b8694762488858b3c77f85e0fad38609a135934107bfd345", + "https://deno.land/x/byte_type@0.3.0/src/string/_common.ts": "35c46f52cde3136b7a0888128f61dc0760b387baf2174dac681aa5666b4b5cb0", + "https://deno.land/x/byte_type@0.3.0/src/string/cstring.ts": "fe18faad82fb343cffd5546fd75246463848cdf613c669e14010cd20c254ab75", + "https://deno.land/x/byte_type@0.3.0/src/string/fixed_length.ts": "45741bd8618edd6fc03a7677e4329f2fec158495cbe3c1b89b04e2e70a8e02ac", + "https://deno.land/x/byte_type@0.3.0/src/string/mod.ts": "3d13829eefc7e781f2be70d62fbc1ac5e14ba30fec62bb713094ebec479e2aef", + "https://deno.land/x/byte_type@0.3.0/src/types/_common.ts": "19c32655a01fe4cdadf71260357cfcae940ae5eac3ff08201abd8731e7741ef8", + "https://deno.land/x/byte_type@0.3.0/src/types/mod.ts": "f14f7b1d48e83401ab6b416adf67dccd255e8fb05d690e34d5654fc59338bec1", + "https://deno.land/x/byte_type@0.3.0/src/types/sized.ts": "2f84cb2ed48e16b7032d4c403ef81caef4ac28cdab187772b922fc9e08400bf5", + "https://deno.land/x/byte_type@0.3.0/src/types/unsized.ts": "06c7d7628b599c6b8f9ddfd75ba081ba007520cac2ec514efc0bdd933150c988", + "https://deno.land/x/byte_type@0.3.0/src/util.ts": "04aaedb551a1f221c69e20ac4de3798ef8466b382cb9157aed82db91d1273066", + "https://deno.land/x/byte_type@0.3.0/src/varint/_common.ts": "c7430bfb243b2311e852c45664194e3c2fd7c6cd61ff03292410fca89101ec2d", + "https://deno.land/x/byte_type@0.3.0/src/varint/i32_leb128.ts": "e3cbceae48c41fbb8217db5f1bfe95327e1983ae2d94d8567e02e0fce26b78c6", + "https://deno.land/x/byte_type@0.3.0/src/varint/i64_leb128.ts": "4b753df957d5d84d3b9b66369686a2d13569505190f0c3cb563326cae388da78", + "https://deno.land/x/byte_type@0.3.0/src/varint/mod.ts": "f52855601abd19c9af3cdc4e19afde4b57a0d567b99a807063b6a3761b783bba", "https://deno.land/x/cliffy@v0.25.7/_utils/distance.ts": "02af166952c7c358ac83beae397aa2fbca4ad630aecfcd38d92edb1ea429f004", "https://deno.land/x/cliffy@v0.25.7/ansi/ansi.ts": "7f43d07d31dd7c24b721bb434c39cbb5132029fa4be3dd8938873065f65e5810", "https://deno.land/x/cliffy@v0.25.7/ansi/ansi_escapes.ts": "885f61f343223f27b8ec69cc138a54bea30542924eacd0f290cd84edcf691387", @@ -686,6 +782,9 @@ "https://deno.land/x/cliffy@v0.25.7/table/row.ts": "5f519ba7488d2ef76cbbf50527f10f7957bfd668ce5b9169abbc44ec88302645", "https://deno.land/x/cliffy@v0.25.7/table/table.ts": "ec204c9d08bb3ff1939c5ac7412a4c9ed7d00925d4fc92aff9bfe07bd269258d", "https://deno.land/x/cliffy@v0.25.7/table/utils.ts": "187bb7dcbcfb16199a5d906113f584740901dfca1007400cba0df7dcd341bc29", + "https://deno.land/x/decurl@0.13.0/decurl.ts": "841e529a66905accc93d3a9ee3bb7ebc85cd4d8c646019513db8dfd63c707385", + "https://deno.land/x/decurl@0.13.0/libcurl.ts": "4fff7d67b5a4a091a30cfeb995d1be50591c6c18ac90ab37febb6049d213ef50", + "https://deno.land/x/decurl@0.13.0/types.ts": "b758061777c06f2ab43deffc23f6354d25e2dff0d579c73e86f6a76c811182f8", "https://deno.land/x/deno_dom@v0.1.48/build/deno-wasm/deno-wasm.js": "d6841a06342eb6a2798ef28de79ad69c0f2fa349fa04d3ca45e5fcfbf50a9340", "https://deno.land/x/deno_dom@v0.1.48/deno-dom-wasm.ts": "0669396686fb207f1354af33df6aabe2189b4eceafdb1bf7f3d6bbb2637b6b03", "https://deno.land/x/deno_dom@v0.1.48/src/api.ts": "0ff5790f0a3eeecb4e00b7d8fbfa319b165962cf6d0182a65ba90f158d74f7d7", @@ -816,6 +915,11 @@ "https://deno.land/x/lume@v2.4.2/types.ts": "516bec311f10083c5b1d8109e8afd17f02b49cc62c45dca53706f286cb855dba", "https://deno.land/x/lume_icon_plugins@v0.1.1/catalogs/simpleicons.ts": "85d347e9ce7c34b9d5ca99dda76b62c50b3e8a27d7e9bceabecdad117f216d4c", "https://deno.land/x/lume_icon_plugins@v0.1.1/simpleicons.ts": "bfaa95a4f74b4813e09b1bd2d34fb02d1571671e0a8ad1db91f392d6479da6f3", + "https://deno.land/x/plug@1.0.3/deps.ts": "91d5b264dd7374bf6f4f544fa0ddef12f1c6fddc10840314f5fb6aeeadb64396", + "https://deno.land/x/plug@1.0.3/download.ts": "b92bc1c1ae35fdb75828847f1ebfc7e51bf462f339729740e1cffe78384e1509", + "https://deno.land/x/plug@1.0.3/mod.ts": "5dec80ee7a3a325be45c03439558531bce7707ac118f4376cebbd6740ff24bfb", + "https://deno.land/x/plug@1.0.3/types.ts": "0490359117c53783138f2b6692a34f85bca9237314ba8cdef8ad682d81218d21", + "https://deno.land/x/plug@1.0.3/util.ts": "ded3db6e9bb16b8003899d9073fb310e13231ca617b35d6b7dfd53f38762cc76", "https://deno.land/x/rss@1.1.1/deps.ts": "24c068a645f2af4e56c2fac530254446ce357b03e994a4dff9826820c09e00fd", "https://deno.land/x/rss@1.1.1/mod.ts": "95cfd02a4326a8f3516b16fcd30a8448e96c0f6c05b9f86cac57f021e4032983", "https://deno.land/x/rss@1.1.1/src/deserializer.ts": "bdd109f11983d4544e68ec997e0589f010e6bb81275472d7bd32bbdf0ec9a624", @@ -827,6 +931,11 @@ "https://deno.land/x/rss@1.1.1/src/resolvers/rss1_resolver.ts": "52de61df37f29f2574cfe52f44171b0c2a83211944f62896a6774be36edc5c46", "https://deno.land/x/rss@1.1.1/src/resolvers/rss2_resolver.ts": "543ddaf6df3ff27d8f89a9253a6b18f7287839d8b65465bda5839152f075923f", "https://deno.land/x/rss@1.1.1/src/resolvers/slash_resolver.ts": "468167c5a0e6df0baabe75000133087919a7edcfc804486c2512978f78bd5123", + "https://deno.land/x/rss@1.1.1/src/resolvers/types/resolver_result.ts": "c0b211a60e799da35911aa8e6a4e882b2282261db00f94288fdc353054bd55b3", + "https://deno.land/x/rss@1.1.1/src/types/atom.ts": "49726f13bce85e829cbcddff038652a8bc8c55279d8b07194a6b088035168a59", + "https://deno.land/x/rss@1.1.1/src/types/deserialization_result.ts": "4f1c7a44c8c508fca4ce1558c73626ed2505140d85824208bc6512736f48aef7", + "https://deno.land/x/rss@1.1.1/src/types/dublin_core.ts": "3593c2dc780a948d14e7d1da64ce18060a06035d249af6273dcb7abe1b124459", + "https://deno.land/x/rss@1.1.1/src/types/feed.ts": "95f8421e99069a625f267fa8d3d765d606e44eebcedc8967ae9994cde2f62127", "https://deno.land/x/rss@1.1.1/src/types/feed_type.ts": "b2098f23982be344a19f00915437550d1e4002fb653ac9e34455a90119ee4e6c", "https://deno.land/x/rss@1.1.1/src/types/fields/atom_fields.ts": "85bf1a4b3e917baa3c94f3fba8283b678d5a10e78a16c42cfa19b2ee0bf210b3", "https://deno.land/x/rss@1.1.1/src/types/fields/dublin_core_fields.ts": "fd6b7e5b660a4f99cabb7a62ae91ab48579de340e57c8dd7ad62c992e64c1644", @@ -834,8 +943,18 @@ "https://deno.land/x/rss@1.1.1/src/types/fields/rss1_fields.ts": "04da9ca7d3fe2b59626c6b3bd18bfd41bf1b1531bc33f2d4f420f10da4e84f7e", "https://deno.land/x/rss@1.1.1/src/types/fields/rss2_fields.ts": "c5041472e42cdf04e9f6b2e6e2e334b016aff40524c9a4a4f2c3a5875f9508ea", "https://deno.land/x/rss@1.1.1/src/types/fields/slash_fields.ts": "11a1cf81744fe3b2bddbcf3a3ce6f86406d250198ef8c41e6fa58dd652e2e466", + "https://deno.land/x/rss@1.1.1/src/types/internal/internal_atom.ts": "71427068e4716e11d4af7ee49d06000c5ad8e7bed91395661285c025a9964d53", "https://deno.land/x/rss@1.1.1/src/types/internal/internal_dublin_core.ts": "8b25fd4e4d296068c78da9dafb5af43cf58e2202d236a636068395722119309a", + "https://deno.land/x/rss@1.1.1/src/types/internal/internal_media_rss.ts": "9dc16a181e9c202d2f69a458dfe452875176f0d118ed32d8fafd4733f074a967", + "https://deno.land/x/rss@1.1.1/src/types/internal/internal_rss1.ts": "844a931f74950bf50415758f236ed9b7df8a9d9996326582365d721378794974", + "https://deno.land/x/rss@1.1.1/src/types/internal/internal_rss2.ts": "84a63a3dbeddc50e7a61303b083abc351d2287b5ac715eca4f4db8f4b006b504", + "https://deno.land/x/rss@1.1.1/src/types/json_feed.ts": "9c1ca23c484166d9e3eb17aa1f0070b2edbd7205c045e5f10e5035e6991bb62d", + "https://deno.land/x/rss@1.1.1/src/types/media_rss.ts": "ff975e5f6f71291c904caf86b9f0b033f946dd6969f8e184ef031b93981a0c15", + "https://deno.land/x/rss@1.1.1/src/types/open_tag.ts": "89bc7d8c972bdd184dc9b784e8ec04114ba6bc04da33567f814cf1b295fe942d", + "https://deno.land/x/rss@1.1.1/src/types/rss1.ts": "30335c0ec9c02e5ebb0ffbe5d8341a23b9c261cd85a7a7780bb6f9523fe406f9", + "https://deno.land/x/rss@1.1.1/src/types/rss2.ts": "e71052107ea616cbd74e2c2e3c2f0c42680a97ec9ce2edfd6f440ab98ff89581", "https://deno.land/x/rss@1.1.1/src/types/slash.ts": "2683b96e783146bb5b63ad487702be35f2d721129851aa09caa2ec73a4027a25", + "https://deno.land/x/rss@1.1.1/src/types/value_field.ts": "27bf4039789ad4fc2044137de736651d0e416dfd461e8dda9b0800cc735900d3", "https://deno.land/x/rss@1.1.1/src/util.ts": "65e8200cdb00666b441883358e178b2a86a76ae5544d27c2297181075ca13f4b", "https://deno.land/x/vento@v1.12.11/deps.ts": "47ad104c87a32292e978f0fba4f69954f7feff3b403833858e1cc51c5313e9db", "https://deno.land/x/vento@v1.12.11/mod.ts": "296c9cc4253c1b88a94fc630a05d9a12947a908966f2db43968141f1c282a7d6", @@ -856,6 +975,8 @@ "https://deno.land/x/vento@v1.12.11/src/js.ts": "c4ac5e2b2cd2995523d3167c5708c424686fd30d2d3951ff965a76dbdfb74e37", "https://deno.land/x/vento@v1.12.11/src/loader.ts": "c05add67f582e937ee611852075ce2cc038b5e80e3e609eef96fa5ed74a5086c", "https://deno.land/x/vento@v1.12.11/src/tokenizer.ts": "127ddad02054f63b8b646e4dfbf555e1e34e9b8dcbd58d86b3729a4de95abd27", - "https://deno.land/x/vento@v1.12.11/src/transformer.ts": "587a0b107a2bd1437a3093c4c44c07e4fdf3abfaaf8e845767b69bd34a039154" + "https://deno.land/x/vento@v1.12.11/src/transformer.ts": "587a0b107a2bd1437a3093c4c44c07e4fdf3abfaaf8e845767b69bd34a039154", + "https://esm.sh/ky@1.7.2": "5238ce1d59e224c5ac583a5d5a77f455d74860cbdc54f09bc170c7469983b7d5", + "https://esm.sh/v135/ky@1.7.2/denonext/ky.mjs": "b5a85e5c12a91004096c4acf413d55cbc659139fb95455136aebcb73916ef95c" } } diff --git a/src/_data.ts b/src/_data.ts index 925ed51..ba13a13 100644 --- a/src/_data.ts +++ b/src/_data.ts @@ -109,3 +109,14 @@ console.log("DENO_INSTALL:", envdenoinstall); // console.log("env:", env); // console.log(holidays2); // console.log(holidays); + +// test import holiday json file +import fh from "./_data/futureholidays.json" with { type: "json" }; +const dateToMatch = "2024-12-28"; +// Step 1: Filter the array to find the object(s) with the matching 'date' +const filteredData = fh.filter(item => item['Date in YYYY-MM-DD'] === dateToMatch); + +// Step 2: Map the filtered results to return the desired value ('user name') +const holname = filteredData.map(item => item['Name']); +console.log("MATCHED HOLIDAY:"); +console.log(holname); \ No newline at end of file diff --git a/src/_data/futureholidays.json b/src/_data/futureholidays.json new file mode 100644 index 0000000..1ccece8 --- /dev/null +++ b/src/_data/futureholidays.json @@ -0,0 +1 @@ +[{"@row.id":502,"Date":"2025-11-24T00:00:00+00:00","Date in YYYYMMDD":"20251124","Date in YYYY-MM-DD":"2025-11-24","Day of Week":"Monday","Date with Month Name":"24 Nov 2025","Name":"Substitute holiday (Labor Thanksgiving Day)","Name Jp":"振替休日 (勤労感謝の日)"},{"@row.id":501,"Date":"2025-11-23T00:00:00+00:00","Date in YYYYMMDD":"20251123","Date in YYYY-MM-DD":"2025-11-23","Day of Week":"Sunday","Date with Month Name":"23 Nov 2025","Name":"Labor Thanksgiving Day","Name Jp":"勤労感謝の日"},{"@row.id":499,"Date":"2025-11-03T00:00:00+00:00","Date in YYYYMMDD":"20251103","Date in YYYY-MM-DD":"2025-11-03","Day of Week":"Monday","Date with Month Name":"03 Nov 2025","Name":"Culture Day","Name Jp":"文化の日"},{"@row.id":498,"Date":"2025-10-13T00:00:00+00:00","Date in YYYYMMDD":"20251013","Date in YYYY-MM-DD":"2025-10-13","Day of Week":"Monday","Date with Month Name":"13 Oct 2025","Name":"Sports Day","Name Jp":"スポーツの日"},{"@row.id":497,"Date":"2025-09-23T00:00:00+00:00","Date in YYYYMMDD":"20250923","Date in YYYY-MM-DD":"2025-09-23","Day of Week":"Tuesday","Date with Month Name":"23 Sept 2025","Name":"Autumnal Equinox Day","Name Jp":"秋分の日"},{"@row.id":496,"Date":"2025-09-15T00:00:00+00:00","Date in YYYYMMDD":"20250915","Date in YYYY-MM-DD":"2025-09-15","Day of Week":"Monday","Date with Month Name":"15 Sept 2025","Name":"Respect for the Aged Day","Name Jp":"敬老の日"},{"@row.id":495,"Date":"2025-08-11T00:00:00+00:00","Date in YYYYMMDD":"20250811","Date in YYYY-MM-DD":"2025-08-11","Day of Week":"Monday","Date with Month Name":"11 Aug 2025","Name":"Mountain Day","Name Jp":"山の日"},{"@row.id":494,"Date":"2025-07-21T00:00:00+00:00","Date in YYYYMMDD":"20250721","Date in YYYY-MM-DD":"2025-07-21","Day of Week":"Monday","Date with Month Name":"21 Jul 2025","Name":"Marine Day","Name Jp":"海の日"},{"@row.id":493,"Date":"2025-05-06T00:00:00+00:00","Date in YYYYMMDD":"20250506","Date in YYYY-MM-DD":"2025-05-06","Day of Week":"Tuesday","Date with Month Name":"06 May 2025","Name":"Substitute holiday (Children's Day)","Name Jp":"振替休日(こどもの日)"},{"@row.id":491,"Date":"2025-05-05T00:00:00+00:00","Date in YYYYMMDD":"20250505","Date in YYYY-MM-DD":"2025-05-05","Day of Week":"Monday","Date with Month Name":"05 May 2025","Name":"Children's Day","Name Jp":"こどもの日"},{"@row.id":490,"Date":"2025-05-04T00:00:00+00:00","Date in YYYYMMDD":"20250504","Date in YYYY-MM-DD":"2025-05-04","Day of Week":"Sunday","Date with Month Name":"04 May 2025","Name":"Green Day","Name Jp":"みどりの日"},{"@row.id":489,"Date":"2025-05-03T00:00:00+00:00","Date in YYYYMMDD":"20250503","Date in YYYY-MM-DD":"2025-05-03","Day of Week":"Saturday","Date with Month Name":"03 May 2025","Name":"Constitution Day","Name Jp":"憲法記念日"},{"@row.id":488,"Date":"2025-04-29T00:00:00+00:00","Date in YYYYMMDD":"20250429","Date in YYYY-MM-DD":"2025-04-29","Day of Week":"Tuesday","Date with Month Name":"29 Apr 2025","Name":"Showa Day","Name Jp":"昭和の日"},{"@row.id":487,"Date":"2025-03-20T00:00:00+00:00","Date in YYYYMMDD":"20250320","Date in YYYY-MM-DD":"2025-03-20","Day of Week":"Thursday","Date with Month Name":"20 Mar 2025","Name":"Vernal Equinox Day","Name Jp":"春分の日"},{"@row.id":486,"Date":"2025-02-24T00:00:00+00:00","Date in YYYYMMDD":"20250224","Date in YYYY-MM-DD":"2025-02-24","Day of Week":"Monday","Date with Month Name":"24 Feb 2025","Name":"Substitute holiday (Emperor's Birthday)","Name Jp":"振替休日(天皇誕生日)"},{"@row.id":485,"Date":"2025-02-23T00:00:00+00:00","Date in YYYYMMDD":"20250223","Date in YYYY-MM-DD":"2025-02-23","Day of Week":"Sunday","Date with Month Name":"23 Feb 2025","Name":"Emperor's Birthday","Name Jp":"天皇誕生日"},{"@row.id":484,"Date":"2025-02-11T00:00:00+00:00","Date in YYYYMMDD":"20250211","Date in YYYY-MM-DD":"2025-02-11","Day of Week":"Tuesday","Date with Month Name":"11 Feb 2025","Name":"National Foundation Day","Name Jp":"建国記念の日"},{"@row.id":483,"Date":"2025-01-13T00:00:00+00:00","Date in YYYYMMDD":"20250113","Date in YYYY-MM-DD":"2025-01-13","Day of Week":"Monday","Date with Month Name":"13 Jan 2025","Name":"Coming-of-age Day","Name Jp":"成人の日"},{"@row.id":479,"Date":"2025-01-05T00:00:00+00:00","Date in YYYYMMDD":"20250105","Date in YYYY-MM-DD":"2025-01-05","Day of Week":"Sunday","Date with Month Name":"05 Jan 2025","Name":"New Year Holiday","Name Jp":"年始休み"},{"@row.id":478,"Date":"2025-01-04T00:00:00+00:00","Date in YYYYMMDD":"20250104","Date in YYYY-MM-DD":"2025-01-04","Day of Week":"Saturday","Date with Month Name":"04 Jan 2025","Name":"New Year Holiday","Name Jp":"\t年始休み"},{"@row.id":482,"Date":"2025-01-03T00:00:00+00:00","Date in YYYYMMDD":"20250103","Date in YYYY-MM-DD":"2025-01-03","Day of Week":"Friday","Date with Month Name":"03 Jan 2025","Name":"New Year Holiday","Name Jp":"年始休み"},{"@row.id":481,"Date":"2025-01-02T00:00:00+00:00","Date in YYYYMMDD":"20250102","Date in YYYY-MM-DD":"2025-01-02","Day of Week":"Thursday","Date with Month Name":"02 Jan 2025","Name":"New Year Holiday","Name Jp":"年始休み"},{"@row.id":480,"Date":"2025-01-01T00:00:00+00:00","Date in YYYYMMDD":"20250101","Date in YYYY-MM-DD":"2025-01-01","Day of Week":"Wednesday","Date with Month Name":"01 Jan 2025","Name":"New Year Holiday","Name Jp":"年始休み"},{"@row.id":469,"Date":"2024-12-31T00:00:00+00:00","Date in YYYYMMDD":"20241231","Date in YYYY-MM-DD":"2024-12-31","Day of Week":"Tuesday","Date with Month Name":"31 Dec 2024","Name":"Year End Holiday","Name Jp":"年末休み"},{"@row.id":468,"Date":"2024-12-30T00:00:00+00:00","Date in YYYYMMDD":"20241230","Date in YYYY-MM-DD":"2024-12-30","Day of Week":"Monday","Date with Month Name":"30 Dec 2024","Name":"Year End Holiday","Name Jp":"年末休み"},{"@row.id":477,"Date":"2024-12-29T00:00:00+00:00","Date in YYYYMMDD":"20241229","Date in YYYY-MM-DD":"2024-12-29","Day of Week":"Sunday","Date with Month Name":"29 Dec 2024","Name":"Year End Holiday","Name Jp":"年末休み"},{"@row.id":476,"Date":"2024-12-28T00:00:00+00:00","Date in YYYYMMDD":"20241228","Date in YYYY-MM-DD":"2024-12-28","Day of Week":"Saturday","Date with Month Name":"28 Dec 2024","Name":"Year End Holiday","Name Jp":"\t年末休み"}] \ No newline at end of file diff --git a/src/repo-readme.vto b/src/repo-readme.vto index b97a4e2..7ff7c5e 100644 --- a/src/repo-readme.vto +++ b/src/repo-readme.vto @@ -6,7 +6,7 @@ date: Git Last Modified **Last Updated:** {{ date |> date('HUMAN_DATETIME') }} **Today is:** {{ todaysDateENUS }} -{{ set today = todaysDateYYYYMMDD }}{{ set holimatch = holidays.filter(item => item['Date in YYYY-MM-DD'] === today ) }}{{ if holimatch.length > 0 }}**It's a holiday in Japan:** {{ holimatch[0]['Name'] }} / {{ holimatch[0]['Name Jp'] }}{{ /if }} +{{ set matchdate = todaysDateYYYYMMDD }}{{ set matchholi = futureholidays.filter(item => item['Date in YYYY-MM-DD'] === matchdate ) }}{{ if matchholi.length > 0 }}**It's a holiday in Japan:** {{ set resultholi = matchholi.map(item => item['Name']) + " / " + matchholi.map(item => item['Name Jp']) }}{{ resultholi }}{{ /if }} ### Hi there 👋