Skip to content

Pseudocode

jdrch edited this page Sep 25, 2019 · 8 revisions
  • Read working directory from .conf file
  • Switch to working directory
  • For each file in working directory
    • If file extension is .zip or .rar
      • Move to the next file in working directory
    • If file extension is .cbz
      • Replace .cbz in filename with .zip
      • Move to the next file in working directory
    • If file extension is .cbr
      • Replace .cbr in filename with .rar
      • Move to the next file in working directory
  • For each file in the working directory
    • If file extension is not .zip or .rar
      • Move to the next file in working directory
    • If file extension is .zip
      • Extract the file to current path with automatic rename of extracted contents
      • Move to the next file in working directory
    • If file extension is .rar
      • Extract the file to current path with automatic rename of extracted contents
      • Move to the next file in working directory
  • Flatten any resulting child directories with automatic rename so that all files are at the top level of the working directory
  • Read the minimum resolution from the .conf file
  • For each image file in the working directory
    • If file has no resolution
      • Move to the next file in working directory
    • If resolution ≥ minimum resolution
      • Move to the next file in working directory
    • If resolution < minimum resolution
      • Delete file
      • Move to the next file in working directory
  • Exit
Clone this wiki locally