Talk:Citoid/2018
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Previous archives are at /Archive 1
Redundant URLs
[edit]Hi. I posted this 9 months ago under Bugs: pmc, redundant urls, and ref tags. The only topic that was discussed when I posted this previously was the pmc accession number prefix (issue #1) and Redundant URLs (isssue #2) got lost in the discussion. Therefore I would like to raise the second undiscussed issue again, this time with more background.
Redundant url parameters are often added when there is another more appropriate and compact parameter that produces exactly the same link. Examples include:
- (url parameter → more appropriate specialized parameter)
|url=https://dx.doi.org/10.1016/S0092-8674(00)81781-X→|doi=10.1016/S0092-8674(00)81781-X|url=https://www.ncbi.nlm.nih.gov/pubmed/8111382→|pmid=8111382|url=https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5615317/→|pmc=5615317|url=https://www.worldcat.org/oclc/779244257→|oclc=779244257
IMHO, Citoid should check the url, and if it matches any of the above patterns, then the more specialized parameter should be populated and the url parameter should be left blank. As it stands now, Citoid is adding both the specialized parameter and the redundant url parameter. Boghog (talk) 16:39, 12 January 2018 (UTC)
- Basically you are right.
- The German template for printed material w:de:Template:Literatur does support
DOI=as well asPMID=andPMC=. - Furthermore, German templates detect URL as above and will issue error messages and urge to use plain ID rather than URL.
- Note that
dx.doi.orgrecently changed todoi.orgin new usages. PerfektesChaos (talk) 19:28, 13 January 2018 (UTC) - I understand that most readers don't know that the clicking the PMID/doi/etc. numbers will take them to a useful page, but they do understand that clicking an article title that looks like an external link is going to take them to the article. From the POV of a non-technical reader, having the "redundant" link is very helpful. Whatamidoing (WMF) (talk) 19:50, 18 January 2018 (UTC)
- I think you are underestimating the intelligence and curiosity of the average reader. Readers understand that blue text contains a hyperlink and links generally lead to useful information. At the very least, if a reader is interested in a source and sees a link in the source, they are liable to clinic on it to see where it leads.
- Furthermore the pmc parameter will also link the article title. Therefore
|url=https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5615317/is completely redundant with|pmc=5615317. Boghog (talk) 20:10, 18 January 2018 (UTC)
Install instructions
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
The install instructions are confusing. There is
"sudo apt-get install nodejs npm
nodejs --version # should now print v0.10.x Note: not on Ubuntu Server 12.04 LTS, you end up with v0.6.x" at [[Citoid#Installation]]. On my Debian I get v4.8.4 ...
I would be ok with this, maybe it works but then I read the next part which says "Checkout the older version: cd translation-server git checkout 8d6eae22"
Is this relevant today? Gryllida 01:04, 19 February 2018 (UTC)
- Nodejs --version - yes, definitely outdated, I'll fix that.
- As for translation-server, unfortunately, yes that is the equivalent to what we're running in production. For most purposes though, you can just use the most recent version. (It's just that the citoid tests are run with this older version, so you might get some failing tests so if you're trying to run them.) You can use the official translation-server installation directions from Zotero otherwise: https://github.com/zotero/translation-server Mvolz (WMF) (talk) 10:17, 19 February 2018 (UTC)
- Thanks that's great. Gryllida 03:34, 20 February 2018 (UTC)
ku.wikipedia
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello, I would like to activate it on ku.wikipedia. Apart from creating this page, is there anything else to do? Ghybu (talk) 14:17, 17 March 2018 (UTC)
- Yes, you also must add a special configuration message to the template data for every template that page points to. See: https://www.mediawiki.org/wiki/Citoid/Enabling_Citoid_on_your_wiki#Step_2.a:_Create_a_'citoid'_maps_value_for_each_Cite_template
- If you are using templates from en wiki, they may already have it, but if you are using ku templates you may have to write new template data. Mvolz (WMF) (talk) 10:06, 19 March 2018 (UTC)
- @Ghybu, are you making progress? Do you need help?
- I noticed that no citation templates are visible under the "Manual" tab. Do you want to add some, or does ku.wikipedia.org prefer non-templates? Whatamidoing (WMF) (talk) 18:19, 22 March 2018 (UTC)
- Indeed, I don't understand why it is empty. I also tested TemplateData and it works correctly. I missed something or I have to report a bug on Phabricator? Ghybu (talk) 18:13, 27 March 2018 (UTC)
- Hi, for the citations templates to be visible under the "Manual" tab, that is actually a separate configuration message called the citation tool: VisualEditor/Citation tool Mvolz (WMF) (talk) 10:05, 29 March 2018 (UTC)
- @Mvolz (WMF): Thank you for your help, it works now :) Ghybu (talk) 13:23, 29 March 2018 (UTC)
- Yay! Thanks for the update. I'm glad that you got it all sorted out. Whatamidoing (WMF) (talk) 18:21, 29 March 2018 (UTC)
London Gazette
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Citoid is currently unable to automatically fetch citation information from URLs for the London Gazette, which is the UK newspaper of record. Looking at a sample article, I suspect that it may be that a lot of the metadata for the article itself is in the body of the page, rather than the head, but it is tagged as metadata.
For example, https://www.thegazette.co.uk/London/issue/35586/page/2475 contains the metadata section of:
<dl class="metadata" id="pdf-description">
<dt>Publication date:</dt>
<dd>
<time datetime="1942-06-05">5 June 1942</time>
</dd>
<dt>Issue:</dt>
<dd id="issue-number">35586</dd>
<dt class="page-number">Page:</dt>
<dd id="page-number">2475</dd>
</dl>
Would adding support for London Gazette articles be technically possible? Sasuke Sarutobi (talk) 13:50, 19 March 2018 (UTC)
- Have you read Citoid#My favourite site isn't recognised by citoid and only gets basic information? FDMS 4 13:49, 20 March 2018 (UTC)
- Thank you! I hadn't spotted that section when scanning through the page, so I'll give Citoid/Creating Zotero translators a go at the weekend and see if I can set up a translator for it. Sasuke Sarutobi (talk) 15:54, 20 March 2018 (UTC)
Local database
[edit]Is there a way for Citoid to work with a local database so that it doesn't need to go through Zoltero. 2604:2000:DD4D:3A00:B9DF:24AD:C67C:9115 (talk) 14:06, 23 March 2018 (UTC)
- I think the correct answer is: "Yes – theoretically". I think you would have to re-write parts of the software (so it could find and understand your local database). Whatamidoing (WMF) (talk) 19:10, 23 March 2018 (UTC)
- So, there is no database with citoid OR Zotero's translation-server. Both Zotero and citoid generate citations on the fly, by querying APIs (like crossref) and scraping metadata from websites.
- You CAN use citoid locally without setting up a local Zotero translation-server instance. However, it won't work as well. Configuration options to use or not use zotero are in config.yaml Mvolz (WMF) (talk) 09:08, 26 March 2018 (UTC)
Use of public API
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
When setting $wgCitoidServiceUrl to https://en.wikipedia.org/api/rest_v1/#!/Citation/getCitation, I get an XMLHttpRequest error in my browser when adding a citation and it seems citoid is querying this url with the old API. I'm using REL1_31 of the Citoid extension. Citoid/API, indicates that the API has changed. Is this change only available through restbase and not $wgCitoidServiceUrl?
We run a small wiki and figured we'd piggy back off Wikipedia's citoid service instead of hosting our own.
Thanks for any help! Tinss (talk) 03:50, 9 July 2018 (UTC)
- Yes, the "old" API is actually citoid's native API, and that's what wgCitoidServiceURL expects, but we deprecated the public version of that a few years back, and now we're only running the one behind restbase. If mw.config.get( 'wgVisualEditorConfig' ).fullRestbaseUrl exists, then it Citoid uses the restbase one, but I'm pretty sure if you set that in the VE config it will mess up the rest of your VE installation :).
- Feel free to file a bug and/or submit a PR: https://phabricator.wikimedia.org/
- In the meantime you could also just manually set fullRestbaseUrl here instead of getting it from the VE config: https://github.com/wikimedia/mediawiki-extensions-Citoid/blob/master/modules/ve.ui.CiteFromIdInspector.js#L109 Mvolz (WMF) (talk) 10:47, 9 July 2018 (UTC)
- @Mvolz (WMF), I've managed to deploy restbase on my wiki and was wondering how to forward requests for /data/citation/{format}/{query} to https://fr.wikipedia.org/api/rest_v1/data/citation/{format}/{query}?
- I've also noticed you've patched Citoid to have the option to make use of a public API behind restbase. Until that codes makes it past review, I'll try to use the aforementioned way.
- Thanks a lot! Tinss (talk) 22:18, 15 December 2018 (UTC)
- fr and en wikipedia APIs perform identically, so there's probably no particular need to do that; internationalisation is not great, but what it does do is pass on the accept-language header. The content of the accept-language header is mw.config.get( 'wgContentLanguage' ) so as long as the content language of your wiki is fr, it'll get French when available. Mvolz (WMF) (talk) 12:36, 17 December 2018 (UTC)
- Thanks for the info! Any idea how I'm supposed to configure my local restbase to forward requests to another remote API? Tinss (talk) 04:52, 18 December 2018 (UTC)
- The change is merged, so you don't need to configure restbase, you should just be able to configure the citoid extension (if you update to 1.0.0): Citoid#Citoid extension Mvolz (WMF) (talk) 13:53, 18 December 2018 (UTC)
- Are you sure that its 1.0.0 version number ? Because current citoid version number is 0.3.0 according to https://en.wikipedia.org/wiki/Special:Version Nicolas NALLET Wiki-Valley.com (talk) 10:25, 10 October 2019 (UTC)
Outdated instructions
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I note that under `install from scratch`, step 2 instructs users to perform
`git checkout 8d6eae22`
This command, however, returns the error
`error: pathspec '8d6eae22' did not match any file(s) known to git.`
and indeed, perusal of https://github.com/zotero/translation-server/commits/master establishes that no such commit exists. Presumably the repository history was wiped on 24 May 2018.
As such I am not able to install a version of translation-server that is compatible with nodejs v6, as the current versions require v8 or above. Smith609 (talk) 07:25, 23 September 2018 (UTC)
- It looks like they moved the repository that used to live there to https://github.com/zotero/translation-server-old. You should be able to follow the directions using that URL instead.
- We are planning to use the new version fairly soon but it is not yet compatible. Mvolz (WMF) (talk) 17:32, 23 September 2018 (UTC)
QID in Wikitext editor
[edit]- The ability to fetch metadata from Wikidata by specifying only a QID is great, but please can we also have this in the wikicode editor? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:57, 28 November 2018 (UTC)
- You can currently do this in refToolBar as well by putting the QID or the full wikidata url in the url field and pressing the "search" eyeglass button.
- Unfortunately in terms of having a dedicated QID field in refToolBar, this first requires the citation templates on en wiki to add a QID parameter. Mvolz (WMF) (talk) 18:29, 28 November 2018 (UTC)
- Thank you. Yes, that works - but is undocumented, and counter-intuitive. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:59, 28 November 2018 (UTC)
- It's been available rom the start in the 2017 wikitext editor. If you mean the 2010 wikitext editor, that's generally not getting new features, including not getting the automatic citations ("citoid") tool. There are locally hacky gadgets on a few wikis that try to replicate that; if you're using one of those, you should ask whoever is supporting that gadget to extend their tool if it doesn't Just Work™ already. Jdforrester (WMF) (talk) 17:09, 28 November 2018 (UTC)
- I mean the 2010 editor, on en.Wikipedia. I have no idea who maintains it. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:58, 28 November 2018 (UTC)
- There is no automatic citation feature in the 2010 editor. You're talking about the refToolBar (default) gadget, which is not supported by the Foundation (as it's a gadget). Looking at the history, most of the recent work has been by the wonderful @Writ Keeper and @TheDJ, and @Kaldari and @Krinkle (in personal capacities). The gadget's talk page on the English Wikipedia is probably the best place to suggest feature changes. Sorry that this is so confusing. :-( Jdforrester (WMF) (talk) 22:13, 28 November 2018 (UTC)
- Thank you; done: https://en.wikipedia.org/wiki/Wikipedia_talk:RefToolbar#QID_support Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:26, 29 November 2018 (UTC)