mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-03-21 21:22:13 -03:00
Update README.md
This commit is contained in:
committed by
GitHub
parent
36f5d2a222
commit
800c3b4df3
@@ -1,34 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
https://github.com/jags111/efficiency-nodes-comfyui/blob/main/images/2023-10-31_22-43-17.png
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT_DIR = './images/';
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user