-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
34 lines (24 loc) · 942 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
require("dotenv").config();
const Logger = require("./src/utils/logger");
const Story = require("./src/shorts/story");
const Short = require("./src/shorts/short");
const { getStoryData } = require("./src/utils/helpers");
const { formatStoryData } = require("./src/utils/format");
const PathResolve = require("./src/utils/resolve");
PathResolve.initializePaths();
newStory();
async function newStory() {
Logger.info("------------ STARTING NEW SHORT ------------");
try {
const story = new Story();
await story.makeStory();
await story.buildStoryNarration();
const shortGenerated = await new Short(story.storyId).makeNewShortVideo();
Logger.info("Successfully generated Short in: " + shortGenerated);
const storyData = await getStoryData(story.storyId);
Logger.info(formatStoryData(storyData));
} catch (e) {
Logger.error(e);
}
Logger.info("------------ ENDING OF NEW SHORT ------------");
}