/**
  * Generate ColorizeIt options for a revision.
  *
  * @param string $zip_file	Full path to revision zip file
  * @param string $temp_dir	Temporary directory
  * @throws \Exception		Throws exception if zip file does not exist
  * @return array
  */
 public function generate_options($zip_file, $temp_dir)
 {
     if (!@file_exists($zip_file)) {
         throw new \Exception('ERROR_NO_ATTACHMENT');
     }
     $package = new \phpbb\titania\entity\package();
     $package->set_source($zip_file)->set_temp_path($temp_dir, true)->extract();
     $data = $this->get_data($package->get_temp_path());
     $package->cleanup();
     return $data;
 }