Created
May 5, 2024 22:53
-
-
Save bazuka5801/fefe35a10b035954f99d3b44e621ed81 to your computer and use it in GitHub Desktop.
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
// draft_info.json | |
const mark_items = [ | |
{ | |
"color": "#00c1cd", | |
"id": "F1F76016-94CB-4229-BA6F-C13574EF5594", | |
"time_range": { | |
"duration": 443100000, | |
"start": 443100000 | |
}, | |
"title": "Окончание" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "6B831BE8-6E2A-43CB-BDBF-F9974F626895", | |
"time_range": { | |
"duration": 426300000, | |
"start": 426300000 | |
}, | |
"title": "Вопросы" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "8371D5F4-F554-43DD-8164-6D3C6A0180F9", | |
"time_range": { | |
"duration": 398166666, | |
"start": 398166666 | |
}, | |
"title": "Подробнее о GitHub" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "DEE44833-FE4E-4390-A099-52BEA6024D35", | |
"time_range": { | |
"duration": 383000000, | |
"start": 383000000 | |
}, | |
"title": "Публикация" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "ACC19C90-921F-43CD-8C4E-12BF4E2733D0", | |
"time_range": { | |
"duration": 330400000, | |
"start": 330400000 | |
}, | |
"title": "GitHub - что это" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "F4A38530-B058-42CB-A7D8-8C6794608713", | |
"time_range": { | |
"duration": 195500000, | |
"start": 195500000 | |
}, | |
"title": "Конфликт" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "93A685AB-56A4-4CD6-96B8-9EB856568F91", | |
"time_range": { | |
"duration": 153933333, | |
"start": 153933333 | |
}, | |
"title": "Ветки" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "E6D8E60D-A00A-42FC-88A6-2C54289D1276", | |
"time_range": { | |
"duration": 55966666, | |
"start": 55966666 | |
}, | |
"title": "Коммиты" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "DAC1364B-A567-4735-A85D-46C7074E76A0", | |
"time_range": { | |
"duration": 21700000, | |
"start": 21700000 | |
}, | |
"title": "Создание репозитория" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "7BD97C9C-1903-4524-A1A8-2BBC57978E26", | |
"time_range": { | |
"duration": 13300000, | |
"start": 13300000 | |
}, | |
"title": "Какие программы - GitHub Desktop" | |
}, | |
{ | |
"color": "#00c1cd", | |
"id": "B7D18837-0DAD-4512-BA5A-9AD6C3B7AEB2", | |
"time_range": { | |
"duration": 0, | |
"start": 0 | |
}, | |
"title": "Вступление" | |
} | |
] | |
console.log(mark_items.sort((o,p) => o.time_range.start - p.time_range.start).map(p=> { | |
const totalSeconds = Math.floor(p.time_range.start / 1000 / 1000) | |
const minutes = Math.floor(totalSeconds / 60) | |
const seconds = totalSeconds % 60 | |
return `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')} - ${p.title}` | |
}).join('\n')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: