Page MenuHomePhabricator

Allow arbitrary search strings in citoid from existing footnotes
Open, MediumPublic

Description

Following T198567: Allow arbitrary search strings in citoid i would like to be able to expand existing plain-text fooonotes using Citoid.

If <ref>Endres, P., J., MacRenaris, K., W., Stefan Vogt, S., Meade, T., J., Bioconjugate Chem. 2008(19), 2049–2059.</ref> exists already, I would like to press "expand/search on Crossref" and convert that plaintext ref to the same thing as if I were to create a new automatic fottnote with citoid by searching Endres, P., J., MacRenaris, K., W., Stefan Vogt, S., Meade, T., J., Bioconjugate Chem. 2008(19), 2049–2059.

Event Timeline

Dupe of T124610?

Well, two separate features/issues fixed with the same code perhaps.

Are there particular patterns we should look for to blacklist/whitelist, or should we just provide the "convert" button for every non-template citation?

Edge cases:

  • Text contains a link, do we search for the link or the text, or give up? e.g. <ref>[http://news.example.com/title-of-article Title of Article]</ref>
  • Text contains multiple links, do we pick the first link, or use the text, or give up?
  • Citation contains another template we don't recognise, do we use the generated output or give up? e.g. <ref>{{other-link-generator|param}}</ref>
  • Citation contains template and text, do we ignore the template, or give up?, e.g. <ref>Title of Article {{from-this-news-site}}</ref>

Dupe of T124610?

Well, two separate features/issues fixed with the same code perhaps.

Yeah - doing this would make T124610 redundant, because on the backend we do actually try to pick out a url or doi in the string to convert it, in addition to checking crossref and worldcat.

Edge cases:

  • Text contains a link, do we search for the link or the text, or give up? e.g. <ref>[http://news.example.com/title-of-article Title of Article]</ref>
  • Text contains multiple links, do we pick the first link, or use the text, or give up?

The citoid service will try both. If it gets results from both, it gives two results. Citoid picks up only the first link though.

  • Citation contains another template we don't recognise, do we use the generated output or give up? e.g. <ref>{{other-link-generator|param}}</ref>
  • Citation contains template and text, do we ignore the template, or give up?, e.g. <ref>Title of Article {{from-this-news-site}}</ref>

We should skip anything that has a template in it, probably, as it's likely already formatted and inputting wikitext to citoid will not give good results.

The citoid service will try both. If it gets results from both, it gives two results. Citoid picks up only the first link though.

So you mean we should prepare some text that contains both the link and the link title? Or does Citoid an HTML query?

Mvolz removed Mvolz as the assignee of this task.Nov 14 2018, 12:16 PM
Mvolz triaged this task as Medium priority.

I made bug ticket T333521 for cases like "<ref>[http://news.example.com/title-of-article Title of Article]</ref>". Currently, the visual editor will lose information as it replaces the old reference with a result from citoid. It would need a review dialog for manually copy-pasting information from old reference to new reference or something.