Skip to content

Releases: lokal-profil/BatchUploadTools

0.3.1

16 Mar 08:22
5b08905
Compare
Choose a tag to compare

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

26 Jun 13:53
424ff75
Compare
Choose a tag to compare

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

26 Jun 11:51
cf6a5e2
Compare
Choose a tag to compare

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 of prepUpload.
  • cat_stats.py: Outputs basic category statistics for the make_info output including a complete list of meta tags.

0.2.2

13 Mar 10:43
bf0c621
Compare
Choose a tag to compare

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

17 Nov 15:24
Compare
Choose a tag to compare

Adds the common.pop() function and ensures mappings are loaded before the data is processed.

0.1.8

05 Oct 15:28
Compare
Choose a tag to compare

Add new postUpload function for removing categories from pages in a second category.

0.1.7

27 Sep 13:57
Compare
Choose a tag to compare

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

04 Jul 15:35
Compare
Choose a tag to compare

Sort all outputted json files

0.1.5

30 May 09:24
Compare
Choose a tag to compare

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 to common and adding
    timestamp capabilities to it.

0.1.4

12 May 13:02
Compare
Choose a tag to compare

Updated formatting for preview output