Jump to content

Talk:Citoid/Maps TemplateData

About this board

For discussion about how to map TemplateData to values the citoid service can use.

Diegodlh (talkcontribs)

The documentation says, in the Available fields and field structure section, that "if there is only one name for the contributor, the second value [representing last name of two-field creators] will be an empty string". However, in the following two examples returning one-field contributors it is the first value (not the second) which is an empty string:

This aligns with Zotero behavior of saving one-field creator names into the lastName field. Shall we change the docs?

Mvolz (WMF) (talkcontribs)

Fixed, thanks!

Reply to "One-field creators"
Diegodlh (talkcontribs)

The documentation says the basefields may be requested by appending the basefield=true argument to the request string. However, this doesn't seem to be working anymore, probably since the Citoid API was placed behind Restbase, as discussed here. I understand one can use the mediawiki-basefields format instead.

Shall we update this in the documentation?

BTW, a couple of questions while I'm developing the interface between Web2Cit and Citoid, as I'm thinking of using base fields:

  • What was meant by "entirely decommissioning" here? Will the mediawiki-basefields format continue to be available?
  • The documentation also says (probably outdated): "Currently [i.e., before?] citoid extension gets both fields back, but in the future [i.e., now?] it will only get the specific type i.e. the field not in parens". Why was it decided to favor specific over base fields? I couldn't find anything in Phabricator.

Thank you!

Mvolz (WMF) (talkcontribs)

Fixed, thanks!

mediawiki-basefields will continue to be available as it's too much bother to do away with :). On the second point, that was very temporary change made for backwards compatibility. Now you only get the specific type from mediawiki format and not the basefield.

We ended up using the more specific types for VisualEditor because it was more flexible if you wanted to treat different item types differently using the same citation template. However in practice I don't think that was taken advantage of a lot, and having that many types makes doing the template data maps a pain, so, meh.

Reply to "basefield=true"
There are no older topics