Add newline, remove console log

This commit is contained in:
Carly Ho 2024-03-10 13:41:34 -05:00
parent 6aeab2c143
commit d804c099b7
1 changed files with 1 additions and 2 deletions

View File

@ -19,7 +19,6 @@ Jimp.read(file, async (_err, img) => {
const { fontName } = await prompt.get({name: 'fontName', description: 'Font Name', hidden: false, type: 'string', default: 'My Bitsy Font'});
buffer += `FONT ${fontName}\n`;
buffer += `SIZE ${charWidth} ${charHeight}\n`;
console.log(buffer);
for (let y = 0; y < imgHeight; y += 1) {
row = [];
for (let x = 0; x < imgWidth; x += 1) {
@ -33,7 +32,7 @@ Jimp.read(file, async (_err, img) => {
character = charArray.slice(y, y + charHeight).map(line => line.slice(x, x + charWidth).join(""));
character.forEach((line) => console.log(line.replace(/1/g, "\x1b[30m1\x1b[0m")));
let { code } = await prompt.get({name: 'code', description: 'Character Code', hidden: false, type: 'string', required: true});
buffer += `CHAR ${code}\n`;
buffer += `\nCHAR ${code}\n`;
buffer += character.join("\n");
}
}