Skip to content

Commit

Permalink
fix(tools): get rid of "multiple entries" errors in eflora tool (#26)
Browse files Browse the repository at this point in the history
* fix(tools): get rid of "multiple entries" errors in eflora tool

* fix: pre-load all Jepson index pages to ensure that all data is retrieved

* chore: move @htmltools/scrape to dependencies
  • Loading branch information
johnkenny54 authored Jan 4, 2025
1 parent 53acc85 commit cb5974d
Show file tree
Hide file tree
Showing 9 changed files with 296 additions and 317 deletions.
8 changes: 5 additions & 3 deletions data/exceptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
}
},
"Erysimum capitatum var. angustatum": {
"comment": "in CNPS Rare Plant Inventory",
"calflora": {
"badjepsonid": true
},
"jepson": {
"allowsynonym": true
"notineflora": true
}
},
"Heterotheca oregona var. rudis": {
Expand All @@ -56,7 +57,7 @@
"notintaxondata": true
},
"jepson": {
"allowsynonym": true
"notineflora": true
},
"rpi": {
"translation": "Malacothamnus arcuatus var. elmeri"
Expand Down Expand Up @@ -95,11 +96,12 @@
"Sagina procumbens": { "calflora": { "native": false } },
"Salvia apiana": { "calflora": { "notintaxondata": true } },
"Streptanthus albidus subsp. peramoenus": {
"comment": "in CNPS Rare Plant Inventory",
"calflora": {
"notintaxondata": true
},
"jepson": {
"allowsynonym": true
"notineflora": true
}
},
"Typha angustifolia": {
Expand Down
247 changes: 125 additions & 122 deletions data/synonyms.csv

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ class CSV {
}

/**
* @template T
* @param {string} fileName
* @param {string} [delimiter]
* @returns {{headers:string[],data:Object<string,any>[]}}
* @returns {{headers:string[],data:T[]}}
*/
static readFileAndHeaders(fileName, delimiter) {
let headers;
Expand Down
Loading

0 comments on commit cb5974d

Please sign in to comment.