From ca38137099bfe46e59b5c37a8eaaa2d6555738cd Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 4 Apr 2024 17:13:24 -0700 Subject: [PATCH] chore: pull month cart data --- src/_data/musicCharts.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/_data/musicCharts.js diff --git a/src/_data/musicCharts.js b/src/_data/musicCharts.js new file mode 100644 index 00000000..77cf47a1 --- /dev/null +++ b/src/_data/musicCharts.js @@ -0,0 +1,10 @@ +import { readFile } from 'fs/promises' +import { buildChart } from './helpers/music.js' + +export default async function () { + const monthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-month-chart.json', 'utf8')); + console.log(buildChart(monthChart['data'], artists, albums, nowPlaying)) + return { + month: buildChart(monthChart['data'], artists, albums, nowPlaying) + } +} \ No newline at end of file