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

Move heic2jpg functionality into an exported mockable interface #2

Closed
wants to merge 6 commits into from

Conversation

tagatac
Copy link

@tagatac tagatac commented Jul 13, 2022

Move a common usage of this library behind an exported interface, so that the example usage is reduced from 85 lines to 13 lines.
Also:

  • Add mock files for easy testing in packages which import heic2jpg
  • Add Makefile, go.mod, and go.sum files for easier building and testing
  • Silence constant-conversion warnings when compiling C++ code
  • Add Travis CI and Codecov configs

Closes #1

tagatac added a commit to tagatac/bagoup that referenced this pull request Jul 14, 2022
Use wkhtmltopdf for PDF support because it has the easiest emoji solution (via twemoji).

heic2jpg.go is untested as it is largely copied from upstream, and I have a PR open to create an interface upstream: adrium/goheif#2

goheif also has issues vendoring because there is no Go code in some of the required C++ subdirectories: golang/go#26366. This should also be fixed upstream, but as a stopgap, we need to use the cp and chmod commands (vendor makefile target).

* Enable output to PDF

* Add support or jpegs in PDFs

* Switch to wkhtmltopdf for emoji support

* Implement copying attachments

* Convert HEIC attachments to JPEG for PDF output

* Update example to match new defaults

* Add "attached" text to attachment references in outfiles

* Update dependencies

* Install wkhtmltopdf in Travis CI

* Use xvfb in Travis CI
@tagatac
Copy link
Author

tagatac commented Jul 18, 2022

These improvements and more can now be found in https://github.com/tagatac/goheif

@tagatac tagatac closed this Jul 18, 2022
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.

Reduce library interface
1 participant