@sfgrp/distinguish 0.0.4 → 0.0.7

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/README.md CHANGED
@@ -1,29 +1,27 @@
1
1
  # distinguish
2
2
 
3
- An interactive key engine that feeds off of [TaxonWorks](https://taxonworks.org)' [API](https://api.taxonworks.org).
3
+ An interactive key engine that feeds off of [TaxonWorks](https://taxonworks.org)' [API](https://api.taxonworks.org). Distinguish is a product of the [Species File Group](https://speciesfilegroup.org) and its collaborators.
4
4
 
5
5
  ## Quick start
6
6
 
7
- * Create a github repository.
8
- * ... create page
9
- * ... add module
10
- * ... add configs TOKEN/API
11
- * ... add action
12
- * ... visit page
7
+ See [Example page](#example-page).
13
8
 
14
9
  ## Details
15
10
 
16
- Interactive keys are tools used by taxonomists and others to diagnosis or seperate one taxon from another. Distinguish provides an embedable, web-based, interactive key interface. The key uses logic (the "engine") and data managed in an instance of TaxonWorks. Keys can served locally (e.g. by opening a file in your browser) or on websites. They require an internet connection.
11
+ Interactive keys are tools used by taxonomists and others to diagnosis or seperate one taxon (e.g. a species) from others. Distinguish provides an embedable, web-based, interactive key interface. The key uses logic (the "engine") and data managed in an instance of TaxonWorks. Keys can served locally (e.g. by opening a file in your browser) or on websites. They require an internet connection.
17
12
 
18
13
  ## Features
19
14
 
20
- * ...
21
- * multi-language support
22
- * ...
15
+ * Figure descriptors and observations.
16
+ * Multi-language support.
17
+ * Filter by tagged set.
18
+ * Filter by rank (e.g. "Family" or "Genus").
19
+ * Qualitative, quantitative descriptors.
20
+ * Local (file in your browser) or server-based (both require internet access).
23
21
 
24
22
  ## Technical
25
23
 
26
- Distinguish is a `<TODO>` module. It is inserted into a webpage via configuration. All functionality is driven from a single, parameterized API call (`/api/v1/...`).
24
+ Distinguish is a node module. All functionality is driven from a single, parameterized API call.
27
25
 
28
26
  ## Install
29
27
 
@@ -41,14 +39,13 @@ yarn add @sfgrp/distinguish
41
39
  ### CDN
42
40
  You can copy and paste the following tags into your HTML file.
43
41
 
44
-
45
42
  ```html
46
43
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sfgrp/distinguish/dist/style.css">
47
44
  <script src="https://cdn.jsdelivr.net/npm/@sfgrp/distinguish/dist/distinguish.umd.js"></script>
48
45
  ```
49
46
 
50
47
  ## Usage
51
- There are two ways to setup Interactive Keys. The easiest way is to let InteractiveKey auto discover your inputs automatically. For that, you simply need to provide a data attribute to your input.
48
+ There are two ways to setup Interactive Keys. The easiest way is to let InteractiveKey auto discover your inputs automatically. For that, you simply need to provide a data attribute on your element.
52
49
 
53
50
  ### Declarative
54
51
 
@@ -56,17 +53,16 @@ Add `data-interactive-key="true"` attribute to input elements to initialize it.
56
53
  To pass the options you need to add the prefix `data-` and write the option in kebab-case, like the following example:
57
54
 
58
55
  ```html
59
- <input
56
+ <div
60
57
  data-interactive-key="true"
61
58
  data-observation-matrix-id="1"
62
59
  data-project-token="xQ9bKrhfQtHYfro9t6YY0A"
63
60
  data-base-url="https://sfg.taxonworks.org/api/v1"
64
- >
61
+ ></div>
65
62
  ```
66
63
 
67
64
  ### Imperative
68
- You can initialize it by createInteractiveKey function
69
-
65
+ You can initialize it by `createInteractiveKey` function
70
66
 
71
67
  ```html
72
68
  <div id="interactive-key"></div>
@@ -91,12 +87,44 @@ const app = createInteractiveKey('#interactive-key', options)
91
87
  }
92
88
  }
93
89
  ```
94
-
95
- ## Building a key (in TaxonWorks)
90
+ ### Example page
91
+ This uses the [CDN](#cdn) and [Declaritive](#declarative) approach.
92
+ * Copy the text below into a file called `index.html`.
93
+ * Configure the `data-` options to point to your key.
94
+ * Open that file in your browser.
95
+
96
+ ```html
97
+ <!DOCTYPE html>
98
+ <html lang="en">
99
+ <head>
100
+ <meta charset="UTF-8" />
101
+ <link rel="icon" href="/favicon.ico" />
102
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sfgrp/distinguish@latest/dist/style.min.css" />
103
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
104
+ <title>Distinguish</title>
105
+ </head>
106
+ <body>
107
+ <div
108
+ data-interactive-key="true"
109
+ data-observation-matrix-id="1"
110
+ data-project-token="yourprojecttoken"
111
+ data-base-url="https://<your.taxonworks.server>/api/v1"
112
+ ></div>
113
+ <script src="https://cdn.jsdelivr.net/npm/@sfgrp/distinguish@latest/dist/distinguish.umd.min.js"></script>
114
+ </body>
115
+ </html>
116
+ ```
96
117
 
97
- Distinguish is based of interfaces available inside TaxonWorks. Those interfaces have many additional features facilitating curation, annotations, expansion, and editing of the underlying data.
118
+ ### Deploying a key on-line
119
+ [GitHub Pages](https://pages.github.com/) is perhaps the quickest way to deploy your key if you don't have access to your own server.
120
+ * Follow instructions above to setup your repository.
121
+ * Add a page to that repository that looks like the [example page](#example-page).
122
+
123
+ ## Building a key (in TaxonWorks)
124
+ Distinguish is based of interfaces available inside TaxonWorks. Those interfaces have many additional features facilitating the addition and management of images, curation, annotations, expansion, and editing of the underlying data. To start editing a key find a [TaxonWorks provider](https://docs.taxonworks.org/guide/start-a-project.html#finding-a-collaborating-provider), or [install your own instance](https://github.com/SpeciesFileGroup/install_taxonworks). Need help? [Chat on Gitter](https://gitter.im/SpeciesFileGroup/taxonworks) or [join a TaxonWorks event](https://speciesfilegroup.org/events.html).
98
125
 
99
126
  ## Contributing
127
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
100
128
 
101
- .. TODO .. simplify, add CONTRIBUTING.md
102
-
129
+ ## Lisence
130
+ Distinguish is open source and is presently available under the [University of Illinois/NCSA Open Source License](https://en.wikipedia.org/wiki/University_of_Illinois/NCSA_Open_Source_License).