Skip to content
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

Allow title, subject, author, and keywords to be unset with an empty string argument #1059

Closed
wants to merge 1 commit into from

Conversation

f-hansen
Copy link
Contributor

Passing --title='', --subject='', author='', or keywords='' is currently ignored. As a workaround, users tend to pass a space when they do not want such original metadata to carry forward. It is more desirable to be able to simply unset the output metadata rather than setting it to " ".

@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2023

Codecov Report

Merging #1059 (2b777ca) into main (2d77b95) will decrease coverage by 1.24%.
The diff coverage is 0.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main    #1059      +/-   ##
==========================================
- Coverage   81.48%   80.24%   -1.24%     
==========================================
  Files          75       75              
  Lines        6027     6035       +8     
  Branches     1131     1135       +4     
==========================================
- Hits         4911     4843      -68     
- Misses        939     1005      +66     
- Partials      177      187      +10     
Impacted Files Coverage Δ
src/ocrmypdf/_pipeline.py 58.20% <0.00%> (-1.07%) ⬇️

... and 4 files with indirect coverage changes

@jbarlow83
Copy link
Collaborator

Sorry for taking so long to get back. Could you add a test to confirm this change continues to work correctly?

@f-hansen
Copy link
Contributor Author

@jbarlow83 Please, no apologies. :) Your hard work and dedication is greatly appreciated.

I noticed that this does remove the appropriate metadata from the DocumentInfo block but apparently leaves it in the XMP steam object. I'll work on fixing this and will also provide the requested tests.

@f-hansen f-hansen force-pushed the unset_metadata branch 2 times, most recently from f31fb5f to 2b777ca Compare June 20, 2023 02:33
@f-hansen f-hansen closed this Jun 20, 2023
@f-hansen f-hansen deleted the unset_metadata branch June 20, 2023 02:37
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.

None yet

3 participants