ryanvilbrandt / comic_git

A statically-hosted web comic server core intended to be hosted on github.io. For help getting started, click the Wiki link above!
23 stars 7 forks source link

Automatically detect comic filename #55

Closed shirgoldbird closed 3 years ago

shirgoldbird commented 3 years ago

As a comic_git user, when I create a new comic folder, I want the info.ini file to automatically detect the filename of my comic, so that I can save time and cut down on errors when adding new comics.

If there's only one image in the folder (outside of thumbnail.jpg), it would be so convenient if info.ini could grab that automatically! If there's more than one image, info.ini could either error, or grab the first one. This behavior could always be overridden by providing a Filename property in info.ini.

ryanvilbrandt commented 3 years ago

info.ini is a config file, so it never gets automatically generated or built in any way. That's reliant on the user to add all the right info. I'd rather not build in any logic that will automatically change a file a user is responsible for, as that is the way towards very confusing support requests.

Funny enough, I did originally create an issue myself for fixing this problem (#25) but scrapped it because it would suddenly break if the user put another image file in the comic directory for any reason, say to embed an image in their text post for that comic. And if it just tried to grab a random non-thumbnail image, I'd worry it would sometimes grab the non-comic image, which could be a surprising and frustrating bug for the users, especially the non-technical ones.

That said, I'm game to try adding this feature if it's very beneficial to your workflow. This is a case of trying to guess whether a quality of life feature will end up being more useful or more confusing in the long run.

As an alternative: would providing a default comic image filename work to solve this issue in your opinion? Say, page.png by default? This could be overridden with an optional config parameter in the comic_info.ini file.

ryanvilbrandt commented 3 years ago

I could possibly block this behind a default-off option in the config.ini file. Something about "auto-detect comic images". This would make it more likely that anyone using the feature would have read the documentation, and thus know the risk of putting multiple images in a single comic directory. 🤔