This is a simple question, but I can't find an answer in the documentation - can the python dvuploader CLI support the upload of whole directories like java dvuploader? If so, what is the syntax for doing this from the CLI? Thanks!
@Jan Range :point_of_information:
@Lubov McKone the example in the README suggests it should work: https://github.com/gdcc/python-dvuploader?tab=readme-ov-file#programmatic-usage
So it should be worth a shot giving a dir as a file path
@Lubov McKone this is currently not implemented in the CLI, but I am happy to add it. There is already a function to do this within a script, as @Oliver Bertuch pointed out. Would you mind opening an issue to keep track of this?
Regarding an implementation, would these ways to add directories be sufficient?
Entire directory
some/dir/ (given it is a dir)
Entire directory but only files with same extension
some/dir/*.png
Carefull with the stars - shell will kick in to do the globbing
This is potentially dangerous if people have like 50.000 files in a dir, making the argument buffer explode
(There's not really a way to prevent that, but shouldn't make the script blow up)
Okay, good to know! I think for yaml config way this should be fine, but for the direct CLI usage it may be better to have an alternative. Checking how the Java DVUploader is handling this case, if this is even a feature.
Not every shell supports the "*/" globbing pattern. Might be nice if you'd support that
Usually your shell should prevent you from even running the script :wink:
But might be a nice gesture to enable globbing anyway if people escape the pattern using '<pattern>'
Yea, that would be very convenient and also a nice to have in the scripting part of DVUploader. I will look into this tomorrow :-)
That would be great! Yes, we've tried just adding the directory like a file path but it didn't know what to do with it. That syntax looks fine. I'll open an issue.
For java dvuploader, it accepts a directory name in place of the filepath via directoryname in place of file.csv in the command
Last updated: Nov 01 2025 at 14:11 UTC