Skip to content

Commit

Permalink
Allow gaps in sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
monsanto committed May 9, 2020
1 parent e5040be commit ea2b48e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/sheet/index.js
Expand Up @@ -13,6 +13,15 @@ if (!sheetjs || !dest) {
(async() => {
const {default: sheet} = await import(path.join(process.cwd(), sheetjs));

for (let i = 0; i < sheet.entries.length; i++) {
if (sheet.entries[i] === undefined)
throw new Error(`gap: ${i}`);
if (sheet.entries[i] === null) {
// ImageMagick blank entry
sheet.entries[i] = "xc:transparent";
}
}

cp.execFileSync("montage", [
...sheet.entries,
"-background", "transparent",
Expand Down

0 comments on commit ea2b48e

Please sign in to comment.