@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,20 @@
|
|
1
|
+
on:
|
2
|
+
workflow_dispatch:
|
3
|
+
pull_request:
|
4
|
+
push:
|
5
|
+
|
6
|
+
permissions:
|
7
|
+
contents: read
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
check:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v4
|
14
|
+
- uses: actions/setup-node@v4
|
15
|
+
with:
|
16
|
+
node-version: latest
|
17
|
+
cache: "npm"
|
18
|
+
- run: npm update
|
19
|
+
- run: npx eslint
|
20
|
+
- run: npx tsc
|
package/.vscode/settings.json
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
The collection of petals and [sepals](./sepal.html) on a flower.
|
package/data/inattaxonphotos.csv
CHANGED
@@ -56,6 +56,8 @@ Acanthomintha lanceolata,37516943,jpg,cc-by,Ken-ichi Ueda
|
|
56
56
|
Acer campestre,304282317,jpg,cc-by-nc,Soumil
|
57
57
|
Acer campestre,21762680,jpeg,cc-by-nc,wolf3178
|
58
58
|
Acer campestre,10775,jpg,cc-by-nc,AnneTanne
|
59
|
+
Acer campestre,451583323,jpeg,cc-by-nc,Marek Koszorek
|
60
|
+
Acer campestre,451583345,jpeg,cc-by-nc,Marek Koszorek
|
59
61
|
Acer macrophyllum,105744044,jpeg,cc-by-nc,Olivia Tittaferrante
|
60
62
|
Acer macrophyllum,34737887,jpeg,cc-by-nc,Rene Burk
|
61
63
|
Acer macrophyllum,30451227,jpeg,cc-by-nc,Barbara L. Wilson
|
@@ -76,6 +78,9 @@ Achyrachaena mollis,120782896,jpg,cc-by-nc,Sandy Bernhard
|
|
76
78
|
Achyrachaena mollis,37638783,jpg,cc-by,Sula Vanderplank
|
77
79
|
Achyrachaena mollis,3276295,JPG,cc-by-nc,James Bailey
|
78
80
|
Achyrachaena mollis,36450224,jpg,cc-by,Mary K. Hanson
|
81
|
+
Acmispon americanus var. americanus,137953721,jpg,cc-by-nc,Charlie Russell
|
82
|
+
Acmispon americanus var. americanus,309771490,jpg,cc-by-nc,Dan Antonaccio
|
83
|
+
Acmispon americanus var. americanus,135171065,jpeg,cc-by-nc,Morgan Stickrod
|
79
84
|
Acmispon brachycarpus,70511717,jpg,cc-by-nc,Gustavo Vasquez
|
80
85
|
Acmispon brachycarpus,126604380,jpg,cc-by,Ken-ichi Ueda
|
81
86
|
Acmispon brachycarpus,7807378,jpg,cc-by-nc,Cat Chang
|
@@ -213,6 +218,7 @@ Allium peninsulare var. peninsulare,1741008,JPG,cc-by-nc,James Bailey
|
|
213
218
|
Allium serra,7382660,jpg,cc-by-nc,Cat Chang
|
214
219
|
Allium serra,797131,jpg,cc-by-nc,J. Maughn
|
215
220
|
Allium serra,1717488,jpg,cc-by-nc,Liam O'Brien
|
221
|
+
Allium sharsmithiae,64788581,jpeg,cc-by-nc,Morgan Stickrod
|
216
222
|
Allium unifolium,38202930,jpg,cc-by-nc,bugg
|
217
223
|
Allium unifolium,36594374,jpg,cc-by-nc,wyattherp
|
218
224
|
Allophyllum divaricatum,848078,jpg,cc-by,Ken-ichi Ueda
|
@@ -371,6 +377,11 @@ Antirrhinum majus,34886142,jpeg,cc-by-nc,Marcel Hospers
|
|
371
377
|
Antirrhinum thompsonii,41440,jpg,cc-by,Ken-ichi Ueda
|
372
378
|
Antirrhinum thompsonii,41384,jpg,cc-by,marlin harms
|
373
379
|
Antirrhinum thompsonii,75285845,jpg,cc-by-nc,jtomala
|
380
|
+
Aphanes occidentalis,272953944,jpg,cc-by-nc,madge
|
381
|
+
Aphanes occidentalis,265353003,jpg,cc-by-nc,madge
|
382
|
+
Aphanes occidentalis,178663495,jpeg,cc-by-nc,Shane Hanofee
|
383
|
+
Aphanes occidentalis,275727400,jpeg,cc-by-nc,Peter Zika
|
384
|
+
Aphanes occidentalis,178663476,jpeg,cc-by-nc,Shane Hanofee
|
374
385
|
Aphyllon californicum subsp. jepsonii,2274004,jpg,cc-by,Calibas
|
375
386
|
Aphyllon epigalium subsp. epigalium,15224,jpg,cc-by,Ken-ichi Ueda
|
376
387
|
Aphyllon epigalium subsp. epigalium,15225,jpg,cc-by,Ken-ichi Ueda
|
@@ -717,7 +728,11 @@ Bidens laevis,73368057,jpg,cc-by-nc,A Clarke
|
|
717
728
|
Bidens laevis,2587585,jpg,cc-by,Michael D Fox
|
718
729
|
Bidens laevis,512698,jpg,cc-by-nc,Matthew Herron
|
719
730
|
Blepharizonia laxa,10507539,jpeg,cc-by,Ken-ichi Ueda
|
731
|
+
Blepharizonia laxa,94791085,jpeg,cc0,Alex Heyman
|
732
|
+
Blepharizonia laxa,98116007,jpg,cc-by-nc,Chloe Novak
|
733
|
+
Blepharizonia laxa,10515436,jpg,cc-by,Ken-ichi Ueda
|
720
734
|
Blepharizonia plumosa,89389742,jpg,cc-by-nc,Chloe Novak
|
735
|
+
Blepharizonia plumosa,89389624,jpg,cc-by-nc,Chloe Novak
|
721
736
|
Boechera breweri subsp. breweri,854971,jpg,cc-by-nc,Robert
|
722
737
|
Bolboschoenus fluviatilis,5421230,jpg,cc-by-nc,sarahaj
|
723
738
|
Bolboschoenus maritimus subsp. paludosus,132800260,jpeg,cc-by-nc,Peter Zika
|
@@ -904,6 +919,7 @@ Calochortus umbellatus,3061,jpg,cc-by,Ken-ichi Ueda
|
|
904
919
|
Calochortus umbellatus,26898,jpg,cc-by,Tom Hilton
|
905
920
|
Calochortus umbellatus,26897,jpg,cc-by,Tom Hilton
|
906
921
|
Calochortus umbellatus,270671042,jpeg,cc-by-nc,Valentina L.
|
922
|
+
Calochortus umbellatus,392254006,jpeg,cc-by-nc,Sue Lindner
|
907
923
|
Calochortus venustus,129369125,jpeg,cc-by-nc,Denise Wight
|
908
924
|
Calochortus venustus,91765,jpg,cc-by,Zack Abbey
|
909
925
|
Calochortus venustus,206217015,jpg,cc-by-nc,Dan Fitzgerald (Fitz)
|
@@ -1473,6 +1489,8 @@ Corethrogyne filaginifolia,23537046,jpeg,cc-by-nc,Asa Spade
|
|
1473
1489
|
Corethrogyne filaginifolia,56579,jpg,cc-by,Jerry Kirkhart
|
1474
1490
|
Cornus glabrata,38925157,jpeg,cc-by-nc,Rob Irwin
|
1475
1491
|
Cornus glabrata,38925165,jpeg,cc-by-nc,Rob Irwin
|
1492
|
+
Cornus glabrata,74189069,jpg,cc-by-nc,Tim Messick
|
1493
|
+
Cornus glabrata,70648152,jpg,cc-by-nc,Rob Irwin
|
1476
1494
|
Cornus sericea subsp. occidentalis,89793568,jpeg,cc-by-nc,Greg Froelich
|
1477
1495
|
Cornus sericea subsp. occidentalis,89793590,jpeg,cc-by-nc,Greg Froelich
|
1478
1496
|
Cornus sericea subsp. sericea,89010941,jpeg,cc-by-nc,Morgan Stickrod
|
@@ -1986,7 +2004,6 @@ Elodea canadensis,14784467,jpeg,cc-by-nc,Sean Blaney
|
|
1986
2004
|
Elodea canadensis,5316445,jpg,cc-by,Radio Tonreg
|
1987
2005
|
Elodea canadensis,45053113,jpg,cc-by,Justin
|
1988
2006
|
Elodea canadensis,57234967,jpeg,cc-by-nc,eugenezakharov
|
1989
|
-
Elymus ×gouldii,128311999,jpg,cc-by-nc,jrebman
|
1990
2007
|
Elymus caput-medusae,24101478,jpeg,cc-by-nc,Rob Irwin
|
1991
2008
|
Elymus caput-medusae,13162675,jpg,cc-by-nc,Jennifer Rycenga
|
1992
2009
|
Elymus glaucus subsp. virescens,3807104,JPG,cc-by-nc,emwest
|
@@ -2002,6 +2019,7 @@ Elymus ponticus,4122272,jpg,cc-by-nc,Kathleen Sayce
|
|
2002
2019
|
Elymus ponticus,106811004,jpg,cc-by,Jared Shorma
|
2003
2020
|
Elymus ponticus,83692446,jpg,cc-by-nc,Ulysses M
|
2004
2021
|
Elymus ponticus,83253203,jpeg,cc-by-nc,Phyllis Holst
|
2022
|
+
Elymus stebbinsii,449433127,jpeg,cc-by-nc,Matt Reala
|
2005
2023
|
Elymus trachycaulus subsp. trachycaulus,146511572,jpg,cc-by-nc,TeMarChi
|
2006
2024
|
Elymus trachycaulus subsp. trachycaulus,114083182,jpeg,cc-by-nc,John Koenig
|
2007
2025
|
Elymus trachycaulus subsp. trachycaulus,163912630,jpg,cc-by,Eric Lamb
|
@@ -2009,6 +2027,7 @@ Elymus triticoides,389174390,jpg,cc-by-nc,Paul Barnett
|
|
2009
2027
|
Elymus triticoides,13913918,jpg,cc-by,Jim Morefield
|
2010
2028
|
Elymus triticoides,26984620,jpg,cc-by-nc,2008 Zoya Akulova
|
2011
2029
|
Elymus triticoides,26984619,jpg,cc-by-nc,2010 Zoya Akulova
|
2030
|
+
Elymus ×gouldii,128311999,jpg,cc-by-nc,jrebman
|
2012
2031
|
Emmenanthe penduliflora,34464275,jpg,cc-by-nc,Timothy Eric Robinson
|
2013
2032
|
Emmenanthe penduliflora,263226896,jpg,cc-by-nc,nathantay
|
2014
2033
|
Emmenanthe penduliflora,263226911,jpg,cc-by-nc,nathantay
|
@@ -2031,6 +2050,8 @@ Epilobium brachycarpum,23989929,jpg,cc-by-nc,Cat Chang
|
|
2031
2050
|
Epilobium brachycarpum,4239069,jpg,cc-by,Andrey Zharkikh
|
2032
2051
|
Epilobium brachycarpum,4239070,jpg,cc-by,Andrey Zharkikh
|
2033
2052
|
Epilobium campestre,7627757,jpeg,cc-by-nc,James Bailey
|
2053
|
+
Epilobium campestre,79205774,jpg,cc-by-nc,Christian Schwarz
|
2054
|
+
Epilobium campestre,80750322,jpeg,cc-by-nc,frankiecoburn
|
2034
2055
|
Epilobium canum subsp. canum,43958421,jpeg,cc-by-nc,Ron Vanderhoff
|
2035
2056
|
Epilobium canum subsp. canum,158630917,jpeg,cc-by-nc,mhrains
|
2036
2057
|
Epilobium canum subsp. canum,80364468,jpeg,cc-by,Millie Basden
|
@@ -2091,8 +2112,14 @@ Eragrostis hypnoides,164046029,jpg,cc-by-nc,Pat Deacon
|
|
2091
2112
|
Eragrostis hypnoides,164045951,jpg,cc-by-nc,Pat Deacon
|
2092
2113
|
Eragrostis mexicana subsp. virescens,4248627,jpg,cc-by-nc,Steve Jones
|
2093
2114
|
Eragrostis mexicana subsp. virescens,4248602,jpg,cc-by-nc,Steve Jones
|
2115
|
+
Eragrostis mexicana subsp. virescens,421992570,jpeg,cc-by-nc,Věra Kafková
|
2116
|
+
Eragrostis mexicana subsp. virescens,421992786,jpeg,cc-by-nc,Věra Kafková
|
2094
2117
|
Eragrostis pectinacea var. pectinacea,10331618,jpg,cc-by-nc,Pat Deacon
|
2095
2118
|
Eremalche exilis,6527589,jpg,cc-by,W. Terry Hunefeld
|
2119
|
+
Eremalche exilis,350833945,jpg,cc-by-nc,nathantay
|
2120
|
+
Eremalche exilis,362953560,jpeg,cc-by-nc,Rachel Woodard
|
2121
|
+
Eremalche exilis,360231454,jpg,cc-by-nc,D Roy
|
2122
|
+
Eremalche exilis,358557932,jpg,cc-by-nc,James Bardo
|
2096
2123
|
Eriastrum abramsii,1979365,JPG,cc-by-nc,kevinhintsa
|
2097
2124
|
Eriastrum abramsii,859835,jpg,cc0,
|
2098
2125
|
Eriastrum abramsii,859836,jpg,cc0,
|
@@ -2436,6 +2463,7 @@ Extriplex joaquinana,189169450,jpg,cc-by-nc,Dylan Winkler
|
|
2436
2463
|
Extriplex joaquinana,122136102,jpg,cc-by,Chloe and Trevor Van Loon
|
2437
2464
|
Extriplex joaquinana,189169955,jpg,cc-by-nc,Dylan Winkler
|
2438
2465
|
Fallopia japonica,158604528,jpg,cc-by-nc,Lara Maynard
|
2466
|
+
Fallopia japonica,160080625,jpg,cc-by-nc,空猫 T. N
|
2439
2467
|
Festuca arundinacea,29121494,jpeg,cc-by-nc,James Bailey
|
2440
2468
|
Festuca arundinacea,308793068,jpeg,cc-by-nc,Věra Kafková
|
2441
2469
|
Festuca arundinacea,106530308,jpg,cc-by-nc,Alexey P. Seregin
|
@@ -2718,6 +2746,8 @@ Hedypnois rhagadioloides,122232888,jpg,cc-by-nc,Богданович Светл
|
|
2718
2746
|
Hedypnois rhagadioloides,34900325,jpg,cc-by-nc,Sarah
|
2719
2747
|
Hedypnois rhagadioloides,3210726,JPG,cc-by-nc,James Bailey
|
2720
2748
|
Helenium bigelovii,47216819,jpg,cc-by-nc,Aaron Echols
|
2749
|
+
Helenium bigelovii,316292622,jpeg,cc-by-nc,Howard W Erbe
|
2750
|
+
Helenium bigelovii,141300006,jpeg,cc-by-nc,Ethan
|
2721
2751
|
Helenium puberulum,404884351,jpg,cc-by-nc,nathantay
|
2722
2752
|
Helenium puberulum,404884500,jpg,cc-by-nc,nathantay
|
2723
2753
|
Helenium puberulum,4037319,JPG,cc-by-nc,Chris Evers
|
@@ -3144,6 +3174,7 @@ Lathyrus jepsonii var. californicus,70821184,jpg,cc-by-nc,Rob Irwin
|
|
3144
3174
|
Lathyrus latifolius,41528872,jpg,cc-by-nc,Andreas Rockstein
|
3145
3175
|
Lathyrus latifolius,43406461,jpeg,cc-by-nc,mobbini
|
3146
3176
|
Lathyrus latifolius,98792094,jpg,cc-by-nc,esdena
|
3177
|
+
Lathyrus latifolius,290743350,jpeg,cc-by,Gavin Slater
|
3147
3178
|
Lathyrus vestitus var. vestitus,20085,jpg,cc-by,Tom Hilton
|
3148
3179
|
Lathyrus vestitus var. vestitus,62792953,jpeg,cc-by-nc,shrike2
|
3149
3180
|
Lathyrus vestitus var. vestitus,18307531,jpg,cc-by-nc,shrike2
|
@@ -3664,9 +3695,6 @@ Melilotus indicus,66820236,jpg,cc-by-nc,Alan King
|
|
3664
3695
|
Melissa officinalis,82807082,jpg,cc-by-nc,Steve Kelley
|
3665
3696
|
Melissa officinalis,115806500,jpeg,cc-by,Eleftherios Katsillis
|
3666
3697
|
Melissa officinalis,122530581,jpeg,cc-by-nc,nico2007
|
3667
|
-
Mentha ×gracilis,31529239,jpg,cc-by-nc,Aleksandr Ebel
|
3668
|
-
Mentha ×piperita,4677970,jpeg,cc-by-nc,Chevaun
|
3669
|
-
Mentha ×piperita,947761,jpg,cc-by-nc,Hidetsugu Tonomura
|
3670
3698
|
Mentha aquatica,437878448,jpg,cc-by-nc,mobbini
|
3671
3699
|
Mentha aquatica,315881232,jpg,cc-by-nc,Иван Матершев
|
3672
3700
|
Mentha aquatica,58267279,jpg,cc-by-nc,A Emmerson
|
@@ -3692,6 +3720,9 @@ Mentha spicata,85965702,jpg,cc0,
|
|
3692
3720
|
Mentha spicata,1186003,jpg,cc-by,Jon Sullivan
|
3693
3721
|
Mentha spicata,47507014,jpg,cc-by-nc,Chloe and Trevor Van Loon
|
3694
3722
|
Mentha suaveolens,28457953,jpeg,cc-by,Duarte Frade
|
3723
|
+
Mentha ×gracilis,31529239,jpg,cc-by-nc,Aleksandr Ebel
|
3724
|
+
Mentha ×piperita,4677970,jpeg,cc-by-nc,Chevaun
|
3725
|
+
Mentha ×piperita,947761,jpg,cc-by-nc,Hidetsugu Tonomura
|
3695
3726
|
Mentzelia laevicaulis var. laevicaulis,12966945,jpg,cc-by-nc,mhays
|
3696
3727
|
Mentzelia lindleyi,1024864,jpg,cc-by-nc,Amelia Ryan
|
3697
3728
|
Mentzelia lindleyi,119069149,jpg,cc-by,Dee Shea Himes
|
@@ -3885,6 +3916,11 @@ Navarretia squarrosa,79748116,jpg,cc-by-nc,Alan Siegel
|
|
3885
3916
|
Navarretia viscidula,944084,jpg,cc0,
|
3886
3917
|
Navarretia viscidula,41343887,jpg,cc-by-nc,Neil O. Frakes
|
3887
3918
|
Navarretia viscidula,944083,jpg,cc0,
|
3919
|
+
Nemacladus capillaris,79260550,jpg,cc-by-nc,Damon Tighe
|
3920
|
+
Nemacladus capillaris,79260558,jpg,cc-by-nc,Damon Tighe
|
3921
|
+
Nemacladus capillaris,79260568,jpg,cc-by-nc,Damon Tighe
|
3922
|
+
Nemacladus capillaris,1026228,jpg,cc-by-nc,2013 Scot Loring
|
3923
|
+
Nemacladus capillaris,1026229,jpg,cc-by-nc,2013 Scot Loring
|
3888
3924
|
Nemophila heterophylla,6852120,jpg,cc-by-nc,Michael A. Voeltz
|
3889
3925
|
Nemophila heterophylla,14110056,jpeg,cc-by-nc,Rob Irwin
|
3890
3926
|
Nemophila heterophylla,105517,jpg,cc-by,dloarie
|
@@ -3907,6 +3943,8 @@ Nicotiana acuminata var. multiflora,328298852,jpg,cc-by-nc,Dan Antonaccio
|
|
3907
3943
|
Nicotiana attenuata,21912630,jpg,cc-by-nc,Cat Chang
|
3908
3944
|
Nicotiana attenuata,21937008,jpg,cc-by-nc,Liam O'Brien
|
3909
3945
|
Nicotiana attenuata,21912646,jpg,cc-by-nc,Cat Chang
|
3946
|
+
Nicotiana attenuata,163826554,jpg,cc-by,Steve Matson
|
3947
|
+
Nicotiana attenuata,163826744,jpg,cc-by,Steve Matson
|
3910
3948
|
Nicotiana glauca,26703,jpg,cc-by,Scott Zona
|
3911
3949
|
Nicotiana glauca,343854850,jpg,cc-by,Connor Margetts
|
3912
3950
|
Nicotiana glauca,343854730,jpg,cc-by,Connor Margetts
|
@@ -4467,9 +4505,16 @@ Polypogon viridis,11486827,jpeg,cc-by-nc,Tim Quinn
|
|
4467
4505
|
Polypogon viridis,129503350,jpeg,cc-by-nc,Ron Vanderhoff
|
4468
4506
|
Polypogon viridis,55763555,jpeg,cc-by-nc,lern
|
4469
4507
|
Polypogon viridis,71977150,jpeg,cc-by,Daniel Cahen
|
4508
|
+
Polystichum californicum,425119886,jpg,cc-by,Timothy McNitt
|
4509
|
+
Polystichum californicum,183073570,jpeg,cc-by-nc,Steve Ansell
|
4510
|
+
Polystichum californicum,449265176,jpeg,cc-by-nc,ehappy
|
4470
4511
|
Polystichum imbricans subsp. imbricans,882385,jpg,cc-by,benet2006
|
4471
4512
|
Polystichum imbricans subsp. imbricans,9885744,jpg,cc-by-nc,Todd Ramsden
|
4472
4513
|
Polystichum munitum,879724,jpg,cc-by-nc,kqedquest
|
4514
|
+
Polystichum munitum,412744739,jpeg,cc-by-nc,mme_renn
|
4515
|
+
Polystichum munitum,382846807,jpg,cc-by-nc,myosoto
|
4516
|
+
Polystichum munitum,338428197,jpg,cc-by-nc,tuesdaytumbleweed
|
4517
|
+
Polystichum munitum,219027536,jpeg,cc0,Quentin Groom
|
4473
4518
|
Populus trichocarpa,440702,png,cc-by-nc,Thayne Tuason
|
4474
4519
|
Populus trichocarpa,177932421,jpg,cc-by-nc,myrrhtle
|
4475
4520
|
Populus trichocarpa,8057333,jpg,cc-by-nc,Ashley Connors
|
@@ -4694,6 +4739,7 @@ Quercus douglasii,244111877,jpeg,cc-by-nc,kevinhintsa
|
|
4694
4739
|
Quercus douglasii,188209585,jpeg,cc-by-nc,Mart Hughes
|
4695
4740
|
Quercus douglasii,3195952,jpeg,cc-by-nc,Alex Jones
|
4696
4741
|
Quercus douglasii,1701488,jpg,cc-by,Ken-ichi Ueda
|
4742
|
+
Quercus douglasii,398060264,jpeg,cc-by-nc,Marisol Villarreal
|
4697
4743
|
Quercus durata var. durata,6441485,jpg,cc-by-nc,Ken-ichi Ueda
|
4698
4744
|
Quercus durata var. durata,22846295,jpg,cc-by-nc,Ken-ichi Ueda
|
4699
4745
|
Quercus durata var. durata,2378132,jpg,cc0,rockybajada
|
@@ -4806,6 +4852,7 @@ Rhinotropis californica,121640,jpg,cc-by,Don Loarie
|
|
4806
4852
|
Rhus aromatica,3578615,jpg,cc-by-nc,Chuck Sexton
|
4807
4853
|
Rhus aromatica,168104108,jpeg,cc-by-nc,Jesús Niño C.
|
4808
4854
|
Rhus aromatica,14541423,jpg,cc-by,Matt Berger
|
4855
|
+
Rhus aromatica,310253516,jpg,cc-by,Catherine C. Galley
|
4809
4856
|
Ribes amarum,79956311,jpg,cc-by-nc,Stephanie Calloway
|
4810
4857
|
Ribes amarum,250145643,jpg,cc-by-nc,bradleytsalyuk
|
4811
4858
|
Ribes californicum var. californicum,10908,jpg,cc-by,Ken-ichi Ueda
|
@@ -4944,12 +4991,19 @@ Ruppia maritima,41269117,jpeg,cc-by-nc,James Coquat
|
|
4944
4991
|
Ruppia maritima,9025147,png,cc-by-nc,jiayizhou-zoe
|
4945
4992
|
Rytidosperma caespitosum,415436,jpg,cc-by,Harry Rose
|
4946
4993
|
Rytidosperma caespitosum,415437,jpg,cc-by,Harry Rose
|
4994
|
+
Rytidosperma caespitosum,95674316,jpg,cc-by,Kym Nicolson
|
4995
|
+
Rytidosperma caespitosum,95674356,jpg,cc-by,Kym Nicolson
|
4996
|
+
Rytidosperma caespitosum,163217365,jpg,cc-by,Ben Fisher
|
4947
4997
|
Rytidosperma penicillatum,322700849,jpeg,cc-by,Kevin Faccenda
|
4948
4998
|
Rytidosperma penicillatum,322700890,jpeg,cc-by,Kevin Faccenda
|
4949
4999
|
Rytidosperma penicillatum,322700790,jpeg,cc-by,Kevin Faccenda
|
4950
5000
|
Rytidosperma penicillatum,322700724,jpeg,cc-by,Kevin Faccenda
|
4951
5001
|
Rytidosperma penicillatum,4439174,jpg,cc-by-nc,Raphaela E. Floreani Buzbee
|
4952
5002
|
Rytidosperma racemosum,68345797,jpg,cc-by-nc,Margaret Alcorn
|
5003
|
+
Rytidosperma racemosum,17831219,jpg,cc-by-nc,reinderw
|
5004
|
+
Rytidosperma racemosum,108375616,jpg,cc-by-nc,reinderw
|
5005
|
+
Rytidosperma racemosum,339325287,jpeg,cc-by-nc,Kurtis
|
5006
|
+
Rytidosperma racemosum,360394861,jpg,cc-by,Petra Holland
|
4953
5007
|
Sabulina douglasii,14107428,jpg,cc-by-nc,mhays
|
4954
5008
|
Sabulina douglasii,1737562,jpg,cc-by,Ken-ichi Ueda
|
4955
5009
|
Sabulina douglasii,1561728,JPG,cc-by-nc,kevinhintsa
|
@@ -4973,6 +5027,10 @@ Sagittaria latifolia,89848802,jpg,cc-by-nc,Susan Elliott
|
|
4973
5027
|
Sagittaria latifolia,92971300,jpg,cc-by-nc,roy pilcher
|
4974
5028
|
Sagittaria latifolia,10083800,jpg,cc-by-nc,Ian Bryson
|
4975
5029
|
Sagittaria latifolia,4391482,jpg,cc-by-nc,Liana May
|
5030
|
+
Sagittaria montevidensis subsp. calycina,23908573,jpeg,cc-by-nc,Nathan Taylor
|
5031
|
+
Sagittaria montevidensis subsp. calycina,23776957,jpeg,cc-by-nc,Joseph D Kurtz
|
5032
|
+
Sagittaria montevidensis subsp. calycina,53648830,jpeg,cc-by-nc,jim_keesling
|
5033
|
+
Sagittaria montevidensis subsp. calycina,225270837,jpeg,cc-by-nc,pine-wood
|
4976
5034
|
Salicornia depressa,23010186,jpg,cc-by-nc,Norman Welsh
|
4977
5035
|
Salicornia depressa,135973750,jpg,cc-by-nc,Chase Mathey
|
4978
5036
|
Salicornia pacifica,161785604,jpg,cc-by-nc,Dani Montijo
|
@@ -5467,6 +5525,10 @@ Stellaria pallida,66236079,jpeg,cc-by-nc,Václav Dvořák
|
|
5467
5525
|
Stellaria pallida,173854425,jpg,cc-by-nc,Valerio Lazzeri
|
5468
5526
|
Stenotaphrum secundatum,66591991,jpeg,cc-by-nc,mattward
|
5469
5527
|
Stenotaphrum secundatum,126466342,jpg,cc-by-nc,Jamee Moulton
|
5528
|
+
Stephanomeria elata,4287353,jpeg,cc-by,Don Loarie
|
5529
|
+
Stephanomeria elata,421569534,jpeg,cc-by-nc,Fred Watson
|
5530
|
+
Stephanomeria elata,421706175,jpeg,cc-by-nc,Fred Watson
|
5531
|
+
Stephanomeria elata,141166677,jpg,cc0,Irene
|
5470
5532
|
Stephanomeria exigua subsp. coronaria,18547528,jpg,cc-by,Jim Morefield
|
5471
5533
|
Stephanomeria exigua subsp. coronaria,14048144,jpg,cc-by,Jim Morefield
|
5472
5534
|
Stephanomeria virgata subsp. pleurocarpa,17618,jpg,cc-by,Ken-ichi Ueda
|
@@ -5640,6 +5702,8 @@ Toxicoscordion paniculatum,18853230,jpg,cc-by-nc,Frank Fogarty
|
|
5640
5702
|
Toxicoscordion paniculatum,39029901,jpg,cc-by-nc,Rick Williams
|
5641
5703
|
Toxicoscordion paniculatum,4181166,jpg,cc-by-nc,2008 Gary A. Monroe
|
5642
5704
|
Toxicoscordion paniculatum,39489863,jpg,cc-by,Andrey Zharkikh
|
5705
|
+
Toxicoscordion venenosum var. venenosum,286053222,jpg,cc-by-nc,Eric Koberle
|
5706
|
+
Toxicoscordion venenosum var. venenosum,76985646,jpg,cc-by-nc,emily_jeanne
|
5643
5707
|
Tradescantia fluminensis,247170901,jpeg,cc-by-nc,Johnson Chen
|
5644
5708
|
Tradescantia fluminensis,96861636,jpeg,cc-by-nc,Lucía Rodríguez-Tricot
|
5645
5709
|
Tradescantia fluminensis,46110772,jpeg,cc-by-nc,金翼白眉
|
package/data/taxa.csv
CHANGED
@@ -1255,6 +1255,8 @@ Navarretia pubescens,downy pincushion,N,34471,5804,58976
|
|
1255
1255
|
Navarretia squarrosa,skunkweed,N,34475,5807,53157
|
1256
1256
|
Navarretia tagetina,,N,34477,5809,60226
|
1257
1257
|
Navarretia viscidula,sticky navarretia,N,34478,5810,78195
|
1258
|
+
Nemacladus capillaris,common threadplant,N,34503,5815,78199,annual,white,5,7
|
1259
|
+
Nemacladus montanus,mountain threadplant,N,34508,5824,78203,annual,white,5,7
|
1258
1260
|
Nemophila heterophylla,,N,34539,5834,53158,,white,2,6
|
1259
1261
|
Nemophila menziesii var. atomaria,,N,62279,5837,50647,,white,2,6
|
1260
1262
|
Nemophila menziesii var. menziesii,baby blue-eyes,N,62285,5839,50650
|
@@ -1771,9 +1773,9 @@ Torilis arvensis,tall sock-destroyer,X,46743,8004,56846
|
|
1771
1773
|
Torilis nodosa,short sock-destroyer,X,46747,8007,53304
|
1772
1774
|
Torreyochloa pallida var. pauciflora,,N,67197,8010,81431
|
1773
1775
|
Toxicodendron diversilobum,poison-oak,N,46791,8015,51080,,white
|
1774
|
-
Toxicoscordion fremontii,zigadene,N,89163,11103,49649
|
1775
|
-
Toxicoscordion paniculatum,,N,46802,11105,79380
|
1776
|
-
Toxicoscordion venenosum var. venenosum,death-camas,N,93851,11106,81432
|
1776
|
+
Toxicoscordion fremontii,zigadene,N,89163,11103,49649,bulb,white,2,6
|
1777
|
+
Toxicoscordion paniculatum,,N,46802,11105,79380,bulb,white,5,6
|
1778
|
+
Toxicoscordion venenosum var. venenosum,death-camas,N,93851,11106,81432,bulb,white,5,7
|
1777
1779
|
Tradescantia fluminensis,,X,77137,8017,79382
|
1778
1780
|
Tragopogon porrifolius,salsify,X,5449,8020,54141
|
1779
1781
|
Trianthema portulacastrum,,N,46920,8023,79390
|
@@ -0,0 +1 @@
|
|
1
|
+
Leaves 8-30 mm wide. [Perianth](./perianth.html) parts 5-15 mm long.
|
@@ -0,0 +1 @@
|
|
1
|
+
Leaves 6-16 mm wide. [Perianth](./perianth.html) parts 2-6 mm long. Perianth parts unequal, outer parts generally without claws, inner parts with claws. Stamens at least as long as perianth parts.
|
@@ -0,0 +1 @@
|
|
1
|
+
Leaves 4-10 mm wide. [Perianth](./perianth.html) parts 4-6 mm long. Stamens at least as long as perianth parts.
|
package/ebook/css/main.css
CHANGED
@@ -12,6 +12,14 @@ div.section {
|
|
12
12
|
margin-bottom: .5rem;
|
13
13
|
}
|
14
14
|
|
15
|
+
div.photos {
|
16
|
+
display: flex;
|
17
|
+
}
|
18
|
+
|
19
|
+
figure {
|
20
|
+
margin: auto;
|
21
|
+
}
|
22
|
+
|
15
23
|
img.flr-color {
|
16
24
|
padding-right: .25rem;
|
17
25
|
width: 1rem;
|
@@ -29,4 +37,4 @@ span.lcs {
|
|
29
37
|
/* Glossary */
|
30
38
|
div.glossary img {
|
31
39
|
max-height: 300px;
|
32
|
-
}
|
40
|
+
}
|
package/eslint.config.mjs
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
+
import globals from "globals";
|
2
|
+
import pluginJs from "@eslint/js";
|
3
|
+
|
4
|
+
/** @type {import('eslint').Linter.Config[]} */
|
1
5
|
export default [
|
6
|
+
{ files: ["**/*.{js,mjs,cjs}"], ignores: ["output/**"] },
|
2
7
|
{
|
3
|
-
|
4
|
-
|
5
|
-
SwitchCase: 1,
|
6
|
-
}],
|
7
|
-
|
8
|
-
"linebreak-style": ["error", "unix"],
|
9
|
-
quotes: ["error", "double"],
|
10
|
-
semi: ["error", "always"],
|
8
|
+
languageOptions: {
|
9
|
+
globals: { ...globals.browser, ...globals.node, bootstrap: false },
|
11
10
|
},
|
12
|
-
}
|
11
|
+
},
|
12
|
+
pluginJs.configs.recommended,
|
13
13
|
];
|
package/lib/csv.js
CHANGED
@@ -3,6 +3,7 @@ import path from "node:path";
|
|
3
3
|
import { finished } from "stream/promises";
|
4
4
|
import { parse as parseSync } from "csv-parse/sync";
|
5
5
|
import { parse } from "csv-parse";
|
6
|
+
import { stringify } from "csv-stringify/sync";
|
6
7
|
|
7
8
|
class CSV {
|
8
9
|
/**
|
@@ -57,12 +58,10 @@ class CSV {
|
|
57
58
|
* @param {string} fileName
|
58
59
|
* @param {boolean|import("csv-parse").ColumnOption[]|function (string[]):string[]} [columns]
|
59
60
|
* @param {string} [delimiter]
|
61
|
+
* @deprecated use readFile
|
60
62
|
*/
|
61
63
|
static parseFile(dir, fileName, columns = true, delimiter) {
|
62
|
-
|
63
|
-
|
64
|
-
const options = this.#getOptions(fileName, columns, delimiter);
|
65
|
-
return parseSync(content, options);
|
64
|
+
return this.readFile(dir + "/" + fileName, columns, delimiter);
|
66
65
|
}
|
67
66
|
|
68
67
|
/**
|
@@ -77,7 +76,7 @@ class CSV {
|
|
77
76
|
fileName,
|
78
77
|
columns = true,
|
79
78
|
delimiter,
|
80
|
-
callback
|
79
|
+
callback,
|
81
80
|
) {
|
82
81
|
const options = this.#getOptions(fileName, columns, delimiter);
|
83
82
|
const processFile = async () => {
|
@@ -98,6 +97,29 @@ class CSV {
|
|
98
97
|
// Parse the CSV content
|
99
98
|
await processFile();
|
100
99
|
}
|
100
|
+
|
101
|
+
/**
|
102
|
+
* @param {string} fileName
|
103
|
+
* @param {boolean|import("csv-parse").ColumnOption[]|function (string[]):string[]} [columns]
|
104
|
+
* @param {string} [delimiter]
|
105
|
+
*/
|
106
|
+
static readFile(fileName, columns = true, delimiter) {
|
107
|
+
const content = fs.readFileSync(fileName);
|
108
|
+
const options = this.#getOptions(fileName, columns, delimiter);
|
109
|
+
return parseSync(content, options);
|
110
|
+
}
|
111
|
+
|
112
|
+
/**
|
113
|
+
*
|
114
|
+
* @param {string} fileName
|
115
|
+
* @param {string[][]} data
|
116
|
+
* @param {string[]} [headerData]
|
117
|
+
*/
|
118
|
+
static writeFile(fileName, data, headerData) {
|
119
|
+
const header = headerData ? stringify([headerData]) : "";
|
120
|
+
const content = header + stringify(data);
|
121
|
+
fs.writeFileSync(fileName, content);
|
122
|
+
}
|
101
123
|
}
|
102
124
|
|
103
125
|
export { CSV };
|
package/lib/ebook/images.js
CHANGED
@@ -1,20 +1,15 @@
|
|
1
1
|
import * as fs from "node:fs";
|
2
|
-
import path from "node:path";
|
3
2
|
|
4
3
|
import sharp from "sharp";
|
5
4
|
|
6
5
|
import { EBook } from "./ebook.js";
|
7
|
-
import { Config } from "../config.js";
|
8
|
-
import { CSV } from "../csv.js";
|
9
6
|
import { Files } from "../files.js";
|
10
|
-
import {
|
7
|
+
import { ProgressMeter } from "../progressmeter.js";
|
11
8
|
|
12
9
|
class Images {
|
13
10
|
#siteGenerator;
|
14
11
|
#contentDir;
|
15
12
|
#taxa;
|
16
|
-
/** @type {Object<string,TaxonImage[]>} */
|
17
|
-
#images = {};
|
18
13
|
|
19
14
|
/**
|
20
15
|
* @param {SiteGenerator} siteGenerator
|
@@ -27,53 +22,63 @@ class Images {
|
|
27
22
|
this.#taxa = taxa;
|
28
23
|
}
|
29
24
|
|
30
|
-
|
25
|
+
/**
|
26
|
+
* @param {Taxon[]} taxa
|
27
|
+
*/
|
28
|
+
async createImages(taxa) {
|
29
|
+
const meter = new ProgressMeter("processing photos", taxa.length);
|
30
|
+
|
31
|
+
const width = 300;
|
32
|
+
const quality = 40;
|
33
|
+
|
31
34
|
const photoDirSrc = "external_data/photos";
|
32
|
-
const
|
33
|
-
|
34
|
-
|
35
|
-
fs.mkdirSync(photoDirTarget, { recursive: true });
|
36
|
-
|
37
|
-
const rows = CSV.parseFile(
|
38
|
-
Config.getPackageDir() + "/data",
|
39
|
-
"photos.csv"
|
35
|
+
const photoDirCache = `external_data/photos-${width}-${quality}`;
|
36
|
+
[photoDirSrc, photoDirCache, this.#contentDir + "/i"].forEach((dir) =>
|
37
|
+
fs.mkdirSync(dir, { recursive: true }),
|
40
38
|
);
|
41
|
-
for (const row of rows) {
|
42
|
-
const name = row["taxon_name"];
|
43
|
-
const taxon = this.#taxa.getTaxon(name);
|
44
|
-
if (!taxon) {
|
45
|
-
continue;
|
46
|
-
}
|
47
39
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
40
|
+
let downloadCount = 0;
|
41
|
+
let compressCount = 0;
|
42
|
+
let copyCount = 0;
|
43
|
+
|
44
|
+
for (let index = 0; index < taxa.length; index++) {
|
45
|
+
const taxon = taxa[index];
|
46
|
+
const photos = Images.getTaxonPhotos(taxon);
|
47
|
+
for (const photo of photos) {
|
48
|
+
const ext = photo.getExt();
|
49
|
+
const cachedFileName = `${photoDirCache}/${this.getCompressedImageName(photo)}`;
|
50
|
+
|
51
|
+
if (!fs.existsSync(cachedFileName)) {
|
52
|
+
const srcFileName = `${photoDirSrc}/${photo.getId()}.${ext}`;
|
53
|
+
// Compress and cache source file.
|
54
|
+
if (!fs.existsSync(srcFileName)) {
|
55
|
+
// Retrieve original file.
|
56
|
+
if (!fs.existsSync(srcFileName)) {
|
57
|
+
// File is not there; retrieve it.
|
58
|
+
await Files.fetch(photo.getUrl(), srcFileName);
|
59
|
+
downloadCount++;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
await sharp(srcFileName)
|
63
|
+
.resize({ width: width })
|
64
|
+
.jpeg({ quality: quality })
|
65
|
+
.toFile(cachedFileName);
|
66
|
+
compressCount++;
|
67
|
+
}
|
68
|
+
|
69
|
+
fs.copyFileSync(
|
70
|
+
cachedFileName,
|
71
|
+
this.getCompressedFilePath(photo),
|
72
|
+
);
|
73
|
+
copyCount++;
|
52
74
|
}
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
const prefix = src.host.includes("calflora") ? "cf-" : "inat-";
|
57
|
-
const filename = prefix + parts.slice(-1)[0] + ".jpg";
|
58
|
-
const srcFileName = photoDirSrc + "/" + filename;
|
59
|
-
const targetFileName = photoDirTarget + "/" + filename;
|
60
|
-
|
61
|
-
if (!fs.existsSync(srcFileName)) {
|
62
|
-
// File is not there; retrieve it.
|
63
|
-
console.log("retrieving " + srcFileName);
|
64
|
-
await Files.fetch(src, srcFileName);
|
65
|
-
}
|
66
|
-
|
67
|
-
await sharp(srcFileName)
|
68
|
-
.resize({ width: 300 })
|
69
|
-
.jpeg({ quality: 40 })
|
70
|
-
.toFile(targetFileName);
|
71
|
-
|
72
|
-
imageList.push(
|
73
|
-
new TaxonImage(imagePrefix + "/" + filename, row["credit"])
|
74
|
-
);
|
75
|
+
meter.update(index + 1, {
|
76
|
+
custom: ` | ${copyCount} copied - ${compressCount} compressed - ${downloadCount} downloaded`,
|
77
|
+
});
|
75
78
|
}
|
76
79
|
|
80
|
+
meter.stop();
|
81
|
+
|
77
82
|
this.#siteGenerator.copyIllustrations(this.#taxa.getFlowerColors());
|
78
83
|
}
|
79
84
|
|
@@ -88,8 +93,8 @@ class Images {
|
|
88
93
|
EBook.getManifestEntry(
|
89
94
|
"i" + index,
|
90
95
|
"i/" + fileName,
|
91
|
-
EBook.getMediaTypeForExt(ext)
|
92
|
-
)
|
96
|
+
EBook.getMediaTypeForExt(ext),
|
97
|
+
),
|
93
98
|
);
|
94
99
|
}
|
95
100
|
|
@@ -97,10 +102,32 @@ class Images {
|
|
97
102
|
}
|
98
103
|
|
99
104
|
/**
|
100
|
-
* @param {
|
105
|
+
* @param {Photo} photo
|
106
|
+
* @returns {string}
|
107
|
+
*/
|
108
|
+
getCompressedFilePath(photo) {
|
109
|
+
return `${this.#contentDir}/i/${this.getCompressedImageName(photo)}`;
|
110
|
+
}
|
111
|
+
|
112
|
+
/**
|
113
|
+
* @param {Photo} photo
|
114
|
+
* @returns {string}
|
101
115
|
*/
|
102
|
-
|
103
|
-
return
|
116
|
+
getCompressedImageName(photo) {
|
117
|
+
return `${photo.getId()}.${photo.getExt().toLowerCase()}`;
|
118
|
+
}
|
119
|
+
|
120
|
+
/**
|
121
|
+
* @param {Taxon} taxon
|
122
|
+
* @returns {Photo[]}
|
123
|
+
*/
|
124
|
+
static getTaxonPhotos(taxon) {
|
125
|
+
const photos = taxon
|
126
|
+
.getPhotos()
|
127
|
+
.filter((photo) =>
|
128
|
+
["jpg", "jpeg"].includes(photo.getExt().toLowerCase()),
|
129
|
+
);
|
130
|
+
return photos.length > 0 ? [photos[0]] : photos;
|
104
131
|
}
|
105
132
|
}
|
106
133
|
|