Page MenuHomePhabricator

Change unused_monument_images.py to support other sites than Wikipedia
Closed, ResolvedPublic

Description

In https://git.wikimedia.org/blobdiff/labs%2Ftools%2Fheritage.git/2e2f63325b6553e5418bb99f1ffb9e858432870d/erfgoedbot%2Fmonuments_config.py @JeanFred changed the bot to use Wikivoyage instead of Wikipedia. That was in September 2015. Strangely enough https://ru.wikipedia.org/w/index.php?title=%D0%9F%D1%80%D0%BE%D0%B5%D0%BA%D1%82:%D0%92%D0%B8%D0%BA%D0%B8_%D0%BB%D1%8E%D0%B1%D0%B8%D1%82_%D0%BF%D0%B0%D0%BC%D1%8F%D1%82%D0%BD%D0%B8%D0%BA%D0%B8/%D0%A1%D0%BF%D0%B8%D1%81%D0%BA%D0%B8/%D0%9D%D0%B5%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D1%83%D0%B5%D0%BC%D1%8B%D0%B5_%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F&action=history got edited after that day. Looking at https://git.wikimedia.org/blob/labs%2Ftools%2Fheritage.git/master/erfgoedbot%2Funused_monument_images.py#L120 it seems like the site is hardcoded and not fetched from the project field.

Todo:

  • Fix site object so it fetches it from the configuration (and falls back to 'wikipedia' if not set)
  • Check if we have the right page titles for the Russian Wikivoyage site and if we need a botflag there
  • Add Russian Wikivoyage to the user-config.py
  • Get the old pages deleted at the Russian Wikipedia for house keeping
  • Have the bot unblocked on the Russian Wikipedia. I already commented out the configuration line so the bot won't be able to edit there anymore

Event Timeline

Mentioned in SAL [2016-03-31T09:14:26Z] <multichill> Commented out the Russian Wikipedia in user-config.py for [[Phab:T131344]]

It was me who requested this change last year. I think that we do not need the unused images option at all. It is not very helpful anyway, because the number of unused images is much larger than the number of images that we can accommodate.

I removed old pages in Russian Wikipedia and unblocked the bot.

Current Wikivoyage config looks good to me.

@Atsirlin: If I understand correctly how this tool works, it is enough to add an image for the monument in the list once to remove all its images from unused. @Multichill, am I right or not?

@Atsirlin: If I understand correctly how this tool works, it is enough to add an image for the monument in the list once to remove all its images from unused. @Multichill, am I right or not?

Correct!

@JeanFred want to work on this today?

@putnik The page Культурное наследие России/Проблемные изображения doesn't seem to exist and my Russian isn't good enough to figure out if one of these other subpages tries to dod the same thing.

@Lokal_Profil: putnik created the following page for unused images
https://ru.wikivoyage.org/wiki/Неиспользуемые_изображения‎

We can rename this page if you don't like it for some reason, but for me it is the most accurate name. On the other hand, "Проблемные изображения" implies "images that make problems", which is not the case here.

Change 280903 had a related patch set uploaded (by Lokal Profil):
Load project from config

https://gerrit.wikimedia.org/r/280903

@Atsirlin Could you nominate the russian wikipedia page for deletion as no longer needed? (It is currently a redirect to a deleted page)

Then this page does not exist indeed. It can be created on Russian Wikivoyage with the name you mentioned (Культурное наследие России/Проблемные изображения), but will it be any different from:
https://commons.wikimedia.org/wiki/Category:Cultural_heritage_monuments_in_Russia_with_bad_IDs
where images without id are placed??

Or does the bot check for any monument ID that is not found in the database? This could be helpful.

@Atsirlin Could you nominate the russian wikipedia page for deletion as no longer needed? (It is currently a redirect to a deleted page)

Done

@Lokal_Profil: putnik created the following page for unused images
https://ru.wikivoyage.org/wiki/Неиспользуемые_изображения‎

We can rename this page if you don't like it for some reason, but for me it is the most accurate name. On the other hand, "Проблемные изображения" implies "images that make problems", which is not the case here.

I created page Культурное наследие России/Изображения без ID for this: https://ru.wikivoyage.org/wiki/%D0%9A%D1%83%D0%BB%D1%8C%D1%82%D1%83%D1%80%D0%BD%D0%BE%D0%B5_%D0%BD%D0%B0%D1%81%D0%BB%D0%B5%D0%B4%D0%B8%D0%B5_%D0%A0%D0%BE%D1%81%D1%81%D0%B8%D0%B8/%D0%98%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B1%D0%B5%D0%B7_ID
You should update the config.

So I patched "unused images" and "images without id". There might however be more scripts which implicitly assumes "wikipedia".

Change 280903 merged by jenkins-bot:
Load project from config for unused images/images without id

https://gerrit.wikimedia.org/r/280903

Mentioned in SAL [2016-04-01T22:51:02Z] <multichill2> JeanFred did a git pull for [[Phab:T131344]] and others

Lokal_Profil removed a project: Patch-For-Review.
Lokal_Profil updated the task description. (Show Details)