Page MenuHomePhabricator

Implement file captions in Pywikibot
Open, LowPublic

Description

We would like to have the feature of file captions, part of StructuredDataOnCommons, implemented in Pywikibot in order to use Pywikibot for T203010 uploads.

Event Timeline

abian created this task.Jan 16 2019, 11:33 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJan 16 2019, 11:33 AM
Xqt added a subscriber: Xqt.Jan 16 2019, 9:08 PM

Is there any api to be used?

Xqt triaged this task as Low priority.Jan 21 2019, 4:19 PM

Currently we can retrieve caption entries only but not write it. I think this doesn't help for T203010 currently. Seems we have to wait for further api implementations.

Currently we can retrieve caption entries only but not write it. I think this doesn't help for T203010 currently. Seems we have to wait for further api implementations.

Correct me if I’m wrong, but I believe that you can already write captions using wbsetlabel − although, as I understand it, would be an additional API call using the media ID (which is derived from the page_id, which I presume also needs to be retrieved post-upload via an API call).

(Poking @Addshore to correct me if I’m wrong above.)

(In case this can be useful for inspiration: the implementation in UploadWizard was tracked in T188502 and the bulk of it done in feee3d4f819d.)

Correct me if I’m wrong, but I believe that you can already write captions using wbsetlabel − although, as I understand it, would be an additional API call using the media ID (which is derived from the page_id, which I presume also needs to be retrieved post-upload via an API call).

That is indeed correct