@lsbjordao/type-taxon-script 1.1.8 → 1.1.9

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.
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const yargs_1 = __importDefault(require("yargs"));
7
+ const init_1 = __importDefault(require("./init"));
8
+ const new_1 = __importDefault(require("./new"));
9
+ const import_1 = __importDefault(require("./import"));
10
+ const export_1 = __importDefault(require("./export"));
11
+ const exportSources_1 = __importDefault(require("./exportSources"));
12
+ const exportToCsv_1 = __importDefault(require("./exportToCsv"));
13
+ const findProperty_1 = __importDefault(require("./findProperty"));
14
+ yargs_1.default.version();
15
+ yargs_1.default.command({
16
+ command: 'init',
17
+ describe: 'Initiate a TTS project',
18
+ builder: {},
19
+ handler: () => (0, init_1.default)(),
20
+ });
21
+ yargs_1.default.command({
22
+ command: 'new',
23
+ describe: 'Create a new description entry',
24
+ builder: {
25
+ genus: {
26
+ describe: 'Genus name',
27
+ demandOption: true,
28
+ type: 'string',
29
+ },
30
+ species: {
31
+ describe: 'Specific epithet',
32
+ demandOption: true,
33
+ type: 'string',
34
+ },
35
+ },
36
+ handler: (argv) => {
37
+ (0, new_1.default)(argv.genus, argv.species);
38
+ },
39
+ });
40
+ yargs_1.default.command({
41
+ command: 'import',
42
+ describe: 'Import taxa and characters from CSV file',
43
+ builder: {
44
+ genus: {
45
+ describe: 'Genus name',
46
+ demandOption: true,
47
+ type: 'string',
48
+ },
49
+ },
50
+ handler: (argv) => {
51
+ (0, import_1.default)(argv.genus);
52
+ },
53
+ });
54
+ yargs_1.default.command({
55
+ command: 'export',
56
+ describe: 'Export a JSON database',
57
+ builder: {
58
+ genus: {
59
+ describe: 'Genus name',
60
+ demandOption: true,
61
+ type: 'string',
62
+ },
63
+ load: {
64
+ describe: 'Load a list of taxa to export from the csv file: "./input/taxaToExport.csv".',
65
+ demandOption: false,
66
+ type: 'string',
67
+ choices: ['all', 'csv'],
68
+ default: 'all'
69
+ }
70
+ },
71
+ handler: (argv) => {
72
+ (0, export_1.default)(argv.genus, argv.load);
73
+ },
74
+ });
75
+ yargs_1.default.command({
76
+ command: 'exportSources',
77
+ describe: 'Export sources database',
78
+ builder: {
79
+ genus: {
80
+ describe: 'Genus name',
81
+ demandOption: true,
82
+ type: 'string',
83
+ },
84
+ },
85
+ handler: (argv) => {
86
+ (0, exportSources_1.default)(argv.genus);
87
+ },
88
+ });
89
+ yargs_1.default.command({
90
+ command: 'exportToCsv',
91
+ describe: 'Export a CSV database',
92
+ builder: {
93
+ genus: {
94
+ describe: 'Genus name',
95
+ demandOption: true,
96
+ type: 'string',
97
+ },
98
+ load: {
99
+ describe: 'Load a list of taxa to export from the csv file: "./input/taxaToExport.csv".',
100
+ demandOption: false,
101
+ type: 'string',
102
+ choices: ['all', 'csv'],
103
+ default: 'all'
104
+ }
105
+ },
106
+ handler: (argv) => {
107
+ (0, exportToCsv_1.default)(argv.genus, argv.load);
108
+ },
109
+ });
110
+ yargs_1.default.command({
111
+ command: 'findProperty',
112
+ describe: 'Find a property',
113
+ builder: {
114
+ property: {
115
+ describe: 'Property path to find',
116
+ demandOption: true,
117
+ type: 'string',
118
+ },
119
+ genus: {
120
+ describe: 'Genus name',
121
+ demandOption: true,
122
+ type: 'string',
123
+ }
124
+ },
125
+ handler: (argv) => {
126
+ (0, findProperty_1.default)(argv.property, argv.genus);
127
+ },
128
+ });
129
+ yargs_1.default
130
+ .parse();
package/dist/tts.js ADDED
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const yargs_1 = __importDefault(require("yargs"));
7
+ const init_1 = __importDefault(require("./init"));
8
+ const new_1 = __importDefault(require("./new"));
9
+ const import_1 = __importDefault(require("./import"));
10
+ const export_1 = __importDefault(require("./export"));
11
+ const exportSources_1 = __importDefault(require("./exportSources"));
12
+ const exportToCsv_1 = __importDefault(require("./exportToCsv"));
13
+ const findProperty_1 = __importDefault(require("./findProperty"));
14
+ yargs_1.default.version();
15
+ yargs_1.default.command({
16
+ command: 'init',
17
+ describe: 'Initiate a TTS project',
18
+ builder: {},
19
+ handler: () => (0, init_1.default)(),
20
+ });
21
+ yargs_1.default.command({
22
+ command: 'new',
23
+ describe: 'Create a new description entry',
24
+ builder: {
25
+ genus: {
26
+ describe: 'Genus name',
27
+ demandOption: true,
28
+ type: 'string',
29
+ },
30
+ species: {
31
+ describe: 'Specific epithet',
32
+ demandOption: true,
33
+ type: 'string',
34
+ },
35
+ },
36
+ handler: (argv) => {
37
+ (0, new_1.default)(argv.genus, argv.species);
38
+ },
39
+ });
40
+ yargs_1.default.command({
41
+ command: 'import',
42
+ describe: 'Import taxa and characters from CSV file',
43
+ builder: {
44
+ genus: {
45
+ describe: 'Genus name',
46
+ demandOption: true,
47
+ type: 'string',
48
+ },
49
+ },
50
+ handler: (argv) => {
51
+ (0, import_1.default)(argv.genus);
52
+ },
53
+ });
54
+ yargs_1.default.command({
55
+ command: 'export',
56
+ describe: 'Export a JSON database',
57
+ builder: {
58
+ genus: {
59
+ describe: 'Genus name',
60
+ demandOption: true,
61
+ type: 'string',
62
+ },
63
+ load: {
64
+ describe: 'Load a list of taxa to export from the csv file: "./input/taxaToExport.csv".',
65
+ demandOption: false,
66
+ type: 'string',
67
+ choices: ['all', 'csv'],
68
+ default: 'all'
69
+ }
70
+ },
71
+ handler: (argv) => {
72
+ (0, export_1.default)(argv.genus, argv.load);
73
+ },
74
+ });
75
+ yargs_1.default.command({
76
+ command: 'exportSources',
77
+ describe: 'Export sources database',
78
+ builder: {
79
+ genus: {
80
+ describe: 'Genus name',
81
+ demandOption: true,
82
+ type: 'string',
83
+ },
84
+ },
85
+ handler: (argv) => {
86
+ (0, exportSources_1.default)(argv.genus);
87
+ },
88
+ });
89
+ yargs_1.default.command({
90
+ command: 'exportToCsv',
91
+ describe: 'Export a CSV database',
92
+ builder: {
93
+ genus: {
94
+ describe: 'Genus name',
95
+ demandOption: true,
96
+ type: 'string',
97
+ },
98
+ load: {
99
+ describe: 'Load a list of taxa to export from the csv file: "./input/taxaToExport.csv".',
100
+ demandOption: false,
101
+ type: 'string',
102
+ choices: ['all', 'csv'],
103
+ default: 'all'
104
+ }
105
+ },
106
+ handler: (argv) => {
107
+ (0, exportToCsv_1.default)(argv.genus, argv.load);
108
+ },
109
+ });
110
+ yargs_1.default.command({
111
+ command: 'findProperty',
112
+ describe: 'Find a property',
113
+ builder: {
114
+ property: {
115
+ describe: 'Property path to find',
116
+ demandOption: true,
117
+ type: 'string',
118
+ },
119
+ genus: {
120
+ describe: 'Genus name',
121
+ demandOption: true,
122
+ type: 'string',
123
+ }
124
+ },
125
+ handler: (argv) => {
126
+ (0, findProperty_1.default)(argv.property, argv.genus);
127
+ },
128
+ });
129
+ yargs_1.default
130
+ .parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsbjordao/type-taxon-script",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
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",