v2.1.0
This commit is contained in:
parent
93b1c5e1b3
commit
6c4f5f799e
5 changed files with 416 additions and 11 deletions
|
|
@ -2,14 +2,24 @@
|
|||
import { CreateImage } from "./lib/image";
|
||||
|
||||
//const YYMMDD = new Date().toISOString().slice(0, 10).replace(/-/g, "").toString();
|
||||
const YYMMDD = "20250509"
|
||||
const YYMMDD = "20250530"
|
||||
//console.log(YYMMDD);
|
||||
|
||||
//Discord("20250509")
|
||||
async function run() {
|
||||
console.time("Post");
|
||||
await CreateImage.PostMeal(YYMMDD);
|
||||
const post = await CreateImage.PostMeal(YYMMDD);
|
||||
console.timeEnd("Post");
|
||||
console.log("Post created:", post);
|
||||
let NutritionInfoText = "";
|
||||
const entries = Object.entries(post ?? {}).filter(([_, value]) => value.toString().length > 0);
|
||||
entries.forEach(([name, value], idx) => {
|
||||
NutritionInfoText += `${name} : ${value.toString().replace(",", ", ")}`;
|
||||
if (idx !== entries.length - 1) {
|
||||
NutritionInfoText += "\n";
|
||||
}
|
||||
});
|
||||
console.log("Nutrition Info Text:", NutritionInfoText);
|
||||
|
||||
console.time("Story");
|
||||
await CreateImage.ConvertToStory(`./temp/${YYMMDD}.png`);
|
||||
|
|
@ -18,6 +28,8 @@ async function run() {
|
|||
|
||||
run();
|
||||
|
||||
import { getAllSchedules } from "./lib/schedule";
|
||||
|
||||
|
||||
//import { CreateImage } from "./lib/image";
|
||||
|
||||
|
|
@ -39,4 +51,13 @@ VTSList().then(results => {
|
|||
} else {
|
||||
console.log("\n5번째 행에서 노란색 배경의 셀을 찾지 못했거나, 'V.T.S.' 조건 불충족.");
|
||||
}
|
||||
});*/
|
||||
});*/
|
||||
/*
|
||||
getAllSchedules()
|
||||
.then((schedules) => {
|
||||
console.log("학사 일정:", schedules);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error fetching schedules:", error);
|
||||
});
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue