import fs from "fs";

for (const filename of fs.readdirSync("./public/img/masterplan/sequence")) {
  const [file, ext] = filename.split(".");

  // let newFilename = "";

  // if (file !== "0") {
  //   newFilename = `${Math.abs(Number(file) - 360)}.${ext}`;
  // } else {
  //   newFilename = `0.${ext}`;
  // }
  const number = +file;

  if (number % 3 !== 0) continue;

  const newFilename = `${number / 3}.${ext}`;

  fs.copyFileSync(
    `./public/img/masterplan/sequence/${filename}`,
    `./public/img/masterplan/sequence-120/${newFilename}`
  );
}
