Rename readme.md to README.md

This commit is contained in:
VALADI K JAGANATHAN
2023-11-17 12:46:50 +05:30
committed by GitHub
parent eccc2473d2
commit 18608f0708

34
images/README.md Normal file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const ROOT_DIR = './Portrait Repository/FE10 Mugs (Radiant Dawn)/';
const README_FILENAME = 'README.md';
const NB_IMAGES_PER_LINE = 4;
let nbImages = 0;
let mdContent = '<table><tr>';
fs.readdirSync(ROOT_DIR).forEach((image) => {
if (image !== README_FILENAME) {
if (!(nbImages % NB_IMAGES_PER_LINE)) {
if (nbImages > 0) {
mdContent += `
</tr>`;
}
mdContent += `
<tr>`;
}
nbImages++;
mdContent += `
<td valign="bottom">
<img src="./${image}" width="200"><br>
${image}
</td>
`;
}
});
mdContent += `
</tr></table>`;
fs.writeFileSync(path.join(ROOT_DIR, README_FILENAME), mdContent);