@ca-plant-list/ca-plant-list 0.4.44 → 0.4.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/exceptions.json +6 -6
- package/data/inatobsphotos.csv +175 -25
- package/data/inattaxonphotos.csv +210 -69
- package/data/synonyms.csv +28 -3
- package/data/taxa.csv +55 -27
- package/data/text/Delphinium-nuttallianum.md +1 -1
- package/data/text/Heuchera-micrantha.md +1 -0
- package/data/text/Heuchera-rubescens.md +1 -0
- package/data/text/Potentilla-flabellifolia.md +1 -1
- package/data/text/Silene-sargentii.md +1 -1
- package/lib/ebook/ebook.js +12 -4
- package/lib/ebook/pages/taxonpage.js +6 -1
- package/lib/ebook/plantbook.js +4 -1
- package/lib/htmltaxon.js +4 -2
- package/lib/index.d.ts +1 -1
- package/lib/tools/fna.js +14 -3
- package/lib/web/pageTaxon.js +1 -1
- package/package.json +1 -1
- package/scripts/build-ebook.js +1 -1
- package/scripts/cpl-tools.js +1 -0
package/lib/tools/fna.js
CHANGED
|
@@ -14,10 +14,18 @@ export class FNA {
|
|
|
14
14
|
* @param {string} toolsDataDir
|
|
15
15
|
* @param {string} dataDir
|
|
16
16
|
* @param {import("../types.js").Taxa} taxa
|
|
17
|
+
* @param {import("../exceptions.js").Exceptions} exceptions
|
|
17
18
|
* @param {import("../errorlog.js").ErrorLog} errorLog
|
|
18
19
|
* @param {boolean} update
|
|
19
20
|
*/
|
|
20
|
-
static async analyze(
|
|
21
|
+
static async analyze(
|
|
22
|
+
toolsDataDir,
|
|
23
|
+
dataDir,
|
|
24
|
+
taxa,
|
|
25
|
+
exceptions,
|
|
26
|
+
errorLog,
|
|
27
|
+
update,
|
|
28
|
+
) {
|
|
21
29
|
const toolsDataPath = path.join(toolsDataDir, "fna");
|
|
22
30
|
const fnaTaxa = await getFNATaxa(toolsDataPath);
|
|
23
31
|
|
|
@@ -25,9 +33,12 @@ export class FNA {
|
|
|
25
33
|
|
|
26
34
|
for (const taxon of taxa.getTaxonList()) {
|
|
27
35
|
const fnaName = getFNAName(taxon, fnaTaxa) ?? "";
|
|
36
|
+
const name = taxon.getName();
|
|
28
37
|
const taxonFNAName = taxon.getFNAName();
|
|
29
|
-
if (
|
|
30
|
-
|
|
38
|
+
if (
|
|
39
|
+
fnaName !== taxonFNAName &&
|
|
40
|
+
!exceptions.hasException(name, "fna", "notintaxondata")
|
|
41
|
+
) {
|
|
31
42
|
errorLog.log(
|
|
32
43
|
name,
|
|
33
44
|
"FNA name does not match name from FNA data",
|
package/lib/web/pageTaxon.js
CHANGED
|
@@ -156,7 +156,7 @@ export class PageTaxon extends GenericPage {
|
|
|
156
156
|
);
|
|
157
157
|
html += "</div>";
|
|
158
158
|
|
|
159
|
-
html += HTMLTaxon.getFooterHTML(this.#taxon);
|
|
159
|
+
html += HTMLTaxon.getFooterHTML(this.#taxon, "data");
|
|
160
160
|
|
|
161
161
|
const photos = this.#taxon.getPhotos().slice(0, 5);
|
|
162
162
|
if (photos.length > 0) {
|
package/package.json
CHANGED
package/scripts/build-ebook.js
CHANGED
|
@@ -77,7 +77,7 @@ async function buildBook(outputDir, dataDir, showFlowerErrors, maxTaxa) {
|
|
|
77
77
|
);
|
|
78
78
|
|
|
79
79
|
const config = new Config(dataDir);
|
|
80
|
-
const ebook = new PlantBook(outputDir, config, taxa, maxTaxa);
|
|
80
|
+
const ebook = new PlantBook(outputDir, dataDir, config, taxa, maxTaxa);
|
|
81
81
|
await ebook.create();
|
|
82
82
|
errorLog.write();
|
|
83
83
|
}
|