| 5 | import { loadData } from '../../api' |
| 6 | |
| 7 | async function main() { |
| 8 | const logger = new Logger() |
| 9 | |
| 10 | logger.info('loading data from api...') |
| 11 | await loadData() |
| 12 | |
| 13 | logger.info('creating category table...') |
| 14 | await new CategoriesTable().create() |
| 15 | logger.info('creating language table...') |
| 16 | await new LanguagesTable().create() |
| 17 | logger.info('creating countires table...') |
| 18 | await new CountriesTable().create() |
| 19 | logger.info('creating region table...') |
| 20 | await new RegionsTable().create() |
| 21 | |
| 22 | logger.info('updating playlists.md...') |
| 23 | const playlists = new Markdown({ |
| 24 | build: `${ROOT_DIR}/PLAYLISTS.md`, |
| 25 | template: `${README_DIR}/template.md` |
| 26 | }) |
| 27 | playlists.compile() |
| 28 | } |
| 29 | |
| 30 | main() |