Skip to content

Commit

Permalink
fix: relative path for pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
jy95 committed Jul 18, 2024
1 parent 1f77b50 commit 05f00fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generate-playlists-stats.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { resolve as resolvePath } from "path";
// Download from
// https://studio.youtube.com/channel/UCG0N7IV-C43AM9psxslejCQ/analytics/tab-content/period-default/explore?entity_type=CHANNEL&entity_id=UCG0N7IV-C43AM9psxslejCQ&r_dimensions=IN_CURATED_CONTENT&r_values=%27IN_CURATED_CONTENT%27&r_inclusive_starts=&r_exclusive_ends=&time_period=4_weeks&explore_type=TABLE_AND_CHART&metric=VIEWS&granularity=DAY&t_metrics=VIEWS&t_metrics=WATCH_TIME&dimension=PLAYLIST&o_column=VIEWS&o_direction=ANALYTICS_ORDER_DIRECTION_DESC
const csvFilePath = 'Informations relatives aux tableaux.csv';
const basePicturesPath = "D:/workspace/yt_gaming_library/public"
const basePicturesPath = "./public"
const outputFilePath = 'playlists_stats.json';

// First line are headers, second a total summary
const numberOfHeaders = 2;

// Functions
const generateImagePath = (playlistId) => `${basePicturesPath}/covers/${playlistId}/cover.webp`;
const generateImagePath = (playlistId) => resolvePath(`${basePicturesPath}/covers/${playlistId}/cover.webp`);

async function readCSV(filePath) {
const data = await readFile(filePath, 'utf8');
Expand Down

0 comments on commit 05f00fe

Please sign in to comment.