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

Convert resume pdfs to images #270

Merged
merged 10 commits into from
Aug 10, 2022
Merged

Conversation

mcpenguin
Copy link
Collaborator

Summary of Changes

PDFs sent to the #resumes channel will be converted into images automatically by Codey.

TODOs Before Merging

  • We need to update the staging and production dockerfiles to include these lines that download deps necessary for the PDF->image converter:
RUN apk add --update ghostscript
RUN apk add --update graphicsmagick
  • We need to update the staging and production configs to account for the new config variable, RESUME_CHANNEL_ID (see below)

Testing Notes

  1. Add the RESUME_CHANNEL_ID variable to your config.json; this is the channel where the resumes are sent (in this case it will be #resumes)
  2. Send a message without any attachment: nothing should happen (this is similar to when people post google drive links to their resumes)
  3. Send a message with a pdf of a resume: Codey should automatically send back an image corresponding to the resume.

Screenshots

Nothing happens if no attachment is sent, so the screenshot for the case where a resume pdf is attached is shown below:

image

Copy link
Collaborator

@alexz429 alexz429 left a comment

Choose a reason for hiding this comment

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

Some small optimizations for dockerfiles:
Add the run steps for mkdir and library installations at the very start, since those actions can probably be cached before any file changes.
Add /tmp to dockerignore to prevent local tmp files being sent over.

Also don't forget to add the new env var into staging and prod configs.

@mcpenguin mcpenguin force-pushed the 256-convert-resume-pdfs-to-images branch from 30e9023 to 8a92432 Compare August 10, 2022 17:56
@mcpenguin mcpenguin merged commit ebbc359 into master Aug 10, 2022
@mcpenguin mcpenguin deleted the 256-convert-resume-pdfs-to-images branch August 10, 2022 18:08
@mcpenguin mcpenguin mentioned this pull request Sep 10, 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.

[FEATURE] Add functionality to convert resume pdfs to images
2 participants