-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat: Experimental subcommand-based interface (via @ok-nick) #729
Open
scouten-adobe
wants to merge
62
commits into
main
Choose a base branch
from
ok-nick/subcommands
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Foundation for migrating to unstable API * Extract resources using unstable API and introduce --unknown flag * Use unstable API for viewing * More unstable API during extraction * Use c2pa-rs branch w/ wip features * Set ingredient base paths * Use `Manifest::signature_info` to output certs * Migrate `view tree` command, rename `debug` flag to `detailed`, and update dependencies * Fix `--unknown` flag when extracting resources * Normalize URIs when extracting ingredients * Rearrange * Add `--no-embed` flag to signing` * Small changes to tests and fix comments * Use Reader in tests * More strict uri normalization and fix typo
Reopened from contentauth/c2patool#185 by @ok-nick. We'll need to clean up the conflicts, especially in the .github workflows section before merging. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes in this pull request
Rework the CLI to use subcommands rather than optional arguments.
c2patool sign
- sign manifestc2patool extract
- extract datac2patool extract resources
- extract resourcesc2patool extract ingredient
- extract ingredient json and binary manifestc2patool extract manifest
- extract json manifest (can extract .c2pa manifest with--binary
)c2patool view
- view info about manifestc2patool view manifest
- view user-friendly json manifest (can specify--debug
)c2patool view ingredient
- view json ingredientc2patool view info
- view general info about a manifestc2patool view tree
- view manifest treec2patool view certs
- view manifest certsc2patool i.jpg --info --certs --tree --detailed --manifest manifest.json --output o.jpg trust
, but what's actually happening?clap
will output a user-friendly error w/ suggestions)--help
menus are much shorter and navigable, describing what subcommands/args are valid to specifycargo
,rustup
,cross
,git
, etc.Additional Changes
--binary
flag to extract manifest as .c2pa binary manifest--no-verify
flag to allow extracting invalid binary manifests for debugging--unknown
flag to additionally extract unstandardized labeled resources--no-embed
flag when signing to not embed a manifest in the asset.--verbose
flag to specify verbosity via flags (rather than only env vars)--no-verify-signing
to--no-verify
--sidecar
is specifiedingredient_paths
to be merged intoingredients
field, specifying path or inline ingredient in .json--remote
to--manifest-url
and applied the same suffix-style pattern to trust argsextract manifest --binary
)Removed--remote
in favor of specifying path or url in--manifest
(similar to trust args)Uncertain Changes
ingredient.json
if directory specified as ingredient path--config
Examples
Screenshots
c2patool
c2patool extract
c2patool view
c2patool view manifest -h
c2patool sign -h
Checklist
TO DO
items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.