Skip to content

cli: refactor cli into smaller functions #18689

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

faxe1008
Copy link

Refactor the darktable-cli into smaller functions for better readability.

I wanted to do some automation from the cli, where I also wanted to add an option --style-file to pick the style from a file instead of requiring to pre-import it. Anyways while attempting to make that change I found that it's hard to follow what is happening in the cli so I first refactored it a bit. Follow up PR for the other stuff may follow soon-ish.

@wpferguson
Copy link
Member

Perhaps you could open a feature request explaining what your vision is for darktable-cli is so that we can put the changes you are requesting in to some kind of context.

However, changing int k; to int i; seems more about personal preference than readability.

@faxe1008
Copy link
Author

I thought that separating the refactoring from a feature change is a good idea, functionality wise this PR should not modify anything.

But a short explanation:
I am planning to self host a kind of archive of darktable preset styles that I enjoy using Github Pages. My idea here is to have a repository with the styles checked in and some refrence images. Via GH actions I run each style over the refrence image and create a simple HTML page where you can preview the styles. This is then published to the Github Pages.
For that to work I need to be able to somehow apply a style from file, either import it via CLI or more convenient apply it directly from file.

However, changing int k; to int i; seems more about personal preference than readability.

Yeah that is true, will go over the change set an try to minimize the delta for this kind of stuff :^).

@faxe1008 faxe1008 force-pushed the refactor_cli branch 20 times, most recently from e274026 to 7f30492 Compare April 15, 2025 10:05
Refactor the darktable-cli into smaller functions for better
readability.
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.

2 participants