Last active
September 11, 2024 15:52
-
-
Save sanjarcode/536e97e87a2f00a530ab141d95c4045c to your computer and use it in GitHub Desktop.
Scaler topics site - generate timestamps, empty note files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Raw name to simpler name (for markdown file) | |
*/ | |
function nameToHypenName(name) { | |
name = name | |
.replaceAll(",", "-") | |
.replaceAll(" ", "-") | |
.replaceAll("--", "-") | |
.replaceAll(":", "") | |
.replaceAll("(", "") | |
.replaceAll(")", "") | |
.replaceAll("[", "") | |
.replaceAll("]", "") | |
.replaceAll("/", "") | |
.replaceAll("-+-", "") | |
.replaceAll("&", "") | |
.replaceAll(".", "") | |
.replaceAll("--", "-"); | |
if (name.startsWith("-")) name = name.slice(1); | |
if (name.endsWith("-")) name = name.slice(0, -1); | |
return name; | |
} | |
/** | |
* [{ title, videos: [ {title, duration} ]}] | |
* | |
* Generate time file | |
*/ | |
function generateDurationFileContent(data) { | |
const op = data | |
.map((section, index) => { | |
const totalmins = (section.entities_data || section.videos).reduce( | |
(accum, item) => { | |
return ( | |
accum + | |
((time) => { | |
const [m, s] = time.split(":").map(Number); | |
return m + (s && 1); | |
})(item.duration || "00:00") | |
); | |
}, | |
0 | |
); | |
const hours = Math.floor(totalmins / 60); | |
const mins = totalmins % 60; | |
const sectionTimeStr = `${hours ? `${hours}h` : ""}${ | |
mins ? `${hours ? " " : ""}${mins}m` : "" | |
}`; | |
const sectionFirstLine = `${ | |
index + 1 | |
}. [ ] \[${sectionTimeStr}] ${section.title.trim()}`; | |
const sectionContent = (section.entities_data || section.videos) | |
.map((video, index2) => { | |
const videoTimeStr = ((time) => { | |
let [hours, mins, s] = time.split(":").map(Number); | |
mins = mins + (s && 1); | |
return `${hours ? `${hours}h` : ""}${ | |
mins ? `${hours ? " " : ""}${mins}m` : "" | |
}`; | |
})( | |
(video?.duration?.length === 5 | |
? `00:${video.duration}` | |
: video.duration) || "00:00:00" | |
); | |
return `${index2 + 1}. [ ] \[${videoTimeStr}] ${( | |
video.title || video.test_name | |
).trim()}`; | |
}) | |
.join("\n "); | |
return `${sectionFirstLine}\n ${sectionContent}`; | |
}) | |
.join("\n"); | |
return op; | |
} | |
// console.log(generateDurationFileContent(data)); | |
const child_process = require("child_process"); | |
function generateFiles(data) { | |
/** | |
* [{ title, videos: [ {title, duration} ]}] | |
* | |
* Generate files | |
*/ | |
data.map((section, index) => { | |
const folderName = `${index + 1}-${nameToHypenName(section.title)}`; | |
child_process.execSync(`mkdir ${folderName}`); | |
const files = (section.entities_data || section.videos).map( | |
(item, index2) => { | |
return `${folderName}/${index2 + 1}-${nameToHypenName( | |
item.title || item.test_name | |
)}.md`; | |
} | |
); | |
child_process.execSync(`cd ${folderName}`); | |
files.forEach((file) => { | |
child_process.execSync(`touch ${file};`); | |
}); | |
child_process.execSync(`cd ..`); | |
}); | |
} | |
const data = [ | |
{ | |
title: "Introduction", | |
slug: "introduction-2c37ebb4-3c07-4f74-8cac-b359715ffe22", | |
created_at: "2022-10-06T04:05:02.845Z", | |
updated_at: "2022-10-07T05:55:03.279Z", | |
order: 1, | |
cover_image: | |
"https://www.scaler.com/topics/images/introduction_dbms_course_module_image.webp", | |
total_time: "1h 50m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 1620, | |
title: "Introduction to the DBMS Course", | |
published_at: "2023-05-25T11:39:39.000Z", | |
duration: "05:51", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 460, | |
title: " Why not simply use files: Files vs DBMS", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "30:03", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 461, | |
title: " Tables and Keys", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "34:42", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 462, | |
title: " Integrity Constraints", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "22:49", | |
}, | |
{ | |
order: 5, | |
type: "Video", | |
slug: 463, | |
title: " Solved problems", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "16:39", | |
}, | |
{ | |
order: 6, | |
type: "Challenge", | |
test_id: 588862, | |
test_name: "Challenge 1 - DBMS", | |
start_time: "2023-05-18T10:03:21.000Z", | |
end_time: "2033-05-18T10:03:21.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 8, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "ER Models and Diagrams", | |
slug: "er-models-and-diagrams", | |
created_at: "2022-10-06T04:05:02.920Z", | |
updated_at: "2022-10-07T05:55:03.472Z", | |
order: 2, | |
cover_image: | |
"https://www.scaler.com/topics/images/er-model_dbms_course_module_image.webp", | |
total_time: "2h 11m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 464, | |
title: " Introduction to ER diagrams", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "36:38", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 466, | |
title: "Cardinality of relationships and constructing minimal tables", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "59:20", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 467, | |
title: | |
"Weak and Strong Entities, Self-referential Relationships, and Constructing Tables", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "18:40", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 465, | |
title: "Solved Problems - ER Models", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "17:00", | |
}, | |
{ | |
order: 5, | |
type: "Challenge", | |
test_id: 588881, | |
test_name: "Challenge 2 - DBMS", | |
start_time: "2023-05-18T10:22:35.000Z", | |
end_time: "2033-05-18T10:22:35.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "Introduction to Relational Models", | |
slug: "introduction-to-relational-models", | |
created_at: "2022-10-06T04:05:02.951Z", | |
updated_at: "2022-10-07T05:55:33.250Z", | |
order: 3, | |
cover_image: | |
"https://www.scaler.com/topics/images/introduction-to-relational-model_dbms_course_module_image.webp", | |
total_time: "53m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 468, | |
title: " Mathematical model of Tables", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "15:59", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 469, | |
title: " ER-Relational Model, Constraints and Keys (recap)", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "26:55", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 470, | |
title: " Solved Problems - Relational Models", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "10:57", | |
}, | |
{ | |
order: 4, | |
type: "Challenge", | |
test_id: 588896, | |
test_name: "Challenge 3 - DBMS", | |
start_time: "2023-05-18T10:30:43.000Z", | |
end_time: "2033-05-18T10:30:43.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "Relational Algebra", | |
slug: "relational-algebra", | |
created_at: "2022-10-06T04:05:02.983Z", | |
updated_at: "2022-10-07T05:55:03.758Z", | |
order: 4, | |
cover_image: | |
"https://www.scaler.com/topics/images/relational-algebra_dbms_course_module_image.webp", | |
total_time: "1h 44m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 471, | |
title: " Introduction to Relational Algebra and Basic Operators", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "41:21", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 472, | |
title: " Joins and Division Operators", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "40:16", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 473, | |
title: " Solved Problems - Relational Algebra", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "22:23", | |
}, | |
{ | |
order: 4, | |
type: "Challenge", | |
test_id: 588909, | |
test_name: "Challenge 4 - DBMS", | |
start_time: "2023-05-18T10:36:24.000Z", | |
end_time: "2033-05-18T10:36:24.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "Relational Calculus", | |
slug: "relational-calculus", | |
created_at: "2022-10-06T04:05:03.019Z", | |
updated_at: "2022-10-07T05:55:03.892Z", | |
order: 5, | |
cover_image: | |
"https://www.scaler.com/topics/images/relational-calculus_dbms_course_module_image.webp", | |
total_time: "2h 1m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 474, | |
title: " Tuple Relational Calculus-I", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "49:26", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 475, | |
title: " Safe queries \u0026 Domain Relational Calculus", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "23:55", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 476, | |
title: " Solutions-1", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "16:30", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 477, | |
title: " Solutions-2", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "19:33", | |
}, | |
{ | |
order: 5, | |
type: "Video", | |
slug: 478, | |
title: " Solutions-3", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "12:11", | |
}, | |
{ | |
order: 6, | |
type: "Challenge", | |
test_id: 588921, | |
test_name: "Challenge 5 - DBMS", | |
start_time: "2023-05-18T10:42:35.000Z", | |
end_time: "2033-05-18T10:42:35.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "[SQL] Introduction", | |
slug: "sql-introduction", | |
created_at: "2022-10-06T04:05:03.059Z", | |
updated_at: "2022-10-07T05:55:04.067Z", | |
order: 6, | |
cover_image: | |
"https://www.scaler.com/topics/images/sql_dbms_course_module_image.webp", | |
total_time: "1h 8m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 479, | |
title: "Overview of Databases for learning SQL. ", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "21:18", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 480, | |
title: " Why learn SQL", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "14:25", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 481, | |
title: " Execution of an SQL statement. ", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "07:02", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 482, | |
title: " IMDB dataset", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "11:37", | |
}, | |
{ | |
order: 5, | |
type: "Video", | |
slug: 483, | |
title: " Installing MySQL", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "10:31", | |
}, | |
{ | |
order: 6, | |
type: "Video", | |
slug: 484, | |
title: " Load IMDB data", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "03:16", | |
}, | |
{ | |
order: 7, | |
type: "Challenge", | |
test_id: 589039, | |
test_name: "Challenge 6 - DBMS", | |
start_time: "2023-05-18T12:23:51.000Z", | |
end_time: "2033-05-18T12:23:51.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "[SQL] Commands", | |
slug: "sql-commands", | |
created_at: "2022-10-06T04:05:03.093Z", | |
updated_at: "2022-10-07T05:55:04.272Z", | |
order: 7, | |
cover_image: | |
"https://www.scaler.com/topics/images/sql-commands_dbms_course_module_image.webp", | |
total_time: "2h 16m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 485, | |
title: " USE, DESCRIBE, SHOW TABLES", | |
published_at: "2022-10-04T05:56:14.000Z", | |
duration: "14:53", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 486, | |
title: " SELECT", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "19:08", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 487, | |
title: " LIMIT, OFFSET", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "09:34", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 488, | |
title: "Order By", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "06:01", | |
}, | |
{ | |
order: 5, | |
type: "Video", | |
slug: 489, | |
title: "Distinct", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "09:49", | |
}, | |
{ | |
order: 6, | |
type: "Video", | |
slug: 490, | |
title: " WHERE, Comparison operators, NULL", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "13:01", | |
}, | |
{ | |
order: 7, | |
type: "Video", | |
slug: 491, | |
title: " Logical Operators", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "26:34", | |
}, | |
{ | |
order: 8, | |
type: "Video", | |
slug: 492, | |
title: " Aggregate Functions: COUNT, MIN, MAX, AVG, SUM ", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "07:38", | |
}, | |
{ | |
order: 9, | |
type: "Video", | |
slug: 493, | |
title: " GROUP BY", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "12:44", | |
}, | |
{ | |
order: 10, | |
type: "Video", | |
slug: 494, | |
title: " HAVING", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "13:12", | |
}, | |
{ | |
order: 11, | |
type: "Video", | |
slug: 495, | |
title: " Order of keywords ", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "03:58", | |
}, | |
{ | |
order: 12, | |
type: "Challenge", | |
test_id: 589057, | |
test_name: "Challenge 7 - DBMS", | |
start_time: "2023-05-18T12:34:30.000Z", | |
end_time: "2033-05-18T12:34:30.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 11, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "[SQL] Joins", | |
slug: "sql-joins", | |
created_at: "2022-10-06T04:05:03.133Z", | |
updated_at: "2022-10-07T05:55:04.603Z", | |
order: 8, | |
cover_image: | |
"https://www.scaler.com/topics/images/sql-joins_dbms_course_module_image.webp", | |
total_time: "34m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 496, | |
title: " Join and Natural Join ", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "11:44", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 497, | |
title: " Inner, Left, Right and Outer joins", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "22:37", | |
}, | |
{ | |
order: 3, | |
type: "Challenge", | |
test_id: 589449, | |
test_name: "Challenge 8 - DBMS", | |
start_time: "2023-05-18T17:06:13.000Z", | |
end_time: "2033-05-18T17:06:13.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "[SQL] Advanced Queries", | |
slug: "sql-advanced-queries", | |
created_at: "2022-10-06T04:05:03.175Z", | |
updated_at: "2022-10-07T05:55:04.728Z", | |
order: 9, | |
cover_image: | |
"https://www.scaler.com/topics/images/advanced-sql_dbms_course_module_image.webp", | |
total_time: "23m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 498, | |
title: " Sub Queries/Nested Queries/Inner Queries", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "23:45", | |
}, | |
{ | |
order: 2, | |
type: "Challenge", | |
test_id: 589452, | |
test_name: "Challenge 9 - DBMS", | |
start_time: "2023-05-18T17:11:13.000Z", | |
end_time: "2033-05-18T17:11:13.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "[SQL] Data Manipulation Language", | |
slug: "sql-data-manipulation-language", | |
created_at: "2022-10-06T04:05:03.208Z", | |
updated_at: "2022-10-07T05:55:04.799Z", | |
order: 10, | |
cover_image: | |
"https://www.scaler.com/topics/images/dml_dbms_course_module_image.webp", | |
total_time: "11m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 499, | |
title: " INSERT ", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "06:22", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 500, | |
title: " UPDATE , DELETE ", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "05:10", | |
}, | |
{ | |
order: 3, | |
type: "Challenge", | |
test_id: 589459, | |
test_name: "Challenge 10 - DBMS", | |
start_time: "2023-05-18T17:16:23.000Z", | |
end_time: "2033-05-18T17:16:23.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "[SQL] Data Definition Language", | |
slug: "sql-data-definition-language", | |
created_at: "2022-10-06T04:05:03.242Z", | |
updated_at: "2022-10-07T05:55:04.912Z", | |
order: 11, | |
cover_image: | |
"https://www.scaler.com/topics/images/ddl_dbms_course_module_image.webp", | |
total_time: "17m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 501, | |
title: " CREATE TABLE", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "11:06", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 502, | |
title: " ALTER: ADD, MODIFY, DROP", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "03:32", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 503, | |
title: " DROP TABLE, TRUNCATE, DELETE", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "02:39", | |
}, | |
{ | |
order: 4, | |
type: "Challenge", | |
test_id: 589460, | |
test_name: "Challenge 11 - DBMS", | |
start_time: "2023-05-18T17:21:05.000Z", | |
end_time: "2033-05-18T17:21:05.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "[SQL] Data Control Language", | |
slug: "sql-data-control-language", | |
created_at: "2022-10-06T04:05:03.275Z", | |
updated_at: "2022-10-07T05:55:05.072Z", | |
order: 12, | |
cover_image: | |
"https://www.scaler.com/topics/images/dcl_dbms_course_module_image.webp", | |
total_time: "1h 6m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 504, | |
title: " Data Control Language: GRANT, REVOKE", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "10:04", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 505, | |
title: " Learning resources ", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "02:59", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 506, | |
title: " Solved problems-1", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "25:26", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 507, | |
title: " Solved Problems-2", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "13:04", | |
}, | |
{ | |
order: 5, | |
type: "Video", | |
slug: 508, | |
title: " Solved Problems-3", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "14:47", | |
}, | |
{ | |
order: 6, | |
type: "Challenge", | |
test_id: 589496, | |
test_name: "Challenge 12 - DBMS", | |
start_time: "2023-05-18T17:43:47.000Z", | |
end_time: "2033-05-18T17:43:47.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "Functional Dependencies and Decomposition", | |
slug: "functional-dependencies-and-decomposition", | |
created_at: "2022-10-06T04:05:03.310Z", | |
updated_at: "2022-10-07T05:55:05.275Z", | |
order: 13, | |
cover_image: | |
"https://www.scaler.com/topics/images/functional-dependencies-decomposition_dbms_course_module_image.webp", | |
total_time: "4h 4m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 509, | |
title: " Designing tables in a DB", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "08:44", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 510, | |
title: " Functional Dependencies", | |
published_at: "2022-10-05T06:43:45.000Z", | |
duration: "34:39", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 511, | |
title: " Attribute Closure, Keys and Solved problems", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "44:30", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 512, | |
title: " Functional Dependency Sets and Properties + Solved examples", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "33:52", | |
}, | |
{ | |
order: 5, | |
type: "Video", | |
slug: 513, | |
title: " Minimal/Canonical Covers of FDs + solved problems", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "39:12", | |
}, | |
{ | |
order: 6, | |
type: "Video", | |
slug: 514, | |
title: " Decompositions with solved problems", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "47:51", | |
}, | |
{ | |
order: 7, | |
type: "Video", | |
slug: 515, | |
title: " Dependency preserving decomposition + solved examples", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "35:32", | |
}, | |
{ | |
order: 8, | |
type: "Challenge", | |
test_id: 589499, | |
test_name: "Challenge 13 - DBMS", | |
start_time: "2023-05-18T17:44:50.000Z", | |
end_time: "2033-05-18T17:44:50.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "Normalisation", | |
slug: "normalisation", | |
created_at: "2022-10-06T04:05:03.345Z", | |
updated_at: "2022-10-07T05:55:05.527Z", | |
order: 14, | |
cover_image: | |
"https://www.scaler.com/topics/images/normalization_dbms_course_module_image.webp", | |
total_time: "2h 26m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 516, | |
title: " Introduction to Normalisation + 1NF and 2NF +examples", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "39:07", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 517, | |
title: " 3NF and BCNF", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "30:12", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 518, | |
title: " Solved problems + Properties of Normal Forms", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "33:39", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 519, | |
title: " Multi-Valued Dependencies and 4NF", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "43:18", | |
}, | |
{ | |
order: 5, | |
type: "Challenge", | |
test_id: 589501, | |
test_name: "Challenge 14 - DBMS", | |
start_time: "2023-05-18T17:46:01.000Z", | |
end_time: "2033-05-18T17:46:01.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "Transactions and Concurrency Control", | |
slug: "transactions-and-concurrency-control", | |
created_at: "2022-10-06T04:05:03.381Z", | |
updated_at: "2022-10-07T05:55:05.677Z", | |
order: 15, | |
cover_image: | |
"https://www.scaler.com/topics/images/transaction-and-concurrency-control_dbms_course_module_image.webp", | |
total_time: "6h 1m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 520, | |
title: " Model of a computer for transactions \u0026 concurrency", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "24:13", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 521, | |
title: " ACID properties \u0026 Concurrency", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "50:00", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 522, | |
title: " Problems due to Concurrency", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "40:59", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 523, | |
title: " Recoverability of Schedules", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "49:47", | |
}, | |
{ | |
order: 5, | |
type: "Video", | |
slug: 524, | |
title: " Serializability of Schedules -Conflict Serializability", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "45:44", | |
}, | |
{ | |
order: 6, | |
type: "Video", | |
slug: 525, | |
title: " View Serializability", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "28:15", | |
}, | |
{ | |
order: 7, | |
type: "Video", | |
slug: 526, | |
title: " Lock based concurrency control", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "58:53", | |
}, | |
{ | |
order: 8, | |
type: "Video", | |
slug: 527, | |
title: | |
" Time stamp based protocols + Deadlock and Starvation prevention", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "56:19", | |
}, | |
{ | |
order: 9, | |
type: "Video", | |
slug: 528, | |
title: " Thomas Write Rule", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "07:28", | |
}, | |
{ | |
order: 10, | |
type: "Challenge", | |
test_id: 589502, | |
test_name: "Challenge 15 - DBMS", | |
start_time: "2023-05-18T17:47:08.000Z", | |
end_time: "2033-05-18T17:47:08.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 4, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
{ | |
title: "File Structure (B and B+ Trees)", | |
slug: "file-structure-b-and-b-trees", | |
created_at: "2022-10-06T04:05:03.423Z", | |
updated_at: "2022-10-07T05:55:05.947Z", | |
order: 16, | |
cover_image: | |
"https://www.scaler.com/topics/images/file-structures_dbms_course_module_image.webp", | |
total_time: "2h 6m", | |
entities_data: [ | |
{ | |
order: 1, | |
type: "Video", | |
slug: 529, | |
title: " Files and Indexing: introduction", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "45:47", | |
}, | |
{ | |
order: 2, | |
type: "Video", | |
slug: 530, | |
title: " B-Trees and B+ Trees with examples", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "57:37", | |
}, | |
{ | |
order: 3, | |
type: "Video", | |
slug: 531, | |
title: " More Solved Problems", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "09:08", | |
}, | |
{ | |
order: 4, | |
type: "Video", | |
slug: 532, | |
title: " Terminology related to Indexes", | |
published_at: "2022-10-06T08:46:28.000Z", | |
duration: "13:28", | |
}, | |
{ | |
order: 5, | |
type: "Challenge", | |
test_id: 589507, | |
test_name: "Challenge 16 - DBMS", | |
start_time: "2023-05-18T17:50:18.000Z", | |
end_time: "2033-05-18T17:50:18.000Z", | |
test_type: "challenge_test", | |
test_duration: 60, | |
problem_count: 3, | |
eligible_for_certificate: false, | |
cover_image: null, | |
status: "current", | |
}, | |
], | |
links: null, | |
meta: null, | |
}, | |
]; | |
// Run | |
// console.log(generateDurationFileContent(data)); | |
// generateFiles(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment