Page MenuHomePhabricator

Use upload script with wildcards
Closed, InvalidPublic

Description

Couldn't find it anywhere in documentation, but is it possible to use upload script with wildcards?
If I use
upload /path/to/files/foo*
the scripts suggest all the full paths of foo* files as a description. Something like
/path/to/files/foo 1 /path/to/files/foo 2 /path/to/files/foo 3
which is, of course, is not what I want. It's the same with the -summary key.

In case of
upload /path/to/files/foo* -descfile:description.txt
I get an error "Both a description and a -descfile were provided. Please specify only one of those."

The workaround is to separately put all the foo* files to a separate folder and use -recursive.
upload -recursive /path/with/files -descfile:description.txt
works fine, but you have to go through the hassle of copying files to a seperate folder.

Event Timeline

Hi @RedKhan16, thanks for taking the time to report this and welcome to Wikimedia Phabricator.
Is this a feature request to change some code in Pywikibot itself? Or is this a support question if something is possible?

@Aklapper, hello!

Is this a feature request to change some code in Pywikibot itself? Or is this a support question if something is possible?

The latter.

Thanks for clarifying! As Wikimedia Phabricator is for bug reports and enhancement requests, and not for support requests, please see "Get Help" on https://www.mediawiki.org/wiki/Manual:Pywikibot