saimn / sigal

yet another simple static gallery generator
http://sigal.saimon.org/
MIT License
893 stars 170 forks source link

zip_archive is either `False` or a filename, which is confusing. should have zip names depend on album name to make download easier #477

Closed shuhaowu closed 2 years ago

shuhaowu commented 2 years ago

I noted that zip_archive must be set to a file name. The documentation mentions this, but after looking at zip_archive = False a lot, I thought it was supposed to be True. This wasted a bunch of time. I understand this is an user error, but perhaps an error would help the users not stab themselves unintentionally...

That said, I have a gallery where I have multiple albums. With the current system, it means every album's archive will be called archive.zip or something like that. When people download this, their browser will simply rename them to things like archive (2).zip and so on. It would be nice if we can set zip_archive = True and the zip name is determined by the album directory name. This way, people viewing the gallery can download multiple galleries without having colliding zip names.

saimn commented 2 years ago

Not sure to understand the issue with = False. As stated in the example settings file you can already set it to '{album.name}.zip' to use the album name.

shuhaowu commented 2 years ago

Originally when I saw that zip_archive = False, I thought that it can be set to True, but this didn't work and had no warning. I ended up spending probably around 20 minutes trying to figure it out before I remembered the docs. This is a bit misleading to newer users as the type on the zip_archive variable is not enforced.

Not the biggest deal, and thanks for the idea to interpolate the album name.

saimn commented 2 years ago

Oh I see, indeed it would make sense to prevent using = True as it crashes silently.

shuhaowu commented 2 years ago

Thanks for the prompt response!!