Compare commits

...

2 Commits

Author SHA1 Message Date
adueck 8922d96c55 nicer json for dictionary info file 2023-12-17 18:02:05 +04:00
adueck 1dc8eb0166 updated copyright year on dictionary publish 2023-12-17 18:01:02 +04:00
1 changed files with 5 additions and 3 deletions

View File

@ -19,8 +19,7 @@ const storage = new Storage({
});
const title = "LingDocs Pashto Dictionary";
const license =
"Copyright © 2021 lingdocs.com All Rights Reserved - Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License - https://creativecommons.org/licenses/by-nc-sa/4.0/";
const license = `Copyright © ${new Date().getFullYear()} lingdocs.com All Rights Reserved - Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License - https://creativecommons.org/licenses/by-nc-sa/4.0/`;
const bucketName = "lingdocs";
const baseUrl = `https://storage.googleapis.com/${bucketName}/`;
const dictionaryFilename = "dictionary";
@ -260,7 +259,10 @@ async function uploadDictionaryToStorage(dictionary: T.Dictionary) {
const dictionaryInfoBuffer = writeDictionaryInfo(dictionary.info);
await Promise.all([
upload(JSON.stringify(dictionary), `${dictionaryFilename}.json`),
upload(JSON.stringify(dictionary.info), `${dictionaryInfoFilename}.json`),
upload(
JSON.stringify(dictionary.info, null, "\t"),
`${dictionaryInfoFilename}.json`
),
upload(dictionaryBuffer as Buffer, dictionaryFilename),
upload(dictionaryInfoBuffer as Buffer, dictionaryInfoFilename),
]);