Stream: python

Topic: dvuploader for directories


view this post on Zulip Lubov McKone (Aug 29 2024 at 13:48):

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!

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:42):

@Jan Range :point_of_information:

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:44):

@Lubov McKone the example in the README suggests it should work: https://github.com/gdcc/python-dvuploader?tab=readme-ov-file#programmatic-usage

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:44):

So it should be worth a shot giving a dir as a file path

view this post on Zulip Jan Range (Aug 29 2024 at 14:44):

@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?

view this post on Zulip Jan Range (Aug 29 2024 at 14:46):

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

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:46):

Carefull with the stars - shell will kick in to do the globbing

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:47):

This is potentially dangerous if people have like 50.000 files in a dir, making the argument buffer explode

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:48):

(There's not really a way to prevent that, but shouldn't make the script blow up)

view this post on Zulip Jan Range (Aug 29 2024 at 14:49):

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.

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:49):

Not every shell supports the "*/" globbing pattern. Might be nice if you'd support that

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:50):

Usually your shell should prevent you from even running the script :wink:

view this post on Zulip Oliver Bertuch (Aug 29 2024 at 14:50):

But might be a nice gesture to enable globbing anyway if people escape the pattern using '<pattern>'

view this post on Zulip Jan Range (Aug 29 2024 at 14:52):

Yea, that would be very convenient and also a nice to have in the scripting part of DVUploader. I will look into this tomorrow :-)

view this post on Zulip Lubov McKone (Aug 29 2024 at 14:54):

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.

view this post on Zulip Lubov McKone (Aug 29 2024 at 15:01):

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