Releases: lokal-profil/BatchUploadTools
0.3.1
Basic support for Structured data on Commons
is offered by passing expect_sdc
to the uploader and providing the data as
either a <basename>.sdc
file (where <basename>
is shared with the .info
text file holding the associated file description page) or under the sdc
-key
if the data is provided as a make_info json file.
The expected format of the data is described at pywikibot-sdc.
Also:
- .svg ,wav and .png added as allowed filetypes
0.2.4
Add two new dict handling functions to common.py
relabel_inner_dicts()
: given a dict where each value is in turn a dict with a given set of keys,
update these keys for every inner dict.invert_dict()
: Invert keys and values in a dict.
Also update setup.py (missed in previous release)
0.2.3
Add maintenance scripts and pin pywikibot
Pins pywikibot version to ensure compatibility and keep track of when this repo is becoming out-of-date.
Adds a Maintenance directory containing scripts which are often of use during batch uploads but which aren't part of the library itself.
make_preview.py
: Generates a wikitext preview of file description pages.restore_filenames.py
: Reverts the re-naming done as part ofprepUpload
.cat_stats.py
: Outputs basic category statistics for the make_info output including a complete list of meta tags.
0.2.2
0.2.1
Rebuild the listscraper to use the MappingList
class.
This is a breaking change. Subsequently many method names
in listscraper.py
have also changed.
0.2.2
Add entrypoint for getting category/creator from Wikidata, get_wikidata_info
to listscraper
.
Add category existence checker, category_exists
, to helpers
Both should be used with some type of storage to prevent unnecessary lookups.
0.1.9
Adds the common.pop()
function and ensures mappings are loaded before the data is processed.
0.1.8
Add new postUpload function for removing categories from pages in a second category.
0.1.7
Introduced postUpload.py
which holds scripts intended for post-upload maintenance. Initially this only contains trim_parent_category()
.
Also:
- Test runs now respect the
-cutoff
argument - Two new arguments were introduced for downstream use
-base_meta_cat
and-batch_label
0.1.6
Sort all outputted json files
0.1.5
Enable upload_by_url
by allowing an url instead of a filename in upload_single_file()
in uploader.py
. To upload multiple files over url up_all_from_url()
was introduced.
The -type
argument was added to control which of up_all_from_url()
and up_all()
to use. And the -skip
/-only
arguments to filter which urls to process (these can take
the outputted logs as their input).
Also:
- main in
make_info
now returns the created instance - "wikidata" added as a default value in
listscraper
(and the default template was
changed to "User:André Costa (WMSE)/mapping-row"). - Partially re-factors logging by introducing a
LogFile
class tocommon
and adding
timestamp capabilities to it.
0.1.4
Updated formatting for preview output