fuzziqersoftware / resource_dasm

Classic Mac OS resource fork and application disassembler, with reverse-engineering tools for specific applications
MIT License
114 stars 13 forks source link

dupe_finder: limit search for duplicates by resource ID #47

Closed Kristine1975 closed 2 years ago

Kristine1975 commented 2 years ago

Next: add support for resource ID ranges to resource_dasm.

Kristine1975 commented 2 years ago

This is a good idea - thanks for building it. When it's merged, I might use it in resource_dasm as well to make --target more versatile. Requesting changes for some style nitpicks.

Edit: Missed your comment above :) I'll add it myself in a few days if you don't get around to it.

My basic plan was:

What do you think? Or would the change make --skip redundant?

What about !<id> to mean -32768..32767 except <id> (and similarly for ID ranges: !<min id>..<max id>) to integrate the functionality of --skip into --target-id?

fuzziqersoftware commented 2 years ago

My basic plan was:

  • --target-type=<type>:<ids> limits the disassembled IDs of <type> (this would change existing behavior)
  • --target-id=<ids> limits the disassembled IDs in general
  • --skip=<ids> excludes the IDs in general

What do you think? Or would the change make --skip redundant?

What about !<id> to mean -32768..32767 except <id> (and similarly for ID ranges: !<min id>..<max id>) to integrate the functionality of --skip into --target-id?

The behavior proposed here sounds good. I think even if we add the !id syntax, we should retain the --skip options, but they could essentially become shorthand for e.g. --target-id=!<ids>. I suspect the !id syntax would be more useful for dupe_finder than for resource_dasm, but it does seem like a logical extension of this change and we might as well use the same syntax in both tools.