@ca-plant-list/ca-plant-list 0.2.1 → 0.2.3

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.
Files changed (56) hide show
  1. package/data/exceptions.json +43 -1
  2. package/data/photos.csv +9 -6
  3. package/data/taxa.csv +164 -164
  4. package/data/text/Bromus-catharticus-var-catharticus.md +1 -0
  5. package/data/text/Bromus-catharticus-var-elatus.md +1 -0
  6. package/data/text/Bromus-sitchensis-var-carinatus.md +1 -0
  7. package/data/text/Bromus-sitchensis-var-marginatus.md +1 -0
  8. package/data/text/Castilleja-foliolosa.md +1 -0
  9. package/data/text/Grindelia-camporum.md +1 -0
  10. package/data/text/Grindelia-hirsutula.md +1 -0
  11. package/data/text/Hypochaeris-glabra.md +1 -0
  12. package/data/text/Hypochaeris-radicata.md +1 -0
  13. package/data/text/Layia-chrysanthemoides.md +1 -0
  14. package/data/text/Layia-gaillardioides.md +1 -0
  15. package/data/text/Layia-hieracioides.md +1 -0
  16. package/data/text/Layia-platyglossa.md +1 -0
  17. package/data/text/Lithophragma-affine.md +1 -0
  18. package/data/text/Lithophragma-heterophyllum.md +1 -0
  19. package/data/text/Lithophragma-parviflorum-var-parviflorum.md +1 -0
  20. package/data/text/Lupinus-formosus-var-formosus.md +1 -0
  21. package/data/text/Lupinus-latifolius-var-latifolius.md +1 -0
  22. package/data/text/Lupinus-microcarpus-var-densiflorus.md +1 -0
  23. package/data/text/Lupinus-microcarpus-var-microcarpus.md +1 -0
  24. package/data/text/Lupinus-succulentus.md +1 -0
  25. package/data/text/Pseudotsuga-menziesii-var-menziesii.md +1 -0
  26. package/data/text/Rosa-californica.md +1 -0
  27. package/data/text/Rosa-gymnocarpa-var-gymnocarpa.md +1 -0
  28. package/data/text/Sequoia-sempervirens.md +1 -0
  29. package/data/text/Symphoricarpos-albus-var-laevigatus.md +1 -0
  30. package/data/text/Symphoricarpos-mollis.md +1 -0
  31. package/data/text/Taraxacum-officinale.md +1 -0
  32. package/data/text/Wyethia-angustifolia.md +1 -0
  33. package/data/text/Wyethia-glabra.md +1 -0
  34. package/data/text/Wyethia-helenioides.md +1 -0
  35. package/ebook/css/main.css +9 -52
  36. package/ebook/i/f-blue.svg +5 -0
  37. package/ebook/i/f-orange.svg +5 -0
  38. package/ebook/i/f-pink.svg +5 -0
  39. package/ebook/i/f-red.svg +5 -0
  40. package/ebook/i/f-white.svg +5 -0
  41. package/ebook/i/f-yellow.svg +5 -0
  42. package/jekyll/assets/css/main.css +6 -0
  43. package/lib/ebook/ebook.js +3 -3
  44. package/lib/ebook/ebookpage.js +4 -0
  45. package/lib/ebook/pages/page_list_families.js +27 -0
  46. package/lib/ebook/pages/page_list_flower_color.js +26 -0
  47. package/lib/ebook/pages/page_list_species.js +26 -0
  48. package/lib/ebook/pages/taxonpage.js +4 -2
  49. package/lib/ebook/pages/tocpage.js +18 -11
  50. package/lib/ebook/plantbook.js +67 -10
  51. package/lib/exceptions.js +14 -4
  52. package/lib/families.js +4 -0
  53. package/lib/index.d.ts +10 -6
  54. package/lib/pagetaxon.js +2 -2
  55. package/lib/taxa.js +53 -2
  56. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ Lemma awn < 4mm.
@@ -0,0 +1 @@
1
+ Lemma awn 4mm or longer. 9-11 prominent veins on distal half of lemma.
@@ -0,0 +1 @@
1
+ Most awns 7mm or longer. 7 lemma veins; veins obscure.
@@ -0,0 +1 @@
1
+ Most awns 4-7mm.
@@ -0,0 +1 @@
1
+ Gray-green to densely white-woolly, hairs branched.
@@ -0,0 +1 @@
1
+ Phyllaries flattened only at bases (rounded in cross section distally), phyllary tips often reflexed, or coiled; plants generally not hairy.
@@ -0,0 +1 @@
1
+ Phyllaries flattened, plants generally hairy.
@@ -0,0 +1 @@
1
+ Annual. Ligules extend only slightly beyond involucre. Leaves hairless or very nearly so. Leaves basal.
@@ -0,0 +1 @@
1
+ Perennial. Ligules extend much beyond involucre. Leaves bristly and rough to touch. Leaves basal.
@@ -0,0 +1 @@
1
+ Plant not glandular. Ray flowers often white-tipped.
@@ -0,0 +1 @@
1
+ Plant glandular, strongly scented. Stem purple-streaked. Ray flowers often white-tipped.
@@ -0,0 +1 @@
1
+ Plant glandular. Stem with purple spots or streaks. Ray flowers yellow, 1-4mm.
@@ -0,0 +1 @@
1
+ Plant glandular. Stem without black dots or streaks. Anthers usually purple. Ray flowers often white-tipped.
@@ -0,0 +1 @@
1
+ Pedicel 3-10 mm, floral tube conical at base. In open, grassy areas.
@@ -0,0 +1 @@
1
+ Pedicel 2 mm or less, floral tube squared off at base. In shaded areas.
@@ -0,0 +1 @@
1
+ Basal leaves either compound or deeply divided (more than half way to base of blade).
@@ -0,0 +1 @@
1
+ Perennial. Keel margins not hairy.
@@ -0,0 +1 @@
1
+ Perennial. Fruit densely hairy. Upper keel margin hairy from base to middle, not hairy from middle to tip
@@ -0,0 +1 @@
1
+ Annual. At least lower part of stem clearly hollow. Lower keel margins usually not hairy or less hairy than upper. Flowers generally yellow or white.
@@ -0,0 +1 @@
1
+ Annual. At least lower part of stem clearly hollow. Lower keel margins usually not hairy or less hairy than upper. Flowers generally pink or purple.
@@ -0,0 +1 @@
1
+ Annual. Fruit not densely hairy.
@@ -0,0 +1 @@
1
+ Needles in spiral around branch (not in flat plane). Cones with many 3-pronged bracts.
@@ -0,0 +1 @@
1
+ Sepals persistent in fruit. Prickles thick-based and generally curved.
@@ -0,0 +1 @@
1
+ Sepals deciduous in fruit. Prickles generally straight, not much thicker at base.
@@ -0,0 +1 @@
1
+ Needles in flat plane on branch.
@@ -0,0 +1 @@
1
+ 8-16 flowers per cluster. Leaves not hairy on upper surface. Only one lobe of corolla has nectar gland below.
@@ -0,0 +1 @@
1
+ 2-8 flowers per cluster. Leaves hairy on both surfaces. All five lobes of corolla have nectar gland below.
@@ -0,0 +1 @@
1
+ Leaves basal. Stem not branched. Outer phyllaries much smaller than inner.
@@ -0,0 +1 @@
1
+ Outer phyllaries narrow and roughly the same width as inner.
@@ -0,0 +1 @@
1
+ Outer phyllaries wide, leaf-like, and usually much larger than inner phyllaries. Generally not hairy or with some glandular hairs.
@@ -0,0 +1 @@
1
+ Outer phyllaries wide, leaf-like, and usually much larger than inner phyllaries. Plant densely tomentose.
@@ -1,59 +1,16 @@
1
- img {
2
- width: 100%;
3
- }
4
-
5
- figure {
6
- page-break-inside: avoid;
7
- }
8
-
9
- span.color {
10
- border: solid black 1px;
11
- border-radius: .25rem;
12
- margin-right: .5rem;
13
- padding: .25rem;
14
- }
15
-
16
- span.color.blue {
17
- background-color: blue;
18
- color: white;
19
- }
20
-
21
- span.color.pink {
22
- background-color: pink;
23
- color: white;
24
- }
25
-
26
- span.color.red {
27
- background-color: red;
28
- color: white;
29
- }
30
-
31
- span.color.yellow {
32
- background-color: yellow;
33
- color: black;
34
- }
35
-
36
- span.color.white {
37
- background-color: white;
38
- color: black;
39
- }
40
-
41
- span.color.blue::after {
42
- content: "Blue"
1
+ * {
2
+ font-family: Georgia, 'Times New Roman', Times, serif;
43
3
  }
44
4
 
45
- span.color.pink::after {
46
- content: "Pink"
47
- }
48
-
49
- span.color.red::after {
50
- content: "Red"
5
+ img {
6
+ width: 100%;
51
7
  }
52
8
 
53
- span.color.white::after {
54
- content: "White"
9
+ img.flr {
10
+ height: 32px;
11
+ width: 32px;
55
12
  }
56
13
 
57
- span.color.yellow::after {
58
- content: "Yellow"
14
+ figure {
15
+ page-break-inside: avoid;
59
16
  }
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
2
+ viewBox="0 0 16 16">
3
+ <path fill="white" stroke="blue"
4
+ d="M11.424 8c.437-.052.811-.136 1.04-.268a2 2 0 0 0-2-3.464c-.229.132-.489.414-.752.767C9.886 4.63 10 4.264 10 4a2 2 0 1 0-4 0c0 .264.114.63.288 1.035-.263-.353-.523-.635-.752-.767a2 2 0 0 0-2 3.464c.229.132.603.216 1.04.268-.437.052-.811.136-1.04.268a2 2 0 1 0 2 3.464c.229-.132.489-.414.752-.767C6.114 11.37 6 11.736 6 12a2 2 0 1 0 4 0c0-.264-.114-.63-.288-1.035.263.353.523.635.752.767a2 2 0 1 0 2-3.464c-.229-.132-.603-.216-1.04-.268zM9 4a1.468 1.468 0 0 1-.045.205c-.039.132-.1.295-.183.484a12.88 12.88 0 0 1-.637 1.223L8 6.142a21.73 21.73 0 0 1-.135-.23 12.88 12.88 0 0 1-.637-1.223 4.216 4.216 0 0 1-.183-.484A1.473 1.473 0 0 1 7 4a1 1 0 1 1 2 0zM3.67 5.5a1 1 0 0 1 1.366-.366 1.472 1.472 0 0 1 .156.142c.094.1.204.233.326.4.245.333.502.747.742 1.163l.13.232a21.86 21.86 0 0 1-.265.002 12.88 12.88 0 0 1-1.379-.06 4.214 4.214 0 0 1-.51-.083 1.47 1.47 0 0 1-.2-.064A1 1 0 0 1 3.67 5.5zm1.366 5.366a1 1 0 0 1-1-1.732c.001 0 .016-.008.047-.02.037-.013.087-.028.153-.044.134-.032.305-.06.51-.083a12.88 12.88 0 0 1 1.379-.06c.09 0 .178 0 .266.002a21.82 21.82 0 0 1-.131.232c-.24.416-.497.83-.742 1.163a4.1 4.1 0 0 1-.327.4 1.483 1.483 0 0 1-.155.142zM9 12a1 1 0 0 1-2 0 1.476 1.476 0 0 1 .045-.206c.039-.131.1-.294.183-.483.166-.378.396-.808.637-1.223L8 9.858l.135.23c.241.415.47.845.637 1.223.083.19.144.352.183.484A1.338 1.338 0 0 1 9 12zm3.33-6.5a1 1 0 0 1-.366 1.366 1.478 1.478 0 0 1-.2.064c-.134.032-.305.06-.51.083-.412.045-.898.061-1.379.06-.09 0-.178 0-.266-.002l.131-.232c.24-.416.497-.83.742-1.163a4.1 4.1 0 0 1 .327-.4c.046-.05.085-.086.114-.11.026-.022.04-.03.041-.032a1 1 0 0 1 1.366.366zm-1.366 5.366a1.494 1.494 0 0 1-.155-.141 4.225 4.225 0 0 1-.327-.4A12.88 12.88 0 0 1 9.74 9.16a22 22 0 0 1-.13-.232l.265-.002c.48-.001.967.015 1.379.06.205.023.376.051.51.083.066.016.116.031.153.044l.048.02a1 1 0 1 1-1 1.732zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" />
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
2
+ viewBox="0 0 16 16">
3
+ <path fill="white" stroke="orange"
4
+ d="M11.424 8c.437-.052.811-.136 1.04-.268a2 2 0 0 0-2-3.464c-.229.132-.489.414-.752.767C9.886 4.63 10 4.264 10 4a2 2 0 1 0-4 0c0 .264.114.63.288 1.035-.263-.353-.523-.635-.752-.767a2 2 0 0 0-2 3.464c.229.132.603.216 1.04.268-.437.052-.811.136-1.04.268a2 2 0 1 0 2 3.464c.229-.132.489-.414.752-.767C6.114 11.37 6 11.736 6 12a2 2 0 1 0 4 0c0-.264-.114-.63-.288-1.035.263.353.523.635.752.767a2 2 0 1 0 2-3.464c-.229-.132-.603-.216-1.04-.268zM9 4a1.468 1.468 0 0 1-.045.205c-.039.132-.1.295-.183.484a12.88 12.88 0 0 1-.637 1.223L8 6.142a21.73 21.73 0 0 1-.135-.23 12.88 12.88 0 0 1-.637-1.223 4.216 4.216 0 0 1-.183-.484A1.473 1.473 0 0 1 7 4a1 1 0 1 1 2 0zM3.67 5.5a1 1 0 0 1 1.366-.366 1.472 1.472 0 0 1 .156.142c.094.1.204.233.326.4.245.333.502.747.742 1.163l.13.232a21.86 21.86 0 0 1-.265.002 12.88 12.88 0 0 1-1.379-.06 4.214 4.214 0 0 1-.51-.083 1.47 1.47 0 0 1-.2-.064A1 1 0 0 1 3.67 5.5zm1.366 5.366a1 1 0 0 1-1-1.732c.001 0 .016-.008.047-.02.037-.013.087-.028.153-.044.134-.032.305-.06.51-.083a12.88 12.88 0 0 1 1.379-.06c.09 0 .178 0 .266.002a21.82 21.82 0 0 1-.131.232c-.24.416-.497.83-.742 1.163a4.1 4.1 0 0 1-.327.4 1.483 1.483 0 0 1-.155.142zM9 12a1 1 0 0 1-2 0 1.476 1.476 0 0 1 .045-.206c.039-.131.1-.294.183-.483.166-.378.396-.808.637-1.223L8 9.858l.135.23c.241.415.47.845.637 1.223.083.19.144.352.183.484A1.338 1.338 0 0 1 9 12zm3.33-6.5a1 1 0 0 1-.366 1.366 1.478 1.478 0 0 1-.2.064c-.134.032-.305.06-.51.083-.412.045-.898.061-1.379.06-.09 0-.178 0-.266-.002l.131-.232c.24-.416.497-.83.742-1.163a4.1 4.1 0 0 1 .327-.4c.046-.05.085-.086.114-.11.026-.022.04-.03.041-.032a1 1 0 0 1 1.366.366zm-1.366 5.366a1.494 1.494 0 0 1-.155-.141 4.225 4.225 0 0 1-.327-.4A12.88 12.88 0 0 1 9.74 9.16a22 22 0 0 1-.13-.232l.265-.002c.48-.001.967.015 1.379.06.205.023.376.051.51.083.066.016.116.031.153.044l.048.02a1 1 0 1 1-1 1.732zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" />
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
2
+ viewBox="0 0 16 16">
3
+ <path fill="white" stroke="pink"
4
+ d="M11.424 8c.437-.052.811-.136 1.04-.268a2 2 0 0 0-2-3.464c-.229.132-.489.414-.752.767C9.886 4.63 10 4.264 10 4a2 2 0 1 0-4 0c0 .264.114.63.288 1.035-.263-.353-.523-.635-.752-.767a2 2 0 0 0-2 3.464c.229.132.603.216 1.04.268-.437.052-.811.136-1.04.268a2 2 0 1 0 2 3.464c.229-.132.489-.414.752-.767C6.114 11.37 6 11.736 6 12a2 2 0 1 0 4 0c0-.264-.114-.63-.288-1.035.263.353.523.635.752.767a2 2 0 1 0 2-3.464c-.229-.132-.603-.216-1.04-.268zM9 4a1.468 1.468 0 0 1-.045.205c-.039.132-.1.295-.183.484a12.88 12.88 0 0 1-.637 1.223L8 6.142a21.73 21.73 0 0 1-.135-.23 12.88 12.88 0 0 1-.637-1.223 4.216 4.216 0 0 1-.183-.484A1.473 1.473 0 0 1 7 4a1 1 0 1 1 2 0zM3.67 5.5a1 1 0 0 1 1.366-.366 1.472 1.472 0 0 1 .156.142c.094.1.204.233.326.4.245.333.502.747.742 1.163l.13.232a21.86 21.86 0 0 1-.265.002 12.88 12.88 0 0 1-1.379-.06 4.214 4.214 0 0 1-.51-.083 1.47 1.47 0 0 1-.2-.064A1 1 0 0 1 3.67 5.5zm1.366 5.366a1 1 0 0 1-1-1.732c.001 0 .016-.008.047-.02.037-.013.087-.028.153-.044.134-.032.305-.06.51-.083a12.88 12.88 0 0 1 1.379-.06c.09 0 .178 0 .266.002a21.82 21.82 0 0 1-.131.232c-.24.416-.497.83-.742 1.163a4.1 4.1 0 0 1-.327.4 1.483 1.483 0 0 1-.155.142zM9 12a1 1 0 0 1-2 0 1.476 1.476 0 0 1 .045-.206c.039-.131.1-.294.183-.483.166-.378.396-.808.637-1.223L8 9.858l.135.23c.241.415.47.845.637 1.223.083.19.144.352.183.484A1.338 1.338 0 0 1 9 12zm3.33-6.5a1 1 0 0 1-.366 1.366 1.478 1.478 0 0 1-.2.064c-.134.032-.305.06-.51.083-.412.045-.898.061-1.379.06-.09 0-.178 0-.266-.002l.131-.232c.24-.416.497-.83.742-1.163a4.1 4.1 0 0 1 .327-.4c.046-.05.085-.086.114-.11.026-.022.04-.03.041-.032a1 1 0 0 1 1.366.366zm-1.366 5.366a1.494 1.494 0 0 1-.155-.141 4.225 4.225 0 0 1-.327-.4A12.88 12.88 0 0 1 9.74 9.16a22 22 0 0 1-.13-.232l.265-.002c.48-.001.967.015 1.379.06.205.023.376.051.51.083.066.016.116.031.153.044l.048.02a1 1 0 1 1-1 1.732zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" />
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
2
+ viewBox="0 0 16 16">
3
+ <path fill="white" stroke="red"
4
+ d="M11.424 8c.437-.052.811-.136 1.04-.268a2 2 0 0 0-2-3.464c-.229.132-.489.414-.752.767C9.886 4.63 10 4.264 10 4a2 2 0 1 0-4 0c0 .264.114.63.288 1.035-.263-.353-.523-.635-.752-.767a2 2 0 0 0-2 3.464c.229.132.603.216 1.04.268-.437.052-.811.136-1.04.268a2 2 0 1 0 2 3.464c.229-.132.489-.414.752-.767C6.114 11.37 6 11.736 6 12a2 2 0 1 0 4 0c0-.264-.114-.63-.288-1.035.263.353.523.635.752.767a2 2 0 1 0 2-3.464c-.229-.132-.603-.216-1.04-.268zM9 4a1.468 1.468 0 0 1-.045.205c-.039.132-.1.295-.183.484a12.88 12.88 0 0 1-.637 1.223L8 6.142a21.73 21.73 0 0 1-.135-.23 12.88 12.88 0 0 1-.637-1.223 4.216 4.216 0 0 1-.183-.484A1.473 1.473 0 0 1 7 4a1 1 0 1 1 2 0zM3.67 5.5a1 1 0 0 1 1.366-.366 1.472 1.472 0 0 1 .156.142c.094.1.204.233.326.4.245.333.502.747.742 1.163l.13.232a21.86 21.86 0 0 1-.265.002 12.88 12.88 0 0 1-1.379-.06 4.214 4.214 0 0 1-.51-.083 1.47 1.47 0 0 1-.2-.064A1 1 0 0 1 3.67 5.5zm1.366 5.366a1 1 0 0 1-1-1.732c.001 0 .016-.008.047-.02.037-.013.087-.028.153-.044.134-.032.305-.06.51-.083a12.88 12.88 0 0 1 1.379-.06c.09 0 .178 0 .266.002a21.82 21.82 0 0 1-.131.232c-.24.416-.497.83-.742 1.163a4.1 4.1 0 0 1-.327.4 1.483 1.483 0 0 1-.155.142zM9 12a1 1 0 0 1-2 0 1.476 1.476 0 0 1 .045-.206c.039-.131.1-.294.183-.483.166-.378.396-.808.637-1.223L8 9.858l.135.23c.241.415.47.845.637 1.223.083.19.144.352.183.484A1.338 1.338 0 0 1 9 12zm3.33-6.5a1 1 0 0 1-.366 1.366 1.478 1.478 0 0 1-.2.064c-.134.032-.305.06-.51.083-.412.045-.898.061-1.379.06-.09 0-.178 0-.266-.002l.131-.232c.24-.416.497-.83.742-1.163a4.1 4.1 0 0 1 .327-.4c.046-.05.085-.086.114-.11.026-.022.04-.03.041-.032a1 1 0 0 1 1.366.366zm-1.366 5.366a1.494 1.494 0 0 1-.155-.141 4.225 4.225 0 0 1-.327-.4A12.88 12.88 0 0 1 9.74 9.16a22 22 0 0 1-.13-.232l.265-.002c.48-.001.967.015 1.379.06.205.023.376.051.51.083.066.016.116.031.153.044l.048.02a1 1 0 1 1-1 1.732zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" />
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
2
+ viewBox="0 0 16 16">
3
+ <path
4
+ d="M11.424 8c.437-.052.811-.136 1.04-.268a2 2 0 0 0-2-3.464c-.229.132-.489.414-.752.767C9.886 4.63 10 4.264 10 4a2 2 0 1 0-4 0c0 .264.114.63.288 1.035-.263-.353-.523-.635-.752-.767a2 2 0 0 0-2 3.464c.229.132.603.216 1.04.268-.437.052-.811.136-1.04.268a2 2 0 1 0 2 3.464c.229-.132.489-.414.752-.767C6.114 11.37 6 11.736 6 12a2 2 0 1 0 4 0c0-.264-.114-.63-.288-1.035.263.353.523.635.752.767a2 2 0 1 0 2-3.464c-.229-.132-.603-.216-1.04-.268zM9 4a1.468 1.468 0 0 1-.045.205c-.039.132-.1.295-.183.484a12.88 12.88 0 0 1-.637 1.223L8 6.142a21.73 21.73 0 0 1-.135-.23 12.88 12.88 0 0 1-.637-1.223 4.216 4.216 0 0 1-.183-.484A1.473 1.473 0 0 1 7 4a1 1 0 1 1 2 0zM3.67 5.5a1 1 0 0 1 1.366-.366 1.472 1.472 0 0 1 .156.142c.094.1.204.233.326.4.245.333.502.747.742 1.163l.13.232a21.86 21.86 0 0 1-.265.002 12.88 12.88 0 0 1-1.379-.06 4.214 4.214 0 0 1-.51-.083 1.47 1.47 0 0 1-.2-.064A1 1 0 0 1 3.67 5.5zm1.366 5.366a1 1 0 0 1-1-1.732c.001 0 .016-.008.047-.02.037-.013.087-.028.153-.044.134-.032.305-.06.51-.083a12.88 12.88 0 0 1 1.379-.06c.09 0 .178 0 .266.002a21.82 21.82 0 0 1-.131.232c-.24.416-.497.83-.742 1.163a4.1 4.1 0 0 1-.327.4 1.483 1.483 0 0 1-.155.142zM9 12a1 1 0 0 1-2 0 1.476 1.476 0 0 1 .045-.206c.039-.131.1-.294.183-.483.166-.378.396-.808.637-1.223L8 9.858l.135.23c.241.415.47.845.637 1.223.083.19.144.352.183.484A1.338 1.338 0 0 1 9 12zm3.33-6.5a1 1 0 0 1-.366 1.366 1.478 1.478 0 0 1-.2.064c-.134.032-.305.06-.51.083-.412.045-.898.061-1.379.06-.09 0-.178 0-.266-.002l.131-.232c.24-.416.497-.83.742-1.163a4.1 4.1 0 0 1 .327-.4c.046-.05.085-.086.114-.11.026-.022.04-.03.041-.032a1 1 0 0 1 1.366.366zm-1.366 5.366a1.494 1.494 0 0 1-.155-.141 4.225 4.225 0 0 1-.327-.4A12.88 12.88 0 0 1 9.74 9.16a22 22 0 0 1-.13-.232l.265-.002c.48-.001.967.015 1.379.06.205.023.376.051.51.083.066.016.116.031.153.044l.048.02a1 1 0 1 1-1 1.732zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" />
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
2
+ viewBox="0 0 16 16">
3
+ <path fill="white" stroke="yellow"
4
+ d="M11.424 8c.437-.052.811-.136 1.04-.268a2 2 0 0 0-2-3.464c-.229.132-.489.414-.752.767C9.886 4.63 10 4.264 10 4a2 2 0 1 0-4 0c0 .264.114.63.288 1.035-.263-.353-.523-.635-.752-.767a2 2 0 0 0-2 3.464c.229.132.603.216 1.04.268-.437.052-.811.136-1.04.268a2 2 0 1 0 2 3.464c.229-.132.489-.414.752-.767C6.114 11.37 6 11.736 6 12a2 2 0 1 0 4 0c0-.264-.114-.63-.288-1.035.263.353.523.635.752.767a2 2 0 1 0 2-3.464c-.229-.132-.603-.216-1.04-.268zM9 4a1.468 1.468 0 0 1-.045.205c-.039.132-.1.295-.183.484a12.88 12.88 0 0 1-.637 1.223L8 6.142a21.73 21.73 0 0 1-.135-.23 12.88 12.88 0 0 1-.637-1.223 4.216 4.216 0 0 1-.183-.484A1.473 1.473 0 0 1 7 4a1 1 0 1 1 2 0zM3.67 5.5a1 1 0 0 1 1.366-.366 1.472 1.472 0 0 1 .156.142c.094.1.204.233.326.4.245.333.502.747.742 1.163l.13.232a21.86 21.86 0 0 1-.265.002 12.88 12.88 0 0 1-1.379-.06 4.214 4.214 0 0 1-.51-.083 1.47 1.47 0 0 1-.2-.064A1 1 0 0 1 3.67 5.5zm1.366 5.366a1 1 0 0 1-1-1.732c.001 0 .016-.008.047-.02.037-.013.087-.028.153-.044.134-.032.305-.06.51-.083a12.88 12.88 0 0 1 1.379-.06c.09 0 .178 0 .266.002a21.82 21.82 0 0 1-.131.232c-.24.416-.497.83-.742 1.163a4.1 4.1 0 0 1-.327.4 1.483 1.483 0 0 1-.155.142zM9 12a1 1 0 0 1-2 0 1.476 1.476 0 0 1 .045-.206c.039-.131.1-.294.183-.483.166-.378.396-.808.637-1.223L8 9.858l.135.23c.241.415.47.845.637 1.223.083.19.144.352.183.484A1.338 1.338 0 0 1 9 12zm3.33-6.5a1 1 0 0 1-.366 1.366 1.478 1.478 0 0 1-.2.064c-.134.032-.305.06-.51.083-.412.045-.898.061-1.379.06-.09 0-.178 0-.266-.002l.131-.232c.24-.416.497-.83.742-1.163a4.1 4.1 0 0 1 .327-.4c.046-.05.085-.086.114-.11.026-.022.04-.03.041-.032a1 1 0 0 1 1.366.366zm-1.366 5.366a1.494 1.494 0 0 1-.155-.141 4.225 4.225 0 0 1-.327-.4A12.88 12.88 0 0 1 9.74 9.16a22 22 0 0 1-.13-.232l.265-.002c.48-.001.967.015 1.379.06.205.023.376.051.51.083.066.016.116.031.153.044l.048.02a1 1 0 1 1-1 1.732zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" />
5
+ </svg>
@@ -91,6 +91,12 @@ div.grid {
91
91
  column-gap: 2rem;
92
92
  }
93
93
 
94
+ div.grid.borders>div.section {
95
+ border: solid 1px;
96
+ border-radius: 3%;
97
+ padding: .5rem;
98
+ }
99
+
94
100
  div.wrapper {
95
101
  display: flex;
96
102
  flex-wrap: wrap;
@@ -32,9 +32,9 @@ class EBook {
32
32
  this.#createPackageFile();
33
33
 
34
34
  // Copy assets
35
- const cssDirTarget = contentDir + "/css";
36
- fs.mkdirSync( cssDirTarget, { recursive: true } );
37
- fs.cpSync( Config.getPackageDir() + "/ebook/css", cssDirTarget, { recursive: true } );
35
+ // const cssDirTarget = contentDir + "/css";
36
+ // fs.mkdirSync( cssDirTarget, { recursive: true } );
37
+ fs.cpSync( Config.getPackageDir() + "/ebook", contentDir, { recursive: true } );
38
38
 
39
39
  this.createZip();
40
40
 
@@ -17,6 +17,10 @@ class EBookPage {
17
17
  fs.writeFileSync( this.#fileName, html );
18
18
  }
19
19
 
20
+ getTitle() {
21
+ return this.#title;
22
+ }
23
+
20
24
  #renderBodyStart() {
21
25
  return "<body>";
22
26
  }
@@ -0,0 +1,27 @@
1
+ import { EBookPage } from "../ebookpage.js";
2
+ import { XHTML } from "../xhtml.js";
3
+ import { Families } from "../../families.js";
4
+
5
+ class PageListFamilies extends EBookPage {
6
+
7
+ constructor( outputDir ) {
8
+ super( outputDir + "/list_families.html", "All Families" );
9
+ }
10
+
11
+ renderPageBody() {
12
+
13
+ const html = XHTML.textElement( "h1", this.getTitle() );
14
+
15
+ const links = [];
16
+ for ( const family of Families.getFamilies() ) {
17
+ if ( !family.getTaxa() ) {
18
+ continue;
19
+ }
20
+ links.push( XHTML.getLink( family.getFileName(), family.getName() ) );
21
+ }
22
+
23
+ return html + XHTML.wrap( "ol", XHTML.arrayToLI( links ) );
24
+ }
25
+ }
26
+
27
+ export { PageListFamilies };
@@ -0,0 +1,26 @@
1
+ import { EBookPage } from "../ebookpage.js";
2
+ import { XHTML } from "../xhtml.js";
3
+
4
+ class PageListFlowerColor extends EBookPage {
5
+
6
+ #color;
7
+
8
+ constructor( outputDir, color ) {
9
+ super( outputDir + "/" + color.getFileName(), color.getColorName( true ) + " Flowers" );
10
+ this.#color = color;
11
+ }
12
+
13
+ renderPageBody() {
14
+
15
+ const html = XHTML.textElement( "h1", this.getTitle() );
16
+
17
+ const links = [];
18
+ for ( const taxon of this.#color.getTaxa() ) {
19
+ links.push( XHTML.getLink( taxon.getFileName(), taxon.getName() ) );
20
+ }
21
+
22
+ return html + XHTML.wrap( "ol", XHTML.arrayToLI( links ) );
23
+ }
24
+ }
25
+
26
+ export { PageListFlowerColor };
@@ -0,0 +1,26 @@
1
+ import { EBookPage } from "../ebookpage.js";
2
+ import { XHTML } from "../xhtml.js";
3
+
4
+ class PageListSpecies extends EBookPage {
5
+
6
+ #taxa;
7
+
8
+ constructor( outputDir, taxa, filename, title ) {
9
+ super( outputDir + "/" + filename, title );
10
+ this.#taxa = taxa;
11
+ }
12
+
13
+ renderPageBody() {
14
+
15
+ const html = XHTML.textElement( "h1", this.getTitle() );
16
+
17
+ const links = [];
18
+ for ( const taxon of this.#taxa ) {
19
+ links.push( XHTML.getLink( taxon.getFileName(), taxon.getName() ) );
20
+ }
21
+
22
+ return html + XHTML.wrap( "ol", XHTML.arrayToLI( links ) );
23
+ }
24
+ }
25
+
26
+ export { PageListSpecies };
@@ -25,7 +25,8 @@ class TaxonPage extends EBookPage {
25
25
  }
26
26
  let html = "";
27
27
  for ( const color of colors ) {
28
- html += XHTML.textElement( "span", "", { class: "color " + color } );
28
+ // html += XHTML.textElement( "span", "", { class: "color " + color } );
29
+ html += XHTML.textElement( "img", "", { src: "./i/f-" + color + ".svg", class: "flr" } );
29
30
  }
30
31
  return html;
31
32
  }
@@ -45,7 +46,8 @@ class TaxonPage extends EBookPage {
45
46
  const name = this.#taxon.getName();
46
47
  let html = XHTML.textElement( "h1", name );
47
48
 
48
- html += XHTML.textElement( "div", this.#taxon.getFamily().getName() );
49
+ const family = this.#taxon.getFamily();
50
+ html += XHTML.wrap( "div", XHTML.getLink( family.getFileName(), family.getName() ) );
49
51
 
50
52
  const cn = this.#taxon.getCommonNames();
51
53
  if ( cn && cn.length > 0 ) {
@@ -1,30 +1,37 @@
1
- import { HTML } from "@ca-plant-list/ca-plant-list";
2
1
  import { EBookPage } from "../ebookpage.js";
2
+ import { XHTML } from "../xhtml.js";
3
+ import { FLOWER_COLOR_NAMES } from "../../taxa.js";
3
4
 
4
5
  class TOCPage extends EBookPage {
5
6
 
6
- #taxa;
7
-
8
- constructor( outputDir, taxa ) {
7
+ constructor( outputDir ) {
9
8
  super( outputDir + "/toc.xhtml", "Table of Contents" );
10
- this.#taxa = taxa;
11
9
  }
12
10
 
13
11
  renderPageBody() {
14
12
 
15
13
  let html = "<nav id=\"toc\" role=\"doc-toc\" epub:type=\"toc\">";
16
- html += "<h2 epub:type=\"title\">Table of Contents</h2>";
14
+ html += "<h1 epub:type=\"title\">Table of Contents</h1>";
17
15
 
18
- html += "<ol>";
19
- for ( const taxon of this.#taxa ) {
20
- html += "<li>" + HTML.getLink( "./" + taxon.getFileName(), taxon.getName() ) + "</li>";
21
- }
22
- html += "</ol>";
16
+ const mainLinks = [];
17
+ mainLinks.push( this.#getFlowerColorLinks() );
18
+ mainLinks.push( XHTML.getLink( "./list_families.html", "All Families" ) );
19
+ mainLinks.push( XHTML.getLink( "./list_species.html", "All Species" ) );
20
+ html += XHTML.wrap( "ol", XHTML.arrayToLI( mainLinks ) );
23
21
 
24
22
  html += "</nav>";
25
23
 
26
24
  return html;
27
25
  }
26
+
27
+ #getFlowerColorLinks() {
28
+ const html = XHTML.textElement( "span", "Flower Color" );
29
+ const links = [];
30
+ for ( const colorName of FLOWER_COLOR_NAMES ) {
31
+ links.push( XHTML.getLink( "list_fc_" + colorName + ".html", colorName ) );
32
+ }
33
+ return html + XHTML.wrap( "ol", XHTML.arrayToLI( links ) );
34
+ }
28
35
  }
29
36
 
30
37
  export { TOCPage };
@@ -4,9 +4,13 @@ import sharp from "sharp";
4
4
  import { CSV, Families, Files, Taxa } from "@ca-plant-list/ca-plant-list";
5
5
  import { EBook } from "./ebook.js";
6
6
  import { Image } from "./image.js";
7
+ import { PageListFamilies } from "./pages/page_list_families.js";
8
+ import { PageListFlowerColor } from "./pages/page_list_flower_color.js";
9
+ import { PageListSpecies } from "./pages/page_list_species.js";
7
10
  import { TaxonPage } from "./pages/taxonpage.js";
8
11
  import { TOCPage } from "./pages/tocpage.js";
9
12
  import { Config } from "../config.js";
13
+ import { FLOWER_COLOR_NAMES } from "../taxa.js";
10
14
 
11
15
  class PlantBook extends EBook {
12
16
 
@@ -21,29 +25,38 @@ class PlantBook extends EBook {
21
25
  Config.getConfigValue( "ebook", "title" )
22
26
  );
23
27
 
24
- Families.init();
25
-
26
28
  }
27
29
 
28
30
  async createPages() {
31
+
32
+ console.log( "checking images" );
29
33
  await this.#importImages();
30
34
 
31
35
  const contentDir = this.getContentDir();
36
+
37
+ console.log( "creating taxon pages" );
32
38
  const taxa = Taxa.getTaxa();
33
39
  for ( const taxon of taxa ) {
34
40
  const name = taxon.getName();
35
41
  new TaxonPage( contentDir, taxon, this.#images[ name ] ).create();
36
42
  }
37
- new TOCPage( contentDir, taxa ).create();
38
- }
39
43
 
40
- #getMapEntry( map, key, initialValue ) {
41
- const value = map[ key ];
42
- if ( value ) {
43
- return value;
44
+ // Create lists.
45
+ for ( const colorName of FLOWER_COLOR_NAMES ) {
46
+ new PageListFlowerColor( contentDir, Taxa.getFlowerColor( colorName ) ).create();
44
47
  }
45
- map[ key ] = initialValue;
46
- return initialValue;
48
+ new PageListFamilies( contentDir ).create();
49
+ for ( const family of Families.getFamilies() ) {
50
+ const taxa = family.getTaxa();
51
+ if ( !taxa ) {
52
+ continue;
53
+ }
54
+ const name = family.getName();
55
+ new PageListSpecies( contentDir, taxa, name + ".html", name ).create();
56
+ }
57
+ new PageListSpecies( contentDir, taxa, "list_species.html", "All Species" ).create();
58
+
59
+ new TOCPage( contentDir ).create();
47
60
  }
48
61
 
49
62
  async #importImages() {
@@ -90,8 +103,33 @@ class PlantBook extends EBook {
90
103
  }
91
104
 
92
105
  renderManifestEntries() {
106
+
93
107
  let xml = "";
94
108
 
109
+ xml += "<item id=\"f0\" href=\"i/f-blue.svg\" media-type=\"image/svg+xml\" />";
110
+ xml += "<item id=\"f1\" href=\"i/f-orange.svg\" media-type=\"image/svg+xml\" />";
111
+ xml += "<item id=\"f2\" href=\"i/f-pink.svg\" media-type=\"image/svg+xml\" />";
112
+ xml += "<item id=\"f3\" href=\"i/f-red.svg\" media-type=\"image/svg+xml\" />";
113
+ xml += "<item id=\"f4\" href=\"i/f-white.svg\" media-type=\"image/svg+xml\" />";
114
+ xml += "<item id=\"f5\" href=\"i/f-yellow.svg\" media-type=\"image/svg+xml\" />";
115
+
116
+ // Add lists.
117
+ xml += "<item id=\"lspecies\" href=\"list_species.html\" media-type=\"application/xhtml+xml\" />";
118
+ xml += "<item id=\"lfamilies\" href=\"list_families.html\" media-type=\"application/xhtml+xml\" />";
119
+ for ( const colorName of FLOWER_COLOR_NAMES ) {
120
+ const color = Taxa.getFlowerColor( colorName );
121
+ xml += "<item id=\"l" + color.getColorName() + "\" href=\"" + color.getFileName() + "\" media-type=\"application/xhtml+xml\" />";
122
+ }
123
+
124
+ // Add family pages.
125
+ for ( const family of Families.getFamilies() ) {
126
+ const taxa = family.getTaxa();
127
+ if ( !taxa ) {
128
+ continue;
129
+ }
130
+ xml += "<item id=\"fam" + family.getName() + "\" href=\"" + family.getFileName() + "\" media-type=\"application/xhtml+xml\" />";
131
+ }
132
+
95
133
  // Add taxon pages.
96
134
  const taxa = Taxa.getTaxa();
97
135
  for ( let index = 0; index < taxa.length; index++ ) {
@@ -112,6 +150,25 @@ class PlantBook extends EBook {
112
150
 
113
151
  renderSpineElements() {
114
152
  let xml = "";
153
+
154
+ // Add lists.
155
+ for ( const colorName of FLOWER_COLOR_NAMES ) {
156
+ const color = Taxa.getFlowerColor( colorName );
157
+ xml += "<itemref idref=\"l" + color.getColorName() + "\"/>";
158
+ }
159
+ xml += "<itemref idref=\"lfamilies\"/>";
160
+ xml += "<itemref idref=\"lspecies\"/>";
161
+
162
+ // Add families.
163
+ for ( const family of Families.getFamilies() ) {
164
+ const taxa = family.getTaxa();
165
+ if ( !taxa ) {
166
+ continue;
167
+ }
168
+ xml += "<itemref idref=\"fam" + family.getName() + "\"/>";
169
+ }
170
+
171
+ // Add taxa.
115
172
  for ( let index = 0; index < Taxa.getTaxa().length; index++ ) {
116
173
  xml += "<itemref idref=\"t" + index + "\"/>";
117
174
  }
package/lib/exceptions.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { Config } from "./config.js";
1
2
  import { Files } from "./files.js";
2
3
 
3
4
  class Exceptions {
@@ -32,11 +33,20 @@ class Exceptions {
32
33
  }
33
34
 
34
35
  static init( dir ) {
35
- try {
36
- this.#exceptions = JSON.parse( Files.read( dir + "/exceptions.json" ) );
37
- } catch ( e ) {
38
- console.log( e );
36
+
37
+ function readConfig( fileName ) {
38
+ return JSON.parse( Files.read( fileName ) );
39
39
  }
40
+
41
+ // Read default configuration.
42
+ this.#exceptions = readConfig( Config.getPackageDir() + "/data/exceptions.json" );
43
+
44
+ // Add/overwrite with local configuration.
45
+ const localExceptions = readConfig( dir + "/exceptions.json" );
46
+ for ( const [ k, v ] of Object.entries( localExceptions ) ) {
47
+ this.#exceptions[ k ] = v;
48
+ }
49
+
40
50
  }
41
51
 
42
52
  }
package/lib/families.js CHANGED
@@ -10,6 +10,10 @@ class Families {
10
10
 
11
11
  static #families;
12
12
 
13
+ static getFamilies() {
14
+ return Object.values( this.#families ).sort( ( a, b ) => a.getName().localeCompare( b.getName() ) );
15
+ }
16
+
13
17
  static getFamily( familyName ) {
14
18
  return this.#families[ familyName ];
15
19
  }
package/lib/index.d.ts CHANGED
@@ -33,14 +33,15 @@ export class ErrorLog {
33
33
  static write(fileName: any): void;
34
34
  }
35
35
  export class Exceptions {
36
- static "__#16@#exceptions": {};
36
+ static "__#17@#exceptions": {};
37
37
  static getExceptions(): [string, any][];
38
38
  static getValue(name: any, cat: any, subcat: any, defaultValue: any): any;
39
39
  static hasException(name: any, cat: any, subcat: any): boolean;
40
40
  static init(dir: any): void;
41
41
  }
42
42
  export class Families {
43
- static "__#10@#families": any;
43
+ static "__#11@#families": any;
44
+ static getFamilies(): any[];
44
45
  static getFamily(familyName: any): any;
45
46
  static init(): void;
46
47
  static renderPages(outputDir: any, taxaColumns: any): void;
@@ -154,18 +155,21 @@ export class RarePlants {
154
155
  static getRPIRankDescription(rank: any): any;
155
156
  static getRPIRankAndThreatDescriptions(rank: any): any[];
156
157
  }
158
+ export const FLOWER_COLOR_NAMES: string[];
157
159
  export class Taxa {
158
- static "__#9@#taxa": {};
159
- static "__#9@#sortedTaxa": any;
160
+ static "__#10@#taxa": {};
161
+ static "__#10@#flower_colors": {};
162
+ static "__#10@#sortedTaxa": any;
160
163
  static getHTMLTable(taxa: any, columns?: {
161
164
  title: string;
162
165
  data: (t: any) => any;
163
166
  }[]): string;
167
+ static getFlowerColor(name: any): any;
164
168
  static getTaxa(): any;
165
169
  static getTaxon(name: any): any;
166
170
  static init(inclusionList: any, taxaMeta?: {}, taxonClass?: typeof Taxon, extraTaxa?: any[], extraSynonyms?: any[]): void;
167
- static "__#9@#loadSyns"(synCSV: any, inclusionList: any): void;
168
- static "__#9@#loadTaxa"(taxaCSV: any, inclusionList: any, taxaMeta: any, taxonClass: any): void;
171
+ static "__#10@#loadSyns"(synCSV: any, inclusionList: any): void;
172
+ static "__#10@#loadTaxa"(taxaCSV: any, inclusionList: any, taxaMeta: any, taxonClass: any): void;
169
173
  }
170
174
  export namespace TAXA_LIST_COLS {
171
175
  namespace CESA {