Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

allows clients to output manifest report to specified directory #91

Merged
merged 6 commits into from
Dec 3, 2022

Conversation

dyro
Copy link
Contributor

@dyro dyro commented Nov 28, 2022

Changes in this pull request

This PR allows clients to output the manifest report, including its various thumbnails, to a user specified directory on the file system. This will be especially useful for clients who want to extract the thumbnails from the manifest. Here's an example of the new functionality:

c2patool sample/C.jpg --output ./report

The above command will write the manifest and its thumbnail contents to the report directory. Here's an example of the output:

image

I went back on forth on a few different ways to organize all the thumbnails. Let me know if you have any suggestions on the directory structure!

Checklist

  • This PR represents a single feature, fix, or change.
  • All applicable changes have been documented.
  • Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2022

Codecov Report

Merging #91 (66f9ba9) into main (ba8b4ca) will increase coverage by 5.91%.
The diff coverage is 98.92%.

@@            Coverage Diff             @@
##             main      #91      +/-   ##
==========================================
+ Coverage   72.88%   78.79%   +5.91%     
==========================================
  Files           4        5       +1     
  Lines         295      382      +87     
==========================================
+ Hits          215      301      +86     
- Misses         80       81       +1     
Impacted Files Coverage Δ
src/fs_report.rs 98.79% <98.79%> (ø)
src/main.rs 67.18% <100.00%> (+1.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

- supports `detailed` flag when writing
- organizes thumbnails in a directory named for the manifest in which it appears
- updates manifest extension to `.json`
src/fs_report.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@gpeacock gpeacock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I requested a couple of changes.
PS can add PSD and other ingredient types that will have different thumbnails formats than the ingredient. Also, if a PNG ingredient doesn't have transparency, we will use a jpeg thumbnail since it is smaller.

src/fs_report.rs Show resolved Hide resolved
tests/integration.rs Show resolved Hide resolved
src/fs_report.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@gpeacock gpeacock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like your idea of simplifying things, so it would be nice to merge that, otherwise it looks good go.

src/fs_report.rs Outdated Show resolved Hide resolved
@dyro dyro merged commit ed14ed1 into main Dec 3, 2022
@dyro dyro deleted the CAI-2962 branch December 3, 2022 00:19
scouten-adobe pushed a commit to contentauth/c2pa-rs that referenced this pull request Dec 10, 2024
…entauth/c2patool#91)

* allows clients to output manifest report to specified directory
* appeases clippy
* implements feedback
* supports `detailed` flag when writing
* organizes thumbnails in a directory named for the manifest in which it appears
* updates manifest extension to `.json`
* accounts for thumbnail title having different extension from thumbnail data
* simplifies add extension to ingredient thumbnail file name

Co-authored-by: Dylan Ross <[email protected]>
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.

3 participants