Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor chdman extractcd to allow split .bin/.cue output #11727

Closed
wants to merge 1 commit into from
Closed

refactor chdman extractcd to allow split .bin/.cue output #11727

wants to merge 1 commit into from

Conversation

landfillbaby
Copy link

@landfillbaby landfillbaby commented Nov 12, 2023

My partial solution to #5867 (only partial because it doesn't fix round-trip support fully, such as #10308).
Full list of things this does to chdman:

  • Adds a -os/--splitcue option to extractcd to force output to .cue mode and output individual .bins, naming them basename (Track n).bin if there is more than 1 track.
    • n will be 1 digit if there are less than 10 tracks in the CD, 2 digits otherwise.
    • .bin will be replaced by the file extension specified by -ob/--outputbin if applicable.
    • Its short name is -os in case the existing -s/--size option is used for extractcd in future.
  • This new method also applies to .gdi output. Should I change this?
    • Output filenames will be different: no longer outputs audio files as .raw, format is as above instead of just appending the track number as 2 digits.
    • Deletes all bin files on error instead of just the last one before the error.
    • The percentage of completion no longer resets to 0 for each track, so it will actually say near 100% at completion.
  • Checks output filename ends with .cue or .gdi, case insensitive, instead of just doing a case sensitive search for them anywhere in the filename.
  • Removes unused -ob/--outputbin option from extractdvd.
  • Updates its manpage, adding the missing createdvd and extractdvd documentation too.

Tell me if any changes should be made :)

@landfillbaby
Copy link
Author

OK it's definitely ready for merge now! I fixed a regression I made in the 2nd commit!

@rb6502
Copy link
Contributor

rb6502 commented Nov 19, 2023

Would it be possible to squash all the commits so it's easier to review?

@landfillbaby
Copy link
Author

landfillbaby commented Nov 19, 2023

done. you might want to run CI again

@landfillbaby
Copy link
Author

landfillbaby commented Nov 19, 2023

ok actually this doesn't work at all... i fix it tomorrow

@rb6502
Copy link
Contributor

rb6502 commented Nov 20, 2023

Yeah, as far as I know there's no such thing as split CDRDAO (bin/toc) format.

@landfillbaby landfillbaby changed the title refactor chdman extractcd to allow splitting BINs refactor chdman extractcd to allow split .bin/.cue output Nov 20, 2023
@landfillbaby
Copy link
Author

landfillbaby commented Nov 20, 2023

The option is now --splitcue and forces output to be in .bin/.cue mode, issuing a warning if -o doesn't end with .cue. Should it be an error instead?

I tested it, it works and is ready for merge other than that.

There is no split .toc mode. Maybe I'll look into it further later.

The old broken version is at 70e8418.

@987123879113
Copy link
Contributor

re: .toc support
I'm not sure if cdrdao supports extracting .tocs with each track as a new file, but the .toc format itself does support using multiple files. Here's an example from the official cdrdao website showing it off at the bottom: https://cdrdao.sourceforge.net/example.html#secret

@landfillbaby
Copy link
Author

closing in favour of #12191 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants