Featured image of post Hugo Website - Automatic Image Generator (Part 2)

Hugo Website - Automatic Image Generator (Part 2)

Added a local CLI to run the same image generation process on my local machine.

I’m a little ahead of myself as I have already added a command line to slack to show me the images, but I did not like how I architected it, so I’m going to re-do it.

I didn’t want to block myself and I want to run locally as much as possible, so I refactored a bit to re-use the same code locally. I know it’s a large pull request… 👀

This exercise was a good way to abstract the local needs (i.e. user GitHub token) vs the cloud needs (i.e. GitHub App Key).

I can also update the file with the image path from the command line as well. I used python package click to make the CLI.

These are building blocks that I can use in my Slack command, with the same codebase I run locally.

Additionally, it gives me a way to run and test the base application without having to deploy it to the cloud.

I can continue to add features and have multiple ways to run the application.

Licensed under CC BY-NC-SA 4.0
Built with Hugo
Theme Stack designed by Jimmy