@indra.ai/deva.veda 0.0.32 → 0.0.34

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 (99) hide show
  1. package/{LICENSE → LICENSE.md} +1 -1
  2. package/README.md +74 -4
  3. package/data/atharvaveda/books/01.json +325 -0
  4. package/data/atharvaveda/books/02.json +298 -0
  5. package/data/atharvaveda/books/03.json +289 -0
  6. package/data/atharvaveda/books/04.json +370 -0
  7. package/data/atharvaveda/books/05.json +289 -0
  8. package/data/atharvaveda/books/06.json +1288 -0
  9. package/data/atharvaveda/books/07.json +1072 -0
  10. package/data/atharvaveda/books/08.json +100 -0
  11. package/data/atharvaveda/books/09.json +100 -0
  12. package/data/atharvaveda/books/10.json +100 -0
  13. package/data/atharvaveda/books/11.json +100 -0
  14. package/data/atharvaveda/books/12.json +55 -0
  15. package/data/atharvaveda/books/13.json +46 -0
  16. package/data/atharvaveda/books/14.json +28 -0
  17. package/data/atharvaveda/books/15.json +172 -0
  18. package/data/atharvaveda/books/16.json +91 -0
  19. package/data/atharvaveda/books/17.json +19 -0
  20. package/data/atharvaveda/books/18.json +46 -0
  21. package/data/atharvaveda/books/19.json +658 -0
  22. package/data/atharvaveda/books/20.json +1297 -0
  23. package/data/atharvaveda/index.js +102 -0
  24. package/data/atharvaveda/index.json +191 -0
  25. package/data/index.js +0 -4
  26. package/data/{laws → manu}/index.js +9 -8
  27. package/data/menu.json +38 -0
  28. package/data/rigveda/01.json +1038 -878
  29. package/data/rigveda/02.json +240 -213
  30. package/data/rigveda/03.json +327 -274
  31. package/data/rigveda/04.json +319 -277
  32. package/data/rigveda/05.json +486 -444
  33. package/data/rigveda/06.json +406 -349
  34. package/data/rigveda/07.json +582 -527
  35. package/data/rigveda/08.json +555 -480
  36. package/data/rigveda/09.json +690 -581
  37. package/data/rigveda/10.json +1021 -851
  38. package/data/rigveda/books/01.json +1729 -0
  39. package/data/rigveda/books/02.json +397 -0
  40. package/data/rigveda/books/03.json +568 -0
  41. package/data/rigveda/books/04.json +532 -0
  42. package/data/rigveda/books/05.json +793 -0
  43. package/data/rigveda/books/06.json +685 -0
  44. package/data/rigveda/books/07.json +946 -0
  45. package/data/rigveda/books/08.json +937 -0
  46. package/data/rigveda/books/09.json +1036 -0
  47. package/data/rigveda/books/10.json +1729 -0
  48. package/data/rigveda/index.js +61 -26
  49. package/data/rigveda/index.json +47 -35
  50. package/data/samaveda/books/01.json +130 -0
  51. package/data/samaveda/books/02.json +130 -0
  52. package/data/samaveda/books/03.json +118 -0
  53. package/data/samaveda/books/04.json +130 -0
  54. package/data/samaveda/books/05.json +130 -0
  55. package/data/samaveda/books/06.json +118 -0
  56. package/data/samaveda/books/07.json +538 -0
  57. package/data/samaveda/books/08.json +466 -0
  58. package/data/samaveda/books/09.json +550 -0
  59. package/data/samaveda/books/10.json +466 -0
  60. package/data/samaveda/books/11.json +526 -0
  61. package/data/samaveda/books/12.json +598 -0
  62. package/data/samaveda/books/13.json +598 -0
  63. package/data/samaveda/books/14.json +610 -0
  64. package/data/samaveda/books/15.json +478 -0
  65. package/data/samaveda/index.js +140 -0
  66. package/data/samaveda/index.json +146 -0
  67. package/func/index.js +247 -0
  68. package/help/corpus.feecting +2 -4
  69. package/help/main.feecting +23 -5
  70. package/index.js +8 -303
  71. package/methods/index.js +199 -0
  72. package/package.json +110 -2
  73. package/data/agent.json +0 -46
  74. package/data/html/manu/01.html +0 -149
  75. package/data/html/manu/02.html +0 -281
  76. package/data/html/manu/03.html +0 -319
  77. package/data/html/manu/04.html +0 -291
  78. package/data/html/manu/05.html +0 -200
  79. package/data/html/manu/06.html +0 -127
  80. package/data/html/manu/07.html +0 -257
  81. package/data/html/manu/08.html +0 -452
  82. package/data/html/manu/09.html +0 -367
  83. package/data/html/manu/10.html +0 -162
  84. package/data/html/manu/11.html +0 -297
  85. package/data/html/manu/12.html +0 -156
  86. package/data/rigveda/links.json +0 -19
  87. package/data/vars.json +0 -90
  88. /package/data/{laws/manu → manu}/01.json +0 -0
  89. /package/data/{laws/manu → manu}/02.json +0 -0
  90. /package/data/{laws/manu → manu}/03.json +0 -0
  91. /package/data/{laws/manu → manu}/04.json +0 -0
  92. /package/data/{laws/manu → manu}/05.json +0 -0
  93. /package/data/{laws/manu → manu}/06.json +0 -0
  94. /package/data/{laws/manu → manu}/07.json +0 -0
  95. /package/data/{laws/manu → manu}/08.json +0 -0
  96. /package/data/{laws/manu → manu}/09.json +0 -0
  97. /package/data/{laws/manu → manu}/10.json +0 -0
  98. /package/data/{laws/manu → manu}/11.json +0 -0
  99. /package/data/{laws/manu → manu}/12.json +0 -0
@@ -0,0 +1,146 @@
1
+ {
2
+ "id": 2514530077156,
3
+ "title": "The Samaveda Books",
4
+ "describe": "The Samaveda, or Veda of Holy Songs, third in the usual order of enumeration of the three Vedas, ranks next in sanctity and liturgical importance to the Rgveda or Veda of Recited praise.",
5
+ "api": "data/samaveda/index.json",
6
+ "orig": "https://sacred-texts.com/hin/sv.htm",
7
+ "data": [
8
+ {
9
+ "id": 5475862947998,
10
+ "key": "01",
11
+ "title": "FIRST PART BOOK I",
12
+ "api": "data/samaveda/books/01.json",
13
+ "orig": "https://sacred-texts.com/hin/sv.htm",
14
+ "created": 1747959272657,
15
+ "hash": "md5-owCtZCOanb32Rzi+axHZMA=="
16
+ },
17
+ {
18
+ "id": 4550708923031,
19
+ "key": "02",
20
+ "title": "FIRST PART BOOK II",
21
+ "api": "data/samaveda/books/02.json",
22
+ "orig": "https://sacred-texts.com/hin/sv.htm",
23
+ "created": 1747959272660,
24
+ "hash": "md5-VPCrwkKJmifnEwicn5SLog=="
25
+ },
26
+ {
27
+ "id": 1401316237621,
28
+ "key": "03",
29
+ "title": "FIRST PART BOOK III",
30
+ "api": "data/samaveda/books/03.json",
31
+ "orig": "https://sacred-texts.com/hin/sv.htm",
32
+ "created": 1747959272663,
33
+ "hash": "md5-ExMezIJcOwYvO7mQgTQrJA=="
34
+ },
35
+ {
36
+ "id": 5110875944741,
37
+ "key": "04",
38
+ "title": "FIRST PART BOOK IV",
39
+ "api": "data/samaveda/books/04.json",
40
+ "orig": "https://sacred-texts.com/hin/sv.htm",
41
+ "created": 1747959272665,
42
+ "hash": "md5-ECMTnYTIZm8h38ZRevy32g=="
43
+ },
44
+ {
45
+ "id": 5633508371688,
46
+ "key": "05",
47
+ "title": "FIRST PART BOOK V",
48
+ "api": "data/samaveda/books/05.json",
49
+ "orig": "https://sacred-texts.com/hin/sv.htm",
50
+ "created": 1747959272667,
51
+ "hash": "md5-Xb9BISAQGFnq+nw06irjaA=="
52
+ },
53
+ {
54
+ "id": 5417218515778,
55
+ "key": "06",
56
+ "title": "FIRST PART BOOK VI",
57
+ "api": "data/samaveda/books/06.json",
58
+ "orig": "https://sacred-texts.com/hin/sv.htm",
59
+ "created": 1747959272669,
60
+ "hash": "md5-YbRU1jk168bQOajSeKnL4A=="
61
+ },
62
+ {
63
+ "id": 5967150591774,
64
+ "key": "07",
65
+ "title": "PART SECOND BOOK I",
66
+ "api": "data/samaveda/books/07.json",
67
+ "orig": "https://sacred-texts.com/hin/sv.htm",
68
+ "created": 1747959272672,
69
+ "hash": "md5-Te35gMaLsEsa2PSRbfxKdw=="
70
+ },
71
+ {
72
+ "id": 5069574048399,
73
+ "key": "08",
74
+ "title": "PART SECOND BOOK II",
75
+ "api": "data/samaveda/books/08.json",
76
+ "orig": "https://sacred-texts.com/hin/sv.htm",
77
+ "created": 1747959272678,
78
+ "hash": "md5-8BOVamovAWphKiLJPXtDHg=="
79
+ },
80
+ {
81
+ "id": 6097426715053,
82
+ "key": "09",
83
+ "title": "PART SECOND BOOK III",
84
+ "api": "data/samaveda/books/09.json",
85
+ "orig": "https://sacred-texts.com/hin/sv.htm",
86
+ "created": 1747959272683,
87
+ "hash": "md5-Pjc42d5C0HZgkuTJHDgf6w=="
88
+ },
89
+ {
90
+ "id": 4225096410865,
91
+ "key": 10,
92
+ "title": "PART SECOND BOOK IV",
93
+ "api": "data/samaveda/books/10.json",
94
+ "orig": "https://sacred-texts.com/hin/sv.htm",
95
+ "created": 1747959272689,
96
+ "hash": "md5-wxZOF2e9hLF6hMlr8SlKBA=="
97
+ },
98
+ {
99
+ "id": 3690617807069,
100
+ "key": 11,
101
+ "title": "PART SECOND BOOK V",
102
+ "api": "data/samaveda/books/11.json",
103
+ "orig": "https://sacred-texts.com/hin/sv.htm",
104
+ "created": 1747959272694,
105
+ "hash": "md5-OHaDIVwVQt4cJDGw3maong=="
106
+ },
107
+ {
108
+ "id": 1362609527932,
109
+ "key": 12,
110
+ "title": "PART SECOND BOOK VI",
111
+ "api": "data/samaveda/books/12.json",
112
+ "orig": "https://sacred-texts.com/hin/sv.htm",
113
+ "created": 1747959272699,
114
+ "hash": "md5-Zba2xLtKXpXXnGADs6K5ZQ=="
115
+ },
116
+ {
117
+ "id": 6782284153382,
118
+ "key": 13,
119
+ "title": "PART SECOND BOOK VII",
120
+ "api": "data/samaveda/books/13.json",
121
+ "orig": "https://sacred-texts.com/hin/sv.htm",
122
+ "created": 1747959272704,
123
+ "hash": "md5-BK1n9/OVNcIfwUKIXESfCQ=="
124
+ },
125
+ {
126
+ "id": 3446500474738,
127
+ "key": 14,
128
+ "title": "PART SECOND BOOK VIII",
129
+ "api": "data/samaveda/books/14.json",
130
+ "orig": "https://sacred-texts.com/hin/sv.htm",
131
+ "created": 1747959272709,
132
+ "hash": "md5-m1GIXz5+3/hkUHMJSvpwSA=="
133
+ },
134
+ {
135
+ "id": 6700751961261,
136
+ "key": 15,
137
+ "title": "PART SECOND BOOK IX",
138
+ "api": "data/samaveda/books/15.json",
139
+ "orig": "https://sacred-texts.com/hin/sv.htm",
140
+ "created": 1747959272714,
141
+ "hash": "md5-JDfBxWhV4Thriy/unA/iOA=="
142
+ }
143
+ ],
144
+ "created": 1747959272649,
145
+ "hash": "md5-o5rAb2vZ0JMODqKF7yqDfw=="
146
+ }
package/func/index.js ADDED
@@ -0,0 +1,247 @@
1
+ "use strict"
2
+
3
+ import {laws} from '../data/manu/index.js';
4
+ import {avbooks} from '../data/atharvaveda/index.js';
5
+
6
+ // set the __dirname
7
+ import {dirname} from 'node:path';
8
+ import {fileURLToPath} from 'node:url';
9
+ const __dirname = dirname(fileURLToPath(import.meta.url));
10
+
11
+ export const func = {
12
+ /**************
13
+ func: menu
14
+ params: none
15
+ describe: Returns the knowledge menu.
16
+ ***************/
17
+ menu() {
18
+ this.action('func', 'menu');
19
+ return new Promise((resolve, reject) => {
20
+ try {
21
+ const agent = this.agent();
22
+ const menufile = this.lib.path.join(__dirname, '..', 'data', 'menu.json');
23
+ const menudata = this.lib.fs.readFileSync(menufile);
24
+ const menujson = JSON.parse(menudata);
25
+
26
+ this.state('set', 'menu data');
27
+ const text = [
28
+ `::BEGIN:MENU:${menujson.id}`,
29
+ `## ${menujson.title}`,
30
+ `p: ${menujson.describe}`,
31
+ '::begin:menu',
32
+ ];
33
+ const menu = [];
34
+ // loop over the data and format it into a feecting command string
35
+ JSON.parse(menudata).data.forEach((item, idx) => {
36
+ menu.push(`button[${item.title}]:${item.cmd}`);
37
+ });
38
+ const menutext = menu.join('\n');
39
+ const menuhash = this.lib.hash(menutext);
40
+ text.push(menutext);
41
+
42
+ text.push(`::end:menu`);
43
+ text.push(`::begin:hidden`);
44
+ text.push(`#color = {{profile.color}}`);
45
+ text.push(`#bgcolor = {{profile.bgcolor}}`);
46
+ text.push(`#bg = {{profile.background}}`);
47
+ text.push(`::end:hidden`);
48
+ text.push(`::END:MENU:${menuhash}`);
49
+ this.state('resolve', 'menu');
50
+ return resolve({
51
+ id: menujson.id,
52
+ title: menujson.title,
53
+ describe: menujson.describe,
54
+ text: text.join('\n'),
55
+ data: menujson,
56
+ hash: menuhash,
57
+ created: Date.now(),
58
+ });
59
+ } catch (e) {
60
+ this.state('reject', 'books');
61
+ return reject(e);
62
+ }
63
+ });
64
+ },
65
+ /**************
66
+ func: books
67
+ params: opts
68
+ describe: Return a list of books based on section identifier.
69
+ ***************/
70
+ books(opts) {
71
+ this.action('func', 'books');
72
+ return new Promise((resolve, reject) => {
73
+ try {
74
+ const agent = this.agent();
75
+ const section = opts.meta.params[1];
76
+ const booksfile = this.lib.path.join(__dirname, '..', 'data', section, 'index.json');
77
+ const booksdata = this.lib.fs.readFileSync(booksfile);
78
+ const booksjson = JSON.parse(booksdata);
79
+
80
+ this.state('set', 'books data');
81
+ const text = [
82
+ `::BEGIN:BOOKS:${booksjson.id}`,
83
+ `## ${booksjson.title}`,
84
+ `p: ${booksjson.describe}`,
85
+ '::begin:buttons',
86
+ `button[🗂️ Main]:${this.askChr}${agent.key} menu`,
87
+ '::end:buttons',
88
+ '::begin:menu',
89
+ ];
90
+ const books = [];
91
+ // loop over the data and format it into a feecting command string
92
+ booksjson.data.forEach((book, idx) => {
93
+ books.push(`button[${book.title}]:${this.askChr}${agent.key} book:${section}:${book.key}`);
94
+ });
95
+ const booktext = books.join('\n');
96
+ const bookshash = this.lib.hash(booktext);
97
+ text.push(booktext);
98
+ text.push(`::end:menu`);
99
+ text.push(`::begin:hidden`);
100
+ text.push(`#color = {{profile.color}}`);
101
+ text.push(`#bgcolor = {{profile.bgcolor}}`);
102
+ text.push(`#bg = {{profile.background}}`);
103
+ text.push(`::end:hidden`);
104
+ text.push(`::END:BOOKS:${bookshash}`);
105
+ this.state('resolve', 'books');
106
+ return resolve({
107
+ id: booksjson.id,
108
+ title: booksjson.title,
109
+ describe: booksjson.describe,
110
+ text: text.join('\n'),
111
+ data: booksjson.data,
112
+ hash: bookshash,
113
+ created: Date.now(),
114
+ });
115
+ } catch (e) {
116
+ this.state('reject', 'books');
117
+ return reject(e);
118
+ }
119
+ });
120
+ },
121
+ /***********
122
+ func: book
123
+ params: opts
124
+ describe: The book function calls the public facing api to get a listing of books to list to the user. originally this file came from sacred-texts.com but was migrated to indra.church with a json api.
125
+ ***********/
126
+ book(opts) {
127
+ const section = opts.meta.params[1] || false;
128
+ const book = opts.meta.params[2] || false;
129
+ this.action('func', `${section} book ${book}`);
130
+ return new Promise((resolve, reject) => {
131
+ if (!book) return resolve(this.vars.messages.nobook);
132
+ try {
133
+ const agent = this.agent();
134
+ const key = book.length < 2 ? `0${book}` : book;
135
+ const filepath = this.lib.path.join(__dirname, '..', 'data', section, `${key}.json`)
136
+ const theFile = this.lib.fs.readFileSync(filepath);
137
+ const theJSON = JSON.parse(theFile);
138
+
139
+ const {id, title, describe, DATA} = theJSON;
140
+
141
+ this.state('set', `book data`);
142
+ const _text = [
143
+ `::BEGIN:BOOK:${id}`,
144
+ `## ${title}`,
145
+ `p: ${describe}`,
146
+ '::begin:buttons',
147
+ `button[🗂️ Main]:${this.askChr}${agent.key} menu`,
148
+ `button[📚 Books]:${this.askChr}${agent.key} books:${section}`,
149
+ '::end:buttons',
150
+ '::begin:menu',
151
+ ];
152
+ const _hymns = [];
153
+ DATA.forEach((hymn, idx) => {
154
+ _hymns.push(`button[${hymn.key} - ${hymn.title}]:#${agent.key} hymn ${hymn.key}`);
155
+ });
156
+ const _hymnsText = _hymns.join('\n');
157
+ const _hymnsHash = this.lib.hash(_hymnsText);
158
+ _text.push(_hymnsText);
159
+ _text.push(`::end:menu`);
160
+ _text.push(`::begin:hidden`);
161
+ _text.push(`#color = {{profile.color}}`);
162
+ _text.push(`#bgcolor = {{profile.bgcolor}}`);
163
+ _text.push(`#bg = {{profile.background}}`);
164
+ _text.push(`::end:hidden`);
165
+ _text.push(`::END:BOOK:${_hymnsHash}`);
166
+
167
+ this.state('resolve', `${section} book ${book}`)
168
+ return resolve({
169
+ id,
170
+ title,
171
+ describe,
172
+ text: _text.join('\n'),
173
+ data: DATA,
174
+ hash: this.lib.hash(JSON.stringify(DATA)),
175
+ created: Date.now(),
176
+ });
177
+ } catch (e) {
178
+ this.state('reject', `${section} book ${book}`)
179
+ return reject(e);
180
+ }
181
+ });
182
+ },
183
+
184
+ /**************
185
+ func: hymn
186
+ params: packet
187
+ describe: The View function returns a specific hymn from one of the Books.
188
+ ***************/
189
+ hymn(h) {
190
+ this.action('func', `hymn ${h}`);
191
+ return new Promise((resolve, reject) => {
192
+ if (!h) return resolve(this._messages.notext);
193
+ const id = this.lib.uid();
194
+ const agent = this.agent();
195
+
196
+ try {
197
+ const hymnPath = this.lib.path.join(__dirname, 'data', 'rigveda', 'hymns', `${h}.json`);
198
+ const hymnExists = this.lib.fs.existsSync(hymnPath);
199
+ if (!hymnExists) return resolve(this.vars.messages.notfound);
200
+ // parse hymns
201
+ const theFile = this.lib.fs.readFileSync(hymnPath);
202
+ const _hymn = JSON.parse(theFile);
203
+ const processed = this.utils.process({key:_hymn.key,title:_hymn.title,content:_hymn.orig});
204
+
205
+ this.state('set', `hymn ${h}`);
206
+ const hymn = [
207
+ `::BEGIN:HYMN:${processed.key}`,
208
+ `# ${processed.title}`,
209
+ '::begin:content',
210
+ processed.text,
211
+ '::end:content',
212
+ '::begin:meta',
213
+ `title: ${processed.title}`,
214
+ processed.people.length ? `people: ${processed.people.join(', ')}` : '',
215
+ processed.places.length ? `places: ${processed.places.join(', ')}` : '',
216
+ processed.things.length ? `things: ${processed.things.join(', ')}` : '',
217
+ processed.groups.length ? `groups: ${processed.groups.join(', ')}` : '',
218
+ processed.concepts.length ? `concepts: ${processed.concepts.join(', ')}` : '',
219
+ '::end:meta',
220
+ `::begin:hidden`,
221
+ `#color = {{profile.color}}`,
222
+ `#bgcolor = {{profile.bgcolor}}`,
223
+ `#bg = {{profile.background}}`,
224
+ `::end:hidden`,
225
+ `::END:HYMN:${this.lib.hash(processed)}`,
226
+ ];
227
+
228
+ this.state('resolve', `hymn ${h}`)
229
+ return resolve({
230
+ id,
231
+ key: processed.key,
232
+ book: processed.book,
233
+ text: hymn.join('\n'),
234
+ html:false,
235
+ data: processed,
236
+ created: Date.now(),
237
+ });
238
+ } catch (e) {
239
+ this.state('reject', `hymn ${h}`)
240
+ return reject(e);
241
+ }
242
+ });
243
+ },
244
+ laws,
245
+ avbooks,
246
+ }
247
+
@@ -1,12 +1,10 @@
1
+ ::BEGIN:MAIN
1
2
  # {{agent.name}}
2
3
 
3
4
  {{profile}}
4
5
 
5
- talk: #algorithm file:public main:header
6
- talk: #security file:public main:header
7
- talk: #legal file:public main:header
8
-
9
6
  p: A hermit is he who regulates his conduct entirely according to the Institutes proclaimed by Vikhanas.
10
7
  A Vaikhânasa (shall live) in the forest, subsisting on roots and fruit, practising austerities and bathing at morn, noon, and eve; he shall kindle a fire according to the Srâmanaka (rule); he shall eat wild-growing (vegetables and grain) only; he shall worship gods, manes, Bhûtas, men, and Rishis; he shall receive hospitably (men of) all (castes) except those (with whom intercourse is) forbidden; he may even use the flesh of animals killed by carnivorous beasts; he shall not step on ploughed (land); and he shall not enter a village; he shall wear his hair in braids, and dress in (garments made of) bark or skins; he shall not eat anything that has been hoarded for more than a year.
11
8
 
12
9
  copyright: ©2025 Quinn Michaels
10
+ ::END:MAIN
@@ -1,11 +1,28 @@
1
+ ::BEGIN:MAIN
2
+ ::begin:buttons
3
+ button[Help]:#veda help
4
+ button[Menu]:#veda menu
5
+ ::end:buttons
6
+
1
7
  # {{profile.name}}
2
8
 
3
9
  {{profile}}
4
10
 
5
- ::begin:buttons
6
- button[Books]:#veda books
7
- button[Laws]:#veda help laws/main
8
- ::end:buttons
11
+ ## Functions
12
+
13
+ ::begin:menu
14
+ ### Menu
15
+ params: none
16
+ describe: Returns the knowledge menu.
17
+ example: this.func.menu();
18
+ ::end:menu
19
+
20
+ ::begin:books
21
+ ### Menu
22
+ params: opts
23
+ describe: Returns list of books based on section identifier.
24
+ example: this.func.books(opts);
25
+ ::end:books
9
26
 
10
27
  ## Methods
11
28
  p: These methods are built into {{profile.name}} to the Vedic Books.
@@ -44,4 +61,5 @@ Rakshasas, Suparnas, and a Kimnaras,
44
61
  ::end:hidden
45
62
  copyright: (c)2025 Quinn Michaels
46
63
 
47
- Pushkara > Patala > Hiranyapura > Rasatala > Bhogavati
64
+ tags: Pushkara > Patala > Hiranyapura > Rasatala > Bhogavati
65
+ ::END:MAIN