tonythomas01 / gdrive-to-commons

Tool to upload pictures from Google Drive to Wikimedia Commons ⚠️ Moved to Wikimedia Gerrit, so this repo is read only.
https://gdrive-to-commons.toolforge.org/
Apache License 2.0
9 stars 10 forks source link

Add license picker for each file #43

Closed abbasidaniyal closed 4 years ago

abbasidaniyal commented 4 years ago

Solves two phabricator tasks. T241596 and T241425 . I have followed the media uploader workflow where we can select the license of each image separately.

Also implemented the serializer for the license and sending the formatted information to the API.

image

Screenshot_20200315_184755

tonythomas01 commented 4 years ago

See comment: https://phabricator.wikimedia.org/T241425#5989847. Thank you, and lets improve it together!

abbasidaniyal commented 4 years ago

Sure! 😄

abbasidaniyal commented 4 years ago

@tonythomas01 I have made the changes mentioned by you. Let me know if I missed out on something!

tonythomas01 commented 4 years ago

Okey, I see that after upload it ended up like this: Screenshot 2020-03-30 at 11 22 10

and the license was not correctly applied. Can you see what went wrong here ? You can look at how data is transmitted from the upload wizard and see why this happened.

tonythomas01 commented 4 years ago

Sadly not there yet. As you can see, your changes end up in the comments section on the file. See: Screenshot 2020-04-04 at 10 10 14

but this is not where we want it actually. For example, look at.: https://commons.wikimedia.org/w/index.php?title=File:2020-04-03_19_41_02_IMG_4695_will_rename_and_categorize_soon.jpg&action=edit

My initial impression is that the information needs to actually go into the description itself. Right now, it goes into the comments, which is not what we want!.

Also, I tried copy pasting the contents you are generating in the comments section to the description anyway to test, and I think it did not work out completely as well. I guess, this might be the problem: Screenshot 2020-04-04 at 10 16 52

You need \n before each headers in your get_initial_page_text()

tonythomas01 commented 4 years ago

But, great progress 👍

abbasidaniyal commented 4 years ago

The mwclient's code says it has to be in the comments itself. I think we need to remove the description and that should do it. image