Skip to content

Added output file pattern matching #1

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

Merged
merged 2 commits into from
Feb 11, 2024
Merged

Added output file pattern matching #1

merged 2 commits into from
Feb 11, 2024

Conversation

Lethja
Copy link
Contributor

@Lethja Lethja commented Feb 9, 2024

Adds and documents printf like parameters to the --outputfile-pattern argument. This allows identical changes multiple anim files to be done in a very trivial way

Example:

mkdir left right
mv *.anim left/
python animDump  --mirror -o %p/../right/%n left/*.anim

Moved output file name token documentation to epilog to make it multi-line

Clean up output_path initialization
@tapple tapple merged commit d3cbd02 into tapple:master Feb 11, 2024
@tapple
Copy link
Owner

tapple commented Feb 11, 2024

merged. I messed around with help text formatting and figured out that RawHelpTextFormatter is the answer: 41e12e0

  --outputfile-pattern OUTPUTFILE_PATTERN, -o OUTPUTFILE_PATTERN
                        Output anim file path/name, with template substitution:
                            %n: input file name
                            %p: input file directory
                            %%: literal '%'
                        File extension will be appended automatically
  --time-scale ACTIONS, --tscale ACTIONS, --speed ACTIONS, -s ACTIONS
                        Adjust duration by the given factor eg:
                            2.0 for half-speed/double duration, or
                            0.5 for double speed/half duration

@Lethja
Copy link
Contributor Author

Lethja commented Feb 12, 2024

merged. I messed around with help text formatting and figured out that RawHelpTextFormatter is the answer: 41e12e0

  --outputfile-pattern OUTPUTFILE_PATTERN, -o OUTPUTFILE_PATTERN
                        Output anim file path/name, with template substitution:
                            %n: input file name
                            %p: input file directory
                            %%: literal '%'
                        File extension will be appended automatically
  --time-scale ACTIONS, --tscale ACTIONS, --speed ACTIONS, -s ACTIONS
                        Adjust duration by the given factor eg:
                            2.0 for half-speed/double duration, or
                            0.5 for double speed/half duration

Great! I saw RawHelpTextFormatter in the documentation myself but the "raw" in the name made me think it would require indenting every help string manually. I'm glad that's not the case

@Lethja Lethja deleted the output branch February 12, 2024 03:31
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.

2 participants