Ghini / ghini.desktop

plant collections manager (desktop version)
http://ghini.github.io/
GNU General Public License v2.0
24 stars 14 forks source link

Theplantlist => worldfloraonline #463

Open aauioo opened 4 years ago

aauioo commented 4 years ago

If I understood well, the list of plantnames at http://www.theplantlist.org/ is not maintained anymore and is going to be replaced by another list at http://www.worldfloraonline.org/ , see the box on the homepage of theplantlist. Theplantlist will become outdated in time. Ghini 1.0.90 is verifying botanic plant names at theplantlist.org when you create a new species. This is when you choose to do so, by using the button next to the box where one enters the species epithet. There may be more places in ghini referring to theplantlist. I would like to suggest we have a look at this.

mfrasca commented 4 years ago

just written the following:


Dear world-flora-online,

I'm the maintainer of the GPL botanical software 'ghini'. ghini uses a csv API provided by theplantlist.org, to check epithet spelling and authorship of plant species, this is something that my users can invoke whenever they add a new species to the database.

a user alerted me of WFO substituting TPL (https://github.com/Ghini/ghini.desktop/issues/463). I did not find it so immediately, so I'm asking: does WFO also offer anything similar to the csv theplantlist.org api?

a typical query produced by ghini would look like this:

http://www.theplantlist.org/tpl1.1/search?q=Mangifera indica&csv=true

I added a trailing '&csv=true' to the corresponding WFO url, but I still get an html page.

best regards,

Mario Frasca

mfrasca commented 4 years ago

I didn't receive any reply. if someone else wants to give it a try?

aauioo commented 4 years ago

Hello Mario; I took a look at the website of worldfloraonline. I have the idea that one has to download the whole data file. I just did it. it is an txt file. I think the idea is to download it and have it on ones own server, desktop, whatever. A database then has to be "adapted" to check the txt file. That is my impression. Of course I am not an IT person, so I may be wrong. I add two screenshots.

mfrasca commented 4 years ago

oops, that sounds like quite a bit worse than TPL. how big is the file? does it contain an indication of when it was updated? do they publish it with any regularity? did you try contacting the people behind the web site? if you have the URL, please share it, it's possibly more useful than screenshots. I will see when I have a look myself, I'm behind an expensive and slow internet connection.

mfrasca commented 4 years ago

@aauioo , to make things clearer: ghini interacts with tpl by sending a very short request to their server, and receive a CSV reply. try following this link about Mangifera indica or possibly more interestlingly Iris florentia—a mistake.

what you get is not a web page, it's just text information, and it's pin-pointed around the request. it's meant to help others correct typing mistakes, and to complete the information provided.

I've seen their classification, and I may agree it looks smart, but it also looks very definitely not usable from an automated client. I have the impression they won't publish an API, but that's my impression. if others want to attempt contacting them, I have already tried twice.

without an API, I think we keep using TPL until the site disappears, and further rely on TNRS.

aauioo commented 4 years ago

I was changing a name and adding a synonym. I use the catalogue of life many times to manually check names. It is good in my experience. I checked the site a bit more and noticed this; []https://www.catalogueoflife.org/content/web-services(url) I don't know these sort of things, but is it also an option? Beware, site is under construction and they expect to be operational again sometime this year.

mfrasca commented 1 year ago

so, this has settled enough at the remote end, that we can write a solution for it, together with a solution for #472.

I plan to replace both the first "on the fly" check and the batch check with a call to the TNRS API.

a sample query with the relevant selection from the json response:

$ curl --silent 'https://tnrsapi.xyz/tnrs_api.php' -X POST -H 'Content-Type: application/json'\
  --data-raw '{"opts":{"sources":"wcvp","class":"wfo","mode":"resolve","matches":"all","acc":"0"},"data":[[1,"rosmarinus officinalis"]]}' |
  grep -o '"\(Canonical\|Name_matched\|Accepted_name\)\(\|_rank\|_author\|_accepted_family\)":"[^"]*"'
"Name_matched":"Rosmarinus officinalis"
"Name_matched_rank":"species"
"Canonical_author":"L."
"Name_matched_accepted_family":"Lamiaceae"
"Accepted_name":"Salvia rosmarinus"
"Accepted_name_author":"Spenn."
"Accepted_name_rank":"species"