Skip to content

Commit f8e56f8

Browse files
committed
update script
1 parent 5ea2497 commit f8e56f8

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

generate-stats.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const fs = require('fs');
2-
const path = require('path');
32

43
// Configuration
54
const CONFIG = JSON.parse(fs.readFileSync('config.json', 'utf8'));;
@@ -138,8 +137,6 @@ function generateEmptySVG(topN) {
138137

139138
async function main() {
140139
const token = process.env.GITHUB_TOKEN;
141-
const workspace = process.env.GITHUB_WORKSPACE || process.cwd();
142-
const statsDir = path.join(workspace, 'stats');
143140

144141
if (!token) {
145142
console.error('❌ GITHUB_TOKEN non défini !');
@@ -149,15 +146,13 @@ async function main() {
149146
try {
150147
const languageStats = await fetchGitHubStats(CONFIG.USERNAME, token);
151148

152-
fs.mkdirSync(statsDir, { recursive: true });
153-
154149
// Générer plusieurs versions
155150
const variants = [2, 4, 5, 6, 7, 8];
156151

157152
console.log('\n📸 Génération des images SVG...');
158153
variants.forEach(n => {
159154
const svg = generateSVG(languageStats, n);
160-
const filename = path.join(statsDir, `stats-top${n}.svg`);
155+
const filename = `stats-top${n}.svg`;
161156
fs.writeFileSync(filename, svg);
162157
console.log(` ✅ ${filename}`);
163158
});

stats/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)