@lsbjordao/type-taxon-script 1.0.2 → 1.0.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.
- package/package.json +1 -1
- package/readme.html +398 -0
- package/readme.md +60 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lsbjordao/type-taxon-script",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"author": "Lucas Jordão <tucarj@gmail.com> & André Eppinghaus <andreeppinghaus@gmail.com> & Vicente Calfo <vicentecalfo@gmail.com>",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "TypeTaxonScript",
|
package/readme.html
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
|
|
3
|
+
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="generator" content="quarto-1.4.37">
|
|
6
|
+
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
<title>readme</title>
|
|
11
|
+
<style>
|
|
12
|
+
code{white-space: pre-wrap;}
|
|
13
|
+
span.smallcaps{font-variant: small-caps;}
|
|
14
|
+
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
|
15
|
+
div.column{flex: auto; overflow-x: auto;}
|
|
16
|
+
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
|
17
|
+
ul.task-list{list-style: none;}
|
|
18
|
+
ul.task-list li input[type="checkbox"] {
|
|
19
|
+
width: 0.8em;
|
|
20
|
+
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
}
|
|
23
|
+
/* CSS for syntax highlighting */
|
|
24
|
+
pre > code.sourceCode { white-space: pre; position: relative; }
|
|
25
|
+
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
|
|
26
|
+
pre > code.sourceCode > span:empty { height: 1.2em; }
|
|
27
|
+
.sourceCode { overflow: visible; }
|
|
28
|
+
code.sourceCode > span { color: inherit; text-decoration: inherit; }
|
|
29
|
+
div.sourceCode { margin: 1em 0; }
|
|
30
|
+
pre.sourceCode { margin: 0; }
|
|
31
|
+
@media screen {
|
|
32
|
+
div.sourceCode { overflow: auto; }
|
|
33
|
+
}
|
|
34
|
+
@media print {
|
|
35
|
+
pre > code.sourceCode { white-space: pre-wrap; }
|
|
36
|
+
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
|
|
37
|
+
}
|
|
38
|
+
pre.numberSource code
|
|
39
|
+
{ counter-reset: source-line 0; }
|
|
40
|
+
pre.numberSource code > span
|
|
41
|
+
{ position: relative; left: -4em; counter-increment: source-line; }
|
|
42
|
+
pre.numberSource code > span > a:first-child::before
|
|
43
|
+
{ content: counter(source-line);
|
|
44
|
+
position: relative; left: -1em; text-align: right; vertical-align: baseline;
|
|
45
|
+
border: none; display: inline-block;
|
|
46
|
+
-webkit-touch-callout: none; -webkit-user-select: none;
|
|
47
|
+
-khtml-user-select: none; -moz-user-select: none;
|
|
48
|
+
-ms-user-select: none; user-select: none;
|
|
49
|
+
padding: 0 4px; width: 4em;
|
|
50
|
+
}
|
|
51
|
+
pre.numberSource { margin-left: 3em; padding-left: 4px; }
|
|
52
|
+
div.sourceCode
|
|
53
|
+
{ }
|
|
54
|
+
@media screen {
|
|
55
|
+
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<script src="readme_files/libs/clipboard/clipboard.min.js"></script>
|
|
61
|
+
<script src="readme_files/libs/quarto-html/quarto.js"></script>
|
|
62
|
+
<script src="readme_files/libs/quarto-html/popper.min.js"></script>
|
|
63
|
+
<script src="readme_files/libs/quarto-html/tippy.umd.min.js"></script>
|
|
64
|
+
<script src="readme_files/libs/quarto-html/anchor.min.js"></script>
|
|
65
|
+
<link href="readme_files/libs/quarto-html/tippy.css" rel="stylesheet">
|
|
66
|
+
<link href="readme_files/libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
|
|
67
|
+
<script src="readme_files/libs/bootstrap/bootstrap.min.js"></script>
|
|
68
|
+
<link href="readme_files/libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
|
|
69
|
+
<link href="readme_files/libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
</head>
|
|
73
|
+
|
|
74
|
+
<body class="fullcontent">
|
|
75
|
+
|
|
76
|
+
<div id="quarto-content" class="page-columns page-rows-contents page-layout-article">
|
|
77
|
+
|
|
78
|
+
<main class="content" id="quarto-document-content">
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<section id="typetaxonscript-tts" class="level1">
|
|
83
|
+
<h1>TypeTaxonScript (TTS)</h1>
|
|
84
|
+
<section id="install-node.js" class="level2">
|
|
85
|
+
<h2 class="anchored" data-anchor-id="install-node.js">Install Node.js</h2>
|
|
86
|
+
<p>Before you begin, ensure that Node.js is installed on your system. Node.js is essential for running JavaScript applications on your machine. You can download and install it from the official Node.js website (https://nodejs.org/).</p>
|
|
87
|
+
</section>
|
|
88
|
+
<section id="install-git" class="level2">
|
|
89
|
+
<h2 class="anchored" data-anchor-id="install-git">Install Git</h2>
|
|
90
|
+
<p>Ensure that Git (https://git-scm.com/) is installed on your system.</p>
|
|
91
|
+
</section>
|
|
92
|
+
<section id="install-visual-studio-code" class="level2">
|
|
93
|
+
<h2 class="anchored" data-anchor-id="install-visual-studio-code">Install Visual Studio Code</h2>
|
|
94
|
+
<p>Visual Studio Code (VS Code) is a versatile code editor that provides a user-friendly interface and a plethora of extensions for enhanced development. Download and install VS Code from its official website (https://code.visualstudio.com/) to utilize its features for your project.</p>
|
|
95
|
+
</section>
|
|
96
|
+
<section id="clone-the-repository-from-github-in-vs-code" class="level2">
|
|
97
|
+
<h2 class="anchored" data-anchor-id="clone-the-repository-from-github-in-vs-code">Clone the repository from GitHub in VS Code</h2>
|
|
98
|
+
<p>To clone the <em>Mimosa</em> project repository for TTS from GitHub, follow these steps:</p>
|
|
99
|
+
<ol type="1">
|
|
100
|
+
<li>In VS Code, access the Command Palette by pressing <code>Ctrl + Shift + P</code> (Windows/Linux) or <code>Cmd + Shift + P</code> (macOS).</li>
|
|
101
|
+
<li>Type <code>Git: Clone</code> and select the option that appears.</li>
|
|
102
|
+
<li>A text field will appear at the top of the window. Enter the URL of the repository you want to clone. In this case, use <code>https://github.com/lsbjordao/TTS-Mimosa</code>.</li>
|
|
103
|
+
<li>Choose a local directory where you want to clone the repository to.</li>
|
|
104
|
+
</ol>
|
|
105
|
+
<p>We highly recommend using a path for cloning the repository that excludes spaces (<code></code>) or any other unconventional text characters. This precaution ensures that files can be easily opened by simply pressing <code>Ctrl</code> + clicking on the file path within the IDE’s console.</p>
|
|
106
|
+
</section>
|
|
107
|
+
<section id="open-the-tts-project-directory-in-vs-code" class="level2">
|
|
108
|
+
<h2 class="anchored" data-anchor-id="open-the-tts-project-directory-in-vs-code">Open the TTS project directory in VS Code</h2>
|
|
109
|
+
<p>To open the TTS project directory in VS Code:</p>
|
|
110
|
+
<ol type="1">
|
|
111
|
+
<li>Click on <code>File</code> in the top menu.</li>
|
|
112
|
+
<li>Select <code>Open Folder</code> from the dropdown menu.</li>
|
|
113
|
+
<li>Navigate to the location where your TTS project (e.g., TTS-Mimosa) directory is stored.</li>
|
|
114
|
+
<li>Click on the TTS project directory to select it.</li>
|
|
115
|
+
<li>Click the <code>Open</code> button.</li>
|
|
116
|
+
</ol>
|
|
117
|
+
</section>
|
|
118
|
+
<section id="installing-tts-package" class="level2">
|
|
119
|
+
<h2 class="anchored" data-anchor-id="installing-tts-package">Installing TTS package</h2>
|
|
120
|
+
<p>Within VS Code, open your terminal and execute the command at the root, where is the <code>package.json</code>:</p>
|
|
121
|
+
<ol type="1">
|
|
122
|
+
<li>Navigate to the top menu and select <code>Terminal</code>.</li>
|
|
123
|
+
<li>From the dropdown menu, choose <code>New Terminal</code>.</li>
|
|
124
|
+
<li>In the terminal, type and execute the following command: s</li>
|
|
125
|
+
</ol>
|
|
126
|
+
<div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">npm</span> install <span class="at">-g</span> @lsbjordao/type-taxon-script</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
|
127
|
+
<p>Install it globally using <code>-g</code> to prevent unnecessary dependencies from being installed within the TTS project directory. If one do not include <code>-g</code> argument, the <code>./node_modules</code> directory and <code>package.json</code> file will be inconveniently created in the TTS project directory.</p>
|
|
128
|
+
<p>To verify the installation of the TTS, use the following command to check the current version:</p>
|
|
129
|
+
<div class="sourceCode" id="cb2"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">tts</span> <span class="at">--version</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
|
130
|
+
<p>For comprehensive guidance on available commands and functionalities, access the help documentation using:</p>
|
|
131
|
+
<div class="sourceCode" id="cb3"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">tts</span> <span class="at">--help</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
|
132
|
+
</section>
|
|
133
|
+
</section>
|
|
134
|
+
|
|
135
|
+
</main>
|
|
136
|
+
<!-- /main column -->
|
|
137
|
+
<script id="quarto-html-after-body" type="application/javascript">
|
|
138
|
+
window.document.addEventListener("DOMContentLoaded", function (event) {
|
|
139
|
+
const toggleBodyColorMode = (bsSheetEl) => {
|
|
140
|
+
const mode = bsSheetEl.getAttribute("data-mode");
|
|
141
|
+
const bodyEl = window.document.querySelector("body");
|
|
142
|
+
if (mode === "dark") {
|
|
143
|
+
bodyEl.classList.add("quarto-dark");
|
|
144
|
+
bodyEl.classList.remove("quarto-light");
|
|
145
|
+
} else {
|
|
146
|
+
bodyEl.classList.add("quarto-light");
|
|
147
|
+
bodyEl.classList.remove("quarto-dark");
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const toggleBodyColorPrimary = () => {
|
|
151
|
+
const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
|
|
152
|
+
if (bsSheetEl) {
|
|
153
|
+
toggleBodyColorMode(bsSheetEl);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
toggleBodyColorPrimary();
|
|
157
|
+
const icon = "";
|
|
158
|
+
const anchorJS = new window.AnchorJS();
|
|
159
|
+
anchorJS.options = {
|
|
160
|
+
placement: 'right',
|
|
161
|
+
icon: icon
|
|
162
|
+
};
|
|
163
|
+
anchorJS.add('.anchored');
|
|
164
|
+
const isCodeAnnotation = (el) => {
|
|
165
|
+
for (const clz of el.classList) {
|
|
166
|
+
if (clz.startsWith('code-annotation-')) {
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
const clipboard = new window.ClipboardJS('.code-copy-button', {
|
|
173
|
+
text: function(trigger) {
|
|
174
|
+
const codeEl = trigger.previousElementSibling.cloneNode(true);
|
|
175
|
+
for (const childEl of codeEl.children) {
|
|
176
|
+
if (isCodeAnnotation(childEl)) {
|
|
177
|
+
childEl.remove();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return codeEl.innerText;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
clipboard.on('success', function(e) {
|
|
184
|
+
// button target
|
|
185
|
+
const button = e.trigger;
|
|
186
|
+
// don't keep focus
|
|
187
|
+
button.blur();
|
|
188
|
+
// flash "checked"
|
|
189
|
+
button.classList.add('code-copy-button-checked');
|
|
190
|
+
var currentTitle = button.getAttribute("title");
|
|
191
|
+
button.setAttribute("title", "Copied!");
|
|
192
|
+
let tooltip;
|
|
193
|
+
if (window.bootstrap) {
|
|
194
|
+
button.setAttribute("data-bs-toggle", "tooltip");
|
|
195
|
+
button.setAttribute("data-bs-placement", "left");
|
|
196
|
+
button.setAttribute("data-bs-title", "Copied!");
|
|
197
|
+
tooltip = new bootstrap.Tooltip(button,
|
|
198
|
+
{ trigger: "manual",
|
|
199
|
+
customClass: "code-copy-button-tooltip",
|
|
200
|
+
offset: [0, -8]});
|
|
201
|
+
tooltip.show();
|
|
202
|
+
}
|
|
203
|
+
setTimeout(function() {
|
|
204
|
+
if (tooltip) {
|
|
205
|
+
tooltip.hide();
|
|
206
|
+
button.removeAttribute("data-bs-title");
|
|
207
|
+
button.removeAttribute("data-bs-toggle");
|
|
208
|
+
button.removeAttribute("data-bs-placement");
|
|
209
|
+
}
|
|
210
|
+
button.setAttribute("title", currentTitle);
|
|
211
|
+
button.classList.remove('code-copy-button-checked');
|
|
212
|
+
}, 1000);
|
|
213
|
+
// clear code selection
|
|
214
|
+
e.clearSelection();
|
|
215
|
+
});
|
|
216
|
+
function tippyHover(el, contentFn) {
|
|
217
|
+
const config = {
|
|
218
|
+
allowHTML: true,
|
|
219
|
+
content: contentFn,
|
|
220
|
+
maxWidth: 500,
|
|
221
|
+
delay: 100,
|
|
222
|
+
arrow: false,
|
|
223
|
+
appendTo: function(el) {
|
|
224
|
+
return el.parentElement;
|
|
225
|
+
},
|
|
226
|
+
interactive: true,
|
|
227
|
+
interactiveBorder: 10,
|
|
228
|
+
theme: 'quarto',
|
|
229
|
+
placement: 'bottom-start'
|
|
230
|
+
};
|
|
231
|
+
window.tippy(el, config);
|
|
232
|
+
}
|
|
233
|
+
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
|
|
234
|
+
for (var i=0; i<noterefs.length; i++) {
|
|
235
|
+
const ref = noterefs[i];
|
|
236
|
+
tippyHover(ref, function() {
|
|
237
|
+
// use id or data attribute instead here
|
|
238
|
+
let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
|
|
239
|
+
try { href = new URL(href).hash; } catch {}
|
|
240
|
+
const id = href.replace(/^#\/?/, "");
|
|
241
|
+
const note = window.document.getElementById(id);
|
|
242
|
+
return note.innerHTML;
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
const xrefs = window.document.querySelectorAll('a.quarto-xref');
|
|
246
|
+
for (var i=0; i<xrefs.length; i++) {
|
|
247
|
+
const xref = xrefs[i];
|
|
248
|
+
tippyHover(xref, function() {
|
|
249
|
+
let href = xref.getAttribute('href');
|
|
250
|
+
try { href = new URL(href).hash; } catch {}
|
|
251
|
+
const id = href.replace(/^#\/?/, "");
|
|
252
|
+
const note = window.document.getElementById(id);
|
|
253
|
+
if (id.startsWith('sec-')) {
|
|
254
|
+
// Special case sections, only their first couple elements
|
|
255
|
+
const container = document.createElement("div");
|
|
256
|
+
if (note.children.length > 2) {
|
|
257
|
+
for (let i = 0; i < 2; i++) {
|
|
258
|
+
container.appendChild(note.children[i].cloneNode(true));
|
|
259
|
+
}
|
|
260
|
+
return container.innerHTML
|
|
261
|
+
} else {
|
|
262
|
+
return note.innerHTML;
|
|
263
|
+
}
|
|
264
|
+
} else {
|
|
265
|
+
return note.innerHTML;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
let selectedAnnoteEl;
|
|
270
|
+
const selectorForAnnotation = ( cell, annotation) => {
|
|
271
|
+
let cellAttr = 'data-code-cell="' + cell + '"';
|
|
272
|
+
let lineAttr = 'data-code-annotation="' + annotation + '"';
|
|
273
|
+
const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
|
|
274
|
+
return selector;
|
|
275
|
+
}
|
|
276
|
+
const selectCodeLines = (annoteEl) => {
|
|
277
|
+
const doc = window.document;
|
|
278
|
+
const targetCell = annoteEl.getAttribute("data-target-cell");
|
|
279
|
+
const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
|
|
280
|
+
const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
|
|
281
|
+
const lines = annoteSpan.getAttribute("data-code-lines").split(",");
|
|
282
|
+
const lineIds = lines.map((line) => {
|
|
283
|
+
return targetCell + "-" + line;
|
|
284
|
+
})
|
|
285
|
+
let top = null;
|
|
286
|
+
let height = null;
|
|
287
|
+
let parent = null;
|
|
288
|
+
if (lineIds.length > 0) {
|
|
289
|
+
//compute the position of the single el (top and bottom and make a div)
|
|
290
|
+
const el = window.document.getElementById(lineIds[0]);
|
|
291
|
+
top = el.offsetTop;
|
|
292
|
+
height = el.offsetHeight;
|
|
293
|
+
parent = el.parentElement.parentElement;
|
|
294
|
+
if (lineIds.length > 1) {
|
|
295
|
+
const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
|
|
296
|
+
const bottom = lastEl.offsetTop + lastEl.offsetHeight;
|
|
297
|
+
height = bottom - top;
|
|
298
|
+
}
|
|
299
|
+
if (top !== null && height !== null && parent !== null) {
|
|
300
|
+
// cook up a div (if necessary) and position it
|
|
301
|
+
let div = window.document.getElementById("code-annotation-line-highlight");
|
|
302
|
+
if (div === null) {
|
|
303
|
+
div = window.document.createElement("div");
|
|
304
|
+
div.setAttribute("id", "code-annotation-line-highlight");
|
|
305
|
+
div.style.position = 'absolute';
|
|
306
|
+
parent.appendChild(div);
|
|
307
|
+
}
|
|
308
|
+
div.style.top = top - 2 + "px";
|
|
309
|
+
div.style.height = height + 4 + "px";
|
|
310
|
+
let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
|
|
311
|
+
if (gutterDiv === null) {
|
|
312
|
+
gutterDiv = window.document.createElement("div");
|
|
313
|
+
gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
|
|
314
|
+
gutterDiv.style.position = 'absolute';
|
|
315
|
+
const codeCell = window.document.getElementById(targetCell);
|
|
316
|
+
const gutter = codeCell.querySelector('.code-annotation-gutter');
|
|
317
|
+
gutter.appendChild(gutterDiv);
|
|
318
|
+
}
|
|
319
|
+
gutterDiv.style.top = top - 2 + "px";
|
|
320
|
+
gutterDiv.style.height = height + 4 + "px";
|
|
321
|
+
}
|
|
322
|
+
selectedAnnoteEl = annoteEl;
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
const unselectCodeLines = () => {
|
|
326
|
+
const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
|
|
327
|
+
elementsIds.forEach((elId) => {
|
|
328
|
+
const div = window.document.getElementById(elId);
|
|
329
|
+
if (div) {
|
|
330
|
+
div.remove();
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
selectedAnnoteEl = undefined;
|
|
334
|
+
};
|
|
335
|
+
// Attach click handler to the DT
|
|
336
|
+
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
|
|
337
|
+
for (const annoteDlNode of annoteDls) {
|
|
338
|
+
annoteDlNode.addEventListener('click', (event) => {
|
|
339
|
+
const clickedEl = event.target;
|
|
340
|
+
if (clickedEl !== selectedAnnoteEl) {
|
|
341
|
+
unselectCodeLines();
|
|
342
|
+
const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
|
|
343
|
+
if (activeEl) {
|
|
344
|
+
activeEl.classList.remove('code-annotation-active');
|
|
345
|
+
}
|
|
346
|
+
selectCodeLines(clickedEl);
|
|
347
|
+
clickedEl.classList.add('code-annotation-active');
|
|
348
|
+
} else {
|
|
349
|
+
// Unselect the line
|
|
350
|
+
unselectCodeLines();
|
|
351
|
+
clickedEl.classList.remove('code-annotation-active');
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
const findCites = (el) => {
|
|
356
|
+
const parentEl = el.parentElement;
|
|
357
|
+
if (parentEl) {
|
|
358
|
+
const cites = parentEl.dataset.cites;
|
|
359
|
+
if (cites) {
|
|
360
|
+
return {
|
|
361
|
+
el,
|
|
362
|
+
cites: cites.split(' ')
|
|
363
|
+
};
|
|
364
|
+
} else {
|
|
365
|
+
return findCites(el.parentElement)
|
|
366
|
+
}
|
|
367
|
+
} else {
|
|
368
|
+
return undefined;
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
|
|
372
|
+
for (var i=0; i<bibliorefs.length; i++) {
|
|
373
|
+
const ref = bibliorefs[i];
|
|
374
|
+
const citeInfo = findCites(ref);
|
|
375
|
+
if (citeInfo) {
|
|
376
|
+
tippyHover(citeInfo.el, function() {
|
|
377
|
+
var popup = window.document.createElement('div');
|
|
378
|
+
citeInfo.cites.forEach(function(cite) {
|
|
379
|
+
var citeDiv = window.document.createElement('div');
|
|
380
|
+
citeDiv.classList.add('hanging-indent');
|
|
381
|
+
citeDiv.classList.add('csl-entry');
|
|
382
|
+
var biblioDiv = window.document.getElementById('ref-' + cite);
|
|
383
|
+
if (biblioDiv) {
|
|
384
|
+
citeDiv.innerHTML = biblioDiv.innerHTML;
|
|
385
|
+
}
|
|
386
|
+
popup.appendChild(citeDiv);
|
|
387
|
+
});
|
|
388
|
+
return popup.innerHTML;
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
</script>
|
|
394
|
+
</div> <!-- /content -->
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
</body></html>
|
package/readme.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# TypeTaxonScript (TTS)
|
|
2
|
+
|
|
3
|
+
## Install Node.js
|
|
4
|
+
|
|
5
|
+
Before you begin, ensure that Node.js is installed on your system. Node.js is essential for running JavaScript applications on your machine. You can download and install it from the official Node.js website (https://nodejs.org/).
|
|
6
|
+
|
|
7
|
+
## Install Git
|
|
8
|
+
|
|
9
|
+
Ensure that Git (https://git-scm.com/) is installed on your system.
|
|
10
|
+
|
|
11
|
+
## Install Visual Studio Code
|
|
12
|
+
|
|
13
|
+
Visual Studio Code (VS Code) is a versatile code editor that provides a user-friendly interface and a plethora of extensions for enhanced development. Download and install VS Code from its official website (https://code.visualstudio.com/) to utilize its features for your project.
|
|
14
|
+
|
|
15
|
+
## Clone the repository from GitHub in VS Code
|
|
16
|
+
|
|
17
|
+
To clone the *Mimosa* project repository for TTS from GitHub, follow these steps:
|
|
18
|
+
|
|
19
|
+
1. In VS Code, access the Command Palette by pressing `Ctrl + Shift + P` (Windows/Linux) or `Cmd + Shift + P` (macOS).
|
|
20
|
+
2. Type `Git: Clone` and select the option that appears.
|
|
21
|
+
3. A text field will appear at the top of the window. Enter the URL of the repository you want to clone. In this case, use `https://github.com/lsbjordao/TTS-Mimosa`.
|
|
22
|
+
4. Choose a local directory where you want to clone the repository to.
|
|
23
|
+
|
|
24
|
+
We highly recommend using a path for cloning the repository that excludes spaces (` `) or any other unconventional text characters. This precaution ensures that files can be easily opened by simply pressing `Ctrl` + clicking on the file path within the IDE's console.
|
|
25
|
+
|
|
26
|
+
## Open the TTS project directory in VS Code
|
|
27
|
+
|
|
28
|
+
To open the TTS project directory in VS Code:
|
|
29
|
+
|
|
30
|
+
1. Click on `File` in the top menu.
|
|
31
|
+
2. Select `Open Folder` from the dropdown menu.
|
|
32
|
+
3. Navigate to the location where your TTS project (e.g., TTS-Mimosa) directory is stored.
|
|
33
|
+
4. Click on the TTS project directory to select it.
|
|
34
|
+
5. Click the `Open` button.
|
|
35
|
+
|
|
36
|
+
## Installing TTS package
|
|
37
|
+
|
|
38
|
+
Within VS Code, open your terminal and execute the command at the root, where is the `package.json`:
|
|
39
|
+
|
|
40
|
+
1. Navigate to the top menu and select `Terminal`.
|
|
41
|
+
2. From the dropdown menu, choose `New Terminal`.
|
|
42
|
+
3. In the terminal, type and execute the following command:
|
|
43
|
+
s
|
|
44
|
+
```bash
|
|
45
|
+
npm install -g @lsbjordao/type-taxon-script
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Install it globally using `-g` to prevent unnecessary dependencies from being installed within the TTS project directory. If one do not include `-g` argument, the `./node_modules` directory and `package.json` file will be inconveniently created in the TTS project directory.
|
|
49
|
+
|
|
50
|
+
To verify the installation of the TTS, use the following command to check the current version:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
tts --version
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
For comprehensive guidance on available commands and functionalities, access the help documentation using:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
tts --help
|
|
60
|
+
```
|