You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user clips semi-structured text from a journal article into Obsidian, the scientific names may be presented with abbreviated genus names, as the context is determined from the containing paper.
The IPNI name search script could do the following:
Read the frontmatter, and look for a "genus_context" entry
If the search string starts with the first letter of the genus_context entry followed by '. ' then replace it before doing the IPNI name search.
This would ensure that paragraphs like the following could easily be searched by highlighting the species names, even if they are abbreviated (currently only the first could be searched by highlighting the existing text):
These new species are all relatively rare, but not currently of conservation concern. Solanum aspersum sp. nov. is distributed in Colombia and Ecuador, S. luculentum sp. nov. in Colombia and Venezuela, S. sanchez-vegae sp. nov. is endemic to northern Peru and S. sousae sp. nov. to southern Mexico. Solanum luculentum has the morphology of a dioecious species; this is the first report of this breeding system in the Dulcamaroid clade.
The script would receive "S. luculentum" (from document.getSelection()), check the frontmatter (app.metadataCache.getFileCache(file).frontmatter) for a genus_context entry, replace "S." with "Solanum" and proceed with the search and display of matches. If no genus context is available or if the abbreviation does not match then the search should proceed as normal.
The text was updated successfully, but these errors were encountered:
nickynicolson
changed the title
IPNI script to should support searches on abbreviated genus name
IPNI script should support searches on abbreviated genus name
Aug 11, 2022
If a user clips semi-structured text from a journal article into Obsidian, the scientific names may be presented with abbreviated genus names, as the context is determined from the containing paper.
The IPNI name search script could do the following:
This would ensure that paragraphs like the following could easily be searched by highlighting the species names, even if they are abbreviated (currently only the first could be searched by highlighting the existing text):
The script would receive "S. luculentum" (from
document.getSelection()
), check the frontmatter (app.metadataCache.getFileCache(file).frontmatter
) for agenus_context
entry, replace "S." with "Solanum" and proceed with the search and display of matches. If no genus context is available or if the abbreviation does not match then the search should proceed as normal.The text was updated successfully, but these errors were encountered: