@ca-plant-list/ca-plant-list 0.4.8 → 0.4.10
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/.github/workflows/main.yml +20 -0
- package/.vscode/settings.json +7 -2
- package/data/glossary/perianth.md +1 -0
- package/data/inattaxonphotos.csv +68 -4
- package/data/taxa.csv +5 -3
- package/data/text/Toxicoscordion-fremontii.md +1 -0
- package/data/text/Toxicoscordion-paniculatum.md +1 -0
- package/data/text/Toxicoscordion-venenosum-var-venenosum.md +1 -0
- package/ebook/css/main.css +9 -1
- package/eslint.config.mjs +9 -9
- package/lib/csv.js +27 -5
- package/lib/ebook/images.js +79 -52
- package/lib/ebook/pages/taxonpage.js +25 -27
- package/lib/ebook/plantbook.js +147 -139
- package/lib/htmltaxon.js +124 -117
- package/lib/inat_photo.js +15 -15
- package/lib/progressmeter.js +29 -0
- package/lib/taxa.js +23 -22
- package/lib/util.js +4 -3
- package/lib/utils/inat-tools.js +90 -0
- package/lib/web/pagetaxon.js +199 -190
- package/package.json +4 -3
- package/scripts/cpl-photos.js +179 -0
- package/tmp/config.json +21 -0
- package/tmp/exceptions.json +93 -0
- package/tmp/families.json +790 -0
- package/tmp/genera.json +5566 -0
- package/tmp/inattaxonphotos.csv +6059 -0
- package/tmp/synonyms.csv +2141 -0
- package/tmp/taxa_include.csv +19 -0
- package/types/classes.d.ts +21 -20
- package/data/photos.csv +0 -9
- package/lib/ebook/taxonimage.js +0 -23
@@ -0,0 +1,19 @@
|
|
1
|
+
taxon_name,status
|
2
|
+
Abutilon theophrasti
|
3
|
+
Acacia baileyana
|
4
|
+
Acacia dealbata
|
5
|
+
Acacia longifolia
|
6
|
+
Acacia melanoxylon
|
7
|
+
Acacia paradoxa
|
8
|
+
Acacia redolens
|
9
|
+
Acacia retinodes
|
10
|
+
Acacia verticillata
|
11
|
+
Acaena californica
|
12
|
+
Acanthomintha lanceolata
|
13
|
+
Acer campestre
|
14
|
+
Acer macrophyllum
|
15
|
+
Acer negundo
|
16
|
+
Achillea millefolium
|
17
|
+
Achyrachaena mollis
|
18
|
+
Acmispon americanus var. americanus
|
19
|
+
Acmispon brachycarpus
|
package/types/classes.d.ts
CHANGED
@@ -9,7 +9,7 @@ declare class Config {
|
|
9
9
|
prefix: string,
|
10
10
|
name: string,
|
11
11
|
subcategory?: string,
|
12
|
-
defaultValue?: string
|
12
|
+
defaultValue?: string,
|
13
13
|
): string | undefined;
|
14
14
|
getCountyCodes(): string[];
|
15
15
|
getLabel(name: string, dflt: string): string;
|
@@ -55,10 +55,6 @@ declare class GlossaryEntry {
|
|
55
55
|
getTermName(): string;
|
56
56
|
}
|
57
57
|
|
58
|
-
declare class Images {
|
59
|
-
getTaxonImages(name: string): TaxonImage[];
|
60
|
-
}
|
61
|
-
|
62
58
|
declare class InatObsOptions {
|
63
59
|
coords?: [number, number];
|
64
60
|
project_id?: string;
|
@@ -72,7 +68,7 @@ declare class SiteGenerator {
|
|
72
68
|
writeTemplate(
|
73
69
|
content: string,
|
74
70
|
attributes: Record<string, string>,
|
75
|
-
filename: string
|
71
|
+
filename: string,
|
76
72
|
): void;
|
77
73
|
}
|
78
74
|
|
@@ -91,7 +87,7 @@ declare class Taxa {
|
|
91
87
|
|
92
88
|
declare class TaxaCol {
|
93
89
|
class?: string;
|
94
|
-
data:
|
90
|
+
data: (taxon: Taxon) => string;
|
95
91
|
title: string;
|
96
92
|
}
|
97
93
|
|
@@ -112,7 +108,7 @@ declare class Taxon {
|
|
112
108
|
getGenusName(): string;
|
113
109
|
getHTMLLink(
|
114
110
|
href: boolean | string | undefined,
|
115
|
-
includeRPI?: boolean
|
111
|
+
includeRPI?: boolean,
|
116
112
|
): string;
|
117
113
|
getINatID(): string;
|
118
114
|
getINatName(): string;
|
@@ -149,19 +145,16 @@ declare class TaxonData {
|
|
149
145
|
taxon_name: string;
|
150
146
|
}
|
151
147
|
|
152
|
-
|
153
|
-
getCaption(): string | undefined;
|
154
|
-
getSrc(): string;
|
155
|
-
}
|
156
|
-
|
157
|
-
type PhotoRights = "CC0"| "CC BY"| "CC BY-NC"| "C"|null;
|
148
|
+
type PhotoRights = "CC0" | "CC BY" | "CC BY-NC" | "C" | null;
|
158
149
|
|
159
150
|
declare class Photo {
|
160
151
|
url?: string;
|
161
152
|
rightsHolder: null | string;
|
162
153
|
rights?: PhotoRights;
|
163
|
-
|
164
|
-
|
154
|
+
getExt(): string;
|
155
|
+
getId(): number;
|
156
|
+
getUrl(): string;
|
157
|
+
getSourceUrl(): string;
|
165
158
|
}
|
166
159
|
|
167
160
|
declare class InatPhoto extends Photo {
|
@@ -169,7 +162,15 @@ declare class InatPhoto extends Photo {
|
|
169
162
|
ext: string;
|
170
163
|
}
|
171
164
|
|
172
|
-
type
|
165
|
+
type InatPhotoInfo = {
|
166
|
+
id: string;
|
167
|
+
ext: string;
|
168
|
+
licenseCode: string;
|
169
|
+
attrName: string | undefined;
|
170
|
+
};
|
171
|
+
|
172
|
+
type InatLicenseCode =
|
173
|
+
| "cc-by-nc-sa"
|
173
174
|
| "cc-by-nc"
|
174
175
|
| "cc-by-nc-nd"
|
175
176
|
| "cc-by"
|
@@ -193,8 +194,8 @@ declare class InatApiTaxon {
|
|
193
194
|
photo: {
|
194
195
|
id: number;
|
195
196
|
attribution: string;
|
196
|
-
license_code: InatLicenseCode
|
197
|
+
license_code: InatLicenseCode;
|
197
198
|
medium_url: string;
|
198
|
-
}
|
199
|
-
}[]
|
199
|
+
};
|
200
|
+
}[];
|
200
201
|
}
|
package/data/photos.csv
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
taxon_name,source,credit
|
2
|
-
Calochortus argillosus,https://inaturalist-open-data.s3.amazonaws.com/photos/210002711/original.jpg,"(c) skfork, some rights reserved (CC BY-NC)"
|
3
|
-
Calochortus luteus,https://inaturalist-open-data.s3.amazonaws.com/photos/257812293/original.jpg,"(c) eeneill, some rights reserved (CC BY-NC)"
|
4
|
-
Calochortus venustus,https://inaturalist-open-data.s3.amazonaws.com/photos/268338027/original.jpg,"(c) Gena Bentall, some rights reserved (CC BY-NC)"
|
5
|
-
Ceanothus cuneatus,https://inaturalist-open-data.s3.amazonaws.com/photos/266280254/original.jpg,"(c) Ixchel Gonzalez-Ramirez, some rights reserved (CC BY-NC)"
|
6
|
-
Claytonia gypsophiloides,https://inaturalist-open-data.s3.amazonaws.com/photos/268277390/original.jpeg,"(c) Christian Naventi, some rights reserved (CC BY-NC)"
|
7
|
-
Lithophragma heterophyllum,https://inaturalist-open-data.s3.amazonaws.com/photos/104408/medium.jpg,"(c) dloarie, some rights reserved (CC BY)"
|
8
|
-
Pseudotsuga menziesii var. menziesii,https://inaturalist-open-data.s3.amazonaws.com/photos/214823452/original.jpeg
|
9
|
-
Pseudotsuga menziesii var. menziesii,https://inaturalist-open-data.s3.amazonaws.com/photos/243900174/original.jpg,"(c) Alan Siegel, some rights reserved (CC BY-NC)"
|
package/lib/ebook/taxonimage.js
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
class TaxonImage {
|
2
|
-
#src;
|
3
|
-
#credit;
|
4
|
-
|
5
|
-
/**
|
6
|
-
* @param {string} src
|
7
|
-
* @param {string} credit
|
8
|
-
*/
|
9
|
-
constructor(src, credit) {
|
10
|
-
this.#src = src;
|
11
|
-
this.#credit = credit;
|
12
|
-
}
|
13
|
-
|
14
|
-
getCaption() {
|
15
|
-
return this.#credit ? this.#credit : undefined;
|
16
|
-
}
|
17
|
-
|
18
|
-
getSrc() {
|
19
|
-
return this.#src;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
|
-
export { TaxonImage };
|