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

thumbnailer: keeping picture directory structure #187

Closed
wants to merge 3 commits into from

Conversation

eingrossfilou
Copy link

A small quick and dirty (cf line 136) modifications in order to have the same directory structure than the picture directory.

A small quick and dirty (cf line 136) modifications in order to have the same directory structure than the picture directory.
@eingrossfilou eingrossfilou changed the title Keeping picture directory structure thumbnailer: keeping picture directory structure Apr 2, 2014
@justinmayer
Copy link
Member

Thanks for the contribution. Would you please provide some more detail as to:

  • What is the current behavior?
  • In what way is the current behavior problematic?
  • How does this PR address that problem?
  • Does this PR affect users who depend on the current behavior?

Apologies if this seems exhausting — there are many issues and pull requests to keep track of, and the extra information will make things much easier for project maintainers. Thank you!

@eingrossfilou
Copy link
Author

  • What is the current behavior?
    The current behavior is that the thumbnailer plugin flatten the picture directory structure.
  • In what way is the current behavior problematic?
    It is problematic when you use the thumbnailer plugin with the gallery plugin, especially if you have for example two galleries that have files with the same name. Only one of the files with same names will have a correct thumbnail.
  • How does this PR address that problem?
    This PR maintains the picture directory structure by adding, from the input path, the subdirectory where the current image is to the specified output path. The computation of the output path is then computed locally for each file instead to be computed globally (this part is moved from lines 126-127 to lines 134-136). Missing directories are created if needed (lines 137-138)
    I do not know if it is clear enough.
  • Does this PR affect users who depend on the current behavior?
    It is a good thing that you ask me that. It is the first time I submit a patch.
    This patch will change the current behavior. This is not good.
    I think I must keep the current behavior as the default one and put a parameter to have this new behavior.

Add the possibility to keep the picture directory structure with the parameter THUMBNAIL_KEEP_DIR_STRUCT. The previous behavior is the same if the parameter is not precised
@eingrossfilou
Copy link
Author

I corrected the patch in order to keep the old behavior as the default one.
The Readme is update too.

@gerrowadat
Copy link

As a new user, I just dug around in the codebase to figure out why it was doing this, and this behaviour seems unfortunate, especially in almost all uses cases with the gallery plugin.

Is there anything else that needs to be done for this to be accepted? Happy to help out where I can.

@kdeldycke
Copy link
Contributor

It seems these features are now supported by the canonical thumbnailer plugin, which has been moved to its own repository at: https://github.com/pelican-plugins/thumbnailer.

I guess this PR can be closed.

@justinmayer
Copy link
Member

Sincere apologies for not getting to this PR earlier. If there are enhancements in this plugin that are not present in the new Thumbnailer repository, by all means please submit them as PRs to that repo. I can assure you they will be reviewed much more quickly this time! 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants