Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

--only option to extract files by extension#24

Open
PreciadoCaesar wants to merge 1 commit intoshizmob:masterfrom
PreciadoCaesar:feature/only
Open

--only option to extract files by extension#24
PreciadoCaesar wants to merge 1 commit intoshizmob:masterfrom
PreciadoCaesar:feature/only

Conversation

@PreciadoCaesar
Copy link

Hello! 👋

This pull request adds a small but useful feature to rpatool: the ability to extract only specific types of files by using the new --only option. For example:

python rpatool.py -x archive.rpa --only .png

This makes it easier to work with large .rpa archives when you're only interested in certain file types like .png, .rpyc, .ogg, etc.

Greetings from Peru 🇵🇪 and thanks for maintaining this project!

**– Cesar**

@shizmob
Copy link
Owner

shizmob commented Jul 21, 2025

Hi, thanks for using rpatool and for your contribution! I'm thinking of two things here to make it even better:

  • Maybe it makes sense to follow the convention of other command-line extraction tools like unzip and specify the files as positional arguments instead?
  • It would be cool to allow wildcards too and use fnmatch.fnmatch() for matching. Do you agree and if so, would you like to have a go at it? Else, I can also implement it instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants