Open Rebislori opened 1 month ago
To answer both of your questions:
Batch processing sounds like a good idea, I propose creating a new CLI command "batch" that takes an extra parameter, "pack" or "unpack", then two paths, input and output folder.
Some additional notes:
<filename>.iso
, and if that already exists and is equal to the input path, then we use <filename>.xiso.iso
. If your output directory is different from the source directory, you can achieve output with the same filename by running xdvdfs pack
from inside the output directory, with no output argument.find
command with -exec
to execute a command on every file in a directory that matches some criteria given in the arguments.I'm open to the idea of adding some sort of native batching support but it needs to offer some benefit over find -exec
or similar. At minimum it should run operations in parallel, which requires changing the current async executor (probably to tokio).
I have written 2 bash scripts for batch processing, input is your folder where all ISOs resides, output is the folder where to extract or repack. Don't forget to add the "/" at the end of the path or the script will break. Repack script will output with your filename.xiso.iso. Extract script will output to a directory with you filename without the .iso extension.
Batch repack:
#!/bin/bash
input="_OGISO/"
output="_OGXISO/"
shopt -s nullglob # enable nullglob
for file in "$input"*.iso; do
noniso=${file%.iso} # remove .iso extension
filename=${noniso/#$input} # remove input prefix from filename
xdvdfs pack "$file" "$output""$filename".xiso.iso
done
shopt -u nullglob # disable nullglob
echo ""
echo "...done"
Batch extract:
#!/bin/bash
input="_OGISO/"
output="_OG/"
shopt -s nullglob # enable nullglob
for file in "$input"*.iso; do
noniso=${file%.iso} # remove .iso extension
folder=${noniso/#$input} # remove input prefix from foldername
xdvdfs unpack "$file" "$output""$folder"
done
shopt -u nullglob # disable nullglob
echo ""
echo "...done"
Hi everyone, and thank you for this project. I must say that i know my way around computers, i have my linux basics, but templating and scripting are well over my possibilities.
I'm setting up pegasus with metadata and whatnot, but all my xbox games are in iso format, not xiso.
I solved this with sdvdgs-cli: "./xdvdfs pack /dir/to/the/image.iso /dir/to/the/converted/image.iso
I have 2 questions:
1)is there a way i can automatically create the xiso with the same name as the original iso? 2)Is there a way to batch convert isos? Or, at least, could anyone point me in the right direction?
Thanks again!