manyfest 1.0.0 → 1.0.2
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/.config/configstore/update-notifier-npm.json +1 -1
- package/README.md +336 -10
- package/examples/chocula/Chocula.js +8 -0
- package/examples/chocula/Data-Archive-org-Frankenberry.json +246 -0
- package/examples/chocula/Schema-Archive-org-Item.json +47 -0
- package/package.json +2 -2
- package/source/Manyfest.js +146 -3
- package/test/Data-Archive-org-Frankenberry.json +246 -0
- package/test/Data-Yahoo-Weather.json +115 -0
- package/test/Manyfest_AdvancedObjectAccess_tests.js +80 -0
- package/test/Manyfest_ObjectAccess_tests.js +144 -0
- package/test/Manyfest_tests.js +2 -116
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ npm install --save Manyfest
|
|
|
37
37
|
|
|
38
38
|
Then, you can include it in your source code as follows:
|
|
39
39
|
|
|
40
|
-
```
|
|
40
|
+
```javascript
|
|
41
41
|
const libManyfest = require('Manyfest');
|
|
42
42
|
|
|
43
43
|
// Construct a Manyfest with a few defined columns
|
|
@@ -88,7 +88,7 @@ Addresses are meant to be kinda magic. They describe locations in nested JSON j
|
|
|
88
88
|
|
|
89
89
|
Let's use our Animal schema and extend it a little bit. In this case, a new JSON sub object needs to be included carrying important medical information about this animal.
|
|
90
90
|
|
|
91
|
-
```
|
|
91
|
+
```javascript
|
|
92
92
|
let animalManyfest = new libManyfest(
|
|
93
93
|
{
|
|
94
94
|
"Scope": "Animal",
|
|
@@ -108,7 +108,8 @@ let animalManyfest = new libManyfest(
|
|
|
108
108
|
"Name":"Comfortable Environmental Temperature",
|
|
109
109
|
"NameShort":"Comf Env Temp",
|
|
110
110
|
"Hash":"ComfET",
|
|
111
|
-
"Description":"The most comfortable temperature for this animal to survive in."
|
|
111
|
+
"Description":"The most comfortable temperature for this animal to survive in."
|
|
112
|
+
}
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
```
|
|
@@ -134,7 +135,7 @@ In the example below, the read and write code throws an error. You could work a
|
|
|
134
135
|
* write some kind of complex handler for it
|
|
135
136
|
* something else clever?
|
|
136
137
|
|
|
137
|
-
```
|
|
138
|
+
```javascript
|
|
138
139
|
// Write Code
|
|
139
140
|
let newAnimal = {};
|
|
140
141
|
|
|
@@ -142,7 +143,7 @@ let newAnimal = {};
|
|
|
142
143
|
newAnimal.MedicalStats.HeartReat.RestingHeartRate.OverallAverage = 61;
|
|
143
144
|
```
|
|
144
145
|
|
|
145
|
-
```
|
|
146
|
+
```javascript
|
|
146
147
|
// Read Code
|
|
147
148
|
let newAnimal = {};
|
|
148
149
|
|
|
@@ -157,7 +158,7 @@ console.log(newAnimal.MedicalStats.HeartReat.RestingHeartRate.OverallAverage);
|
|
|
157
158
|
|
|
158
159
|
However with the Manyfest reading and writing methods you can do this (all in one example since it doesn't blow up):
|
|
159
160
|
|
|
160
|
-
```
|
|
161
|
+
```javascript
|
|
161
162
|
let newAnimal = {};
|
|
162
163
|
|
|
163
164
|
// You can now try to access the value on a "clean" object...
|
|
@@ -178,7 +179,7 @@ console.log(animalManyfest.getValueAtAddress(newAnimal, "MedicalStats.HeartRate.
|
|
|
178
179
|
|
|
179
180
|
Because we have mappings to and from more human readable names to the addresses, we can happily use either the Name or Hash for these lookups. For instance, from the example above, if we have our Comfortable Environmental Temperature for an animal which was in the address `someAnimal.MedicalStats.Temps.CET` and had a hash of `ComfET`, a developer could easily access it by hash (assuming the `favoriteAnimalAPI` function returns a JSON representation of my favorite animal):
|
|
180
181
|
|
|
181
|
-
```
|
|
182
|
+
```javascript
|
|
182
183
|
let favAnimal = favoriteAnimalAPI();
|
|
183
184
|
|
|
184
185
|
console.log(animalManyfest.getValueByHash(favAnimal,'ComfET'));
|
|
@@ -190,7 +191,7 @@ For any elements that haven't defined a Hash, the Address is used. This allows
|
|
|
190
191
|
|
|
191
192
|
Sometimes we don't have schemas, and want to define object element structure on the fly. This can be done programmatically. As a refresher, here is how we loaded our simplest schema manifest above:
|
|
192
193
|
|
|
193
|
-
```
|
|
194
|
+
```javascript
|
|
194
195
|
const libManyfest = require('Manyfest');
|
|
195
196
|
|
|
196
197
|
// Construct a Manyfest with a few defined columns
|
|
@@ -208,7 +209,7 @@ let animalManyfest = new libManyfest(
|
|
|
208
209
|
|
|
209
210
|
The programmatic equivalent is the following code:
|
|
210
211
|
|
|
211
|
-
```
|
|
212
|
+
```javascript
|
|
212
213
|
const libManyfest = require('Manyfest');
|
|
213
214
|
|
|
214
215
|
// Construct a Manyfest with a few defined columns
|
|
@@ -231,4 +232,329 @@ Programmatic definition is interesting because you can start with a pre-defined
|
|
|
231
232
|
|
|
232
233
|
Have you ever tried to code against a weather API? They use *so many* different structures of data. And once you've used their structure, you are kindof stuck with it.
|
|
233
234
|
|
|
234
|
-
With manyfest, you can easily create a description for each API and code against getting values by hash. This abstracts the complexity of multiple API services without requiring you to marshal it into your own persistence format.
|
|
235
|
+
With manyfest, you can easily create a description for each API and code against getting values by hash. This abstracts the complexity of multiple API services without requiring you to marshal it into your own persistence format.
|
|
236
|
+
|
|
237
|
+
## Archive dot Org
|
|
238
|
+
|
|
239
|
+
Modern APIs are super complicated. And worse, they change. Let's take a real example. [Archive.org](https://archive.org/) is a wonderful resource for downloading awesome content gathered from the web and such.
|
|
240
|
+
|
|
241
|
+
There is an API to access their data. It's ... really messy, the data you get back. below is the JSON for a single video (a rad Count Chocula commercial from 1971) -- it takes quite a bit of scroll to get down to the bottom.
|
|
242
|
+
|
|
243
|
+

|
|
244
|
+
|
|
245
|
+
```JSON
|
|
246
|
+
{
|
|
247
|
+
"created": 1664830085,
|
|
248
|
+
"d1": "ia600202.us.archive.org",
|
|
249
|
+
"d2": "ia800202.us.archive.org",
|
|
250
|
+
"dir": "/7/items/FrankenberryCountChoculaTevevisionCommercial1971",
|
|
251
|
+
"files": [
|
|
252
|
+
{
|
|
253
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000001.jpg",
|
|
254
|
+
"source": "derivative",
|
|
255
|
+
"format": "Thumbnail",
|
|
256
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
257
|
+
"mtime": "1296336956",
|
|
258
|
+
"size": "838",
|
|
259
|
+
"md5": "e47269cd5a82db9594f265a65785ec12",
|
|
260
|
+
"crc32": "165c668b",
|
|
261
|
+
"sha1": "383303d9546c381267569ad4e33aff691f0bb8c7"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000004.jpg",
|
|
265
|
+
"source": "derivative",
|
|
266
|
+
"format": "Thumbnail",
|
|
267
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
268
|
+
"mtime": "1296336957",
|
|
269
|
+
"size": "6843",
|
|
270
|
+
"md5": "c93fa52000ab4665e69b25c403e11aff",
|
|
271
|
+
"crc32": "9444e6f6",
|
|
272
|
+
"sha1": "716b4f9950b8147f51d3265f9c62ff86451308d5"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000009.jpg",
|
|
276
|
+
"source": "derivative",
|
|
277
|
+
"format": "Thumbnail",
|
|
278
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
279
|
+
"mtime": "1296336957",
|
|
280
|
+
"size": "8388",
|
|
281
|
+
"md5": "30eb3eb4cbbdfa08d531a0a74da7c000",
|
|
282
|
+
"crc32": "be874a9e",
|
|
283
|
+
"sha1": "0c392d777609e967b6022be27edad678c5ae74e2"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000014.jpg",
|
|
287
|
+
"source": "derivative",
|
|
288
|
+
"format": "Thumbnail",
|
|
289
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
290
|
+
"mtime": "1296336958",
|
|
291
|
+
"size": "5993",
|
|
292
|
+
"md5": "4e9ebc3d076bec8cf7dfe76795f8c769",
|
|
293
|
+
"crc32": "912ec98c",
|
|
294
|
+
"sha1": "01dc49c852e1bbb421199450dd902935c62b06de"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000019.jpg",
|
|
298
|
+
"source": "derivative",
|
|
299
|
+
"format": "Thumbnail",
|
|
300
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
301
|
+
"mtime": "1296336958",
|
|
302
|
+
"size": "4951",
|
|
303
|
+
"md5": "59f190f0c5b0a048415b26412860b6dd",
|
|
304
|
+
"crc32": "a70a30b1",
|
|
305
|
+
"sha1": "a284af9757cb24d28f96ec88ec1b1c23a8cea9fe"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000024.jpg",
|
|
309
|
+
"source": "derivative",
|
|
310
|
+
"format": "Thumbnail",
|
|
311
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
312
|
+
"mtime": "1296336959",
|
|
313
|
+
"size": "3383",
|
|
314
|
+
"md5": "be2a908acd563b896e7758b598295148",
|
|
315
|
+
"crc32": "ed467831",
|
|
316
|
+
"sha1": "94c001e72ebc86d837a78c61a004db9ab9d597bd"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000029.jpg",
|
|
320
|
+
"source": "derivative",
|
|
321
|
+
"format": "Thumbnail",
|
|
322
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
323
|
+
"mtime": "1296336960",
|
|
324
|
+
"size": "3503",
|
|
325
|
+
"md5": "c82199d09be07633000fd07b363dd8a3",
|
|
326
|
+
"crc32": "a1fd79cb",
|
|
327
|
+
"sha1": "2bc8e761edb24a441fa5906dda1c424e1f98a47a"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971_archive.torrent",
|
|
331
|
+
"source": "metadata",
|
|
332
|
+
"btih": "de6b371e7cc3c83db1cc08150500753eae533409",
|
|
333
|
+
"mtime": "1542761794",
|
|
334
|
+
"size": "4093",
|
|
335
|
+
"md5": "a275d3b4028cccb5bea8b47a88c838af",
|
|
336
|
+
"crc32": "5ffa7334",
|
|
337
|
+
"sha1": "af8222637b574cba1360d0ea77e231640ffd43c4",
|
|
338
|
+
"format": "Archive BitTorrent"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971_files.xml",
|
|
342
|
+
"source": "metadata",
|
|
343
|
+
"format": "Metadata",
|
|
344
|
+
"md5": "3a7e87b08bed1e203a5858b31352c110"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971_meta.xml",
|
|
348
|
+
"source": "metadata",
|
|
349
|
+
"format": "Metadata",
|
|
350
|
+
"mtime": "1542761793",
|
|
351
|
+
"size": "1371",
|
|
352
|
+
"md5": "0b9c9bf21b9a26aea43a2f735b404624",
|
|
353
|
+
"crc32": "41077288",
|
|
354
|
+
"sha1": "22e6f2c73bf63072f671d846355da2785db51dbd"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971_reviews.xml",
|
|
358
|
+
"source": "original",
|
|
359
|
+
"mtime": "1466898697",
|
|
360
|
+
"size": "620",
|
|
361
|
+
"md5": "260bfba5d696772445dcc7ff6e6d5bdb",
|
|
362
|
+
"crc32": "25ea3229",
|
|
363
|
+
"sha1": "7d541f18fcd5ad9c6e593afe5a80f18771f23b32",
|
|
364
|
+
"format": "Metadata"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"name": "__ia_thumb.jpg",
|
|
368
|
+
"source": "original",
|
|
369
|
+
"mtime": "1539115881",
|
|
370
|
+
"size": "7481",
|
|
371
|
+
"md5": "8cec324fa0016fd77cc04e6a4b2ebb00",
|
|
372
|
+
"crc32": "d9e1b316",
|
|
373
|
+
"sha1": "4dab42952fe0405a3b7f80146636b33d7b1bd01e",
|
|
374
|
+
"format": "Item Tile",
|
|
375
|
+
"rotation": "0"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "frankerberry_countchockula_1971.0001.gif",
|
|
379
|
+
"source": "derivative",
|
|
380
|
+
"format": "Animated GIF",
|
|
381
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
382
|
+
"mtime": "1296336965",
|
|
383
|
+
"size": "101114",
|
|
384
|
+
"md5": "b78a13094030f104900eb996bafe2b7d",
|
|
385
|
+
"crc32": "6650cd8",
|
|
386
|
+
"sha1": "669798c037205cac14f70592deef6f7831b3d4a1"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "frankerberry_countchockula_1971.0001.mpg",
|
|
390
|
+
"source": "original",
|
|
391
|
+
"format": "MPEG2",
|
|
392
|
+
"mtime": "1296335803",
|
|
393
|
+
"size": "31625216",
|
|
394
|
+
"md5": "762ba18b026b85b3f074523e7fcb4db0",
|
|
395
|
+
"crc32": "42347f78",
|
|
396
|
+
"sha1": "41162dc2d1a91b618124c84628d0c231544a02be",
|
|
397
|
+
"length": "31.14",
|
|
398
|
+
"height": "480",
|
|
399
|
+
"width": "640"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "frankerberry_countchockula_1971.0001.mpg.idx",
|
|
403
|
+
"source": "derivative",
|
|
404
|
+
"format": "Video Index",
|
|
405
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
406
|
+
"mtime": "1296336956",
|
|
407
|
+
"size": "31141",
|
|
408
|
+
"md5": "49423e072726e4ea3cdd8ebdd26c7dfc",
|
|
409
|
+
"crc32": "ae969a68",
|
|
410
|
+
"sha1": "805782cd2d0f9002555816daadf3b8607e621f79"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "frankerberry_countchockula_1971.0001.ogv",
|
|
414
|
+
"source": "derivative",
|
|
415
|
+
"format": "Ogg Video",
|
|
416
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
417
|
+
"mtime": "1296336994",
|
|
418
|
+
"size": "2248166",
|
|
419
|
+
"md5": "f1b933e97ce63594fb28a0a019ff3436",
|
|
420
|
+
"crc32": "a2a0e5e9",
|
|
421
|
+
"sha1": "a6bf0aec9f006baeca37c03f586686ebe685d59b",
|
|
422
|
+
"length": "31.15",
|
|
423
|
+
"height": "300",
|
|
424
|
+
"width": "400"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "frankerberry_countchockula_1971.0001_512kb.mp4",
|
|
428
|
+
"source": "derivative",
|
|
429
|
+
"format": "512Kb MPEG4",
|
|
430
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
431
|
+
"mtime": "1296336977",
|
|
432
|
+
"size": "2378677",
|
|
433
|
+
"md5": "a7750839519c61ba3bb99fc66b32011d",
|
|
434
|
+
"crc32": "4dbd37c8",
|
|
435
|
+
"sha1": "3929314c192dec006fac2739bcb4730788e8c068",
|
|
436
|
+
"length": "31.13",
|
|
437
|
+
"height": "240",
|
|
438
|
+
"width": "320"
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
"files_count": 17,
|
|
442
|
+
"item_last_updated": 1542761794,
|
|
443
|
+
"item_size": 36431778,
|
|
444
|
+
"metadata": {
|
|
445
|
+
"identifier": "FrankenberryCountChoculaTevevisionCommercial1971",
|
|
446
|
+
"title": "Franken Berry / Count Chocula : Tevevision Commercial 1971",
|
|
447
|
+
"creator": "General Mills",
|
|
448
|
+
"mediatype": "movies",
|
|
449
|
+
"collection": [
|
|
450
|
+
"classic_tv_commercials",
|
|
451
|
+
"television"
|
|
452
|
+
],
|
|
453
|
+
"description": "Count Chocula and Franken Berry were both introduced in 1971. Boo Berry Cereal appeared in 1973 followed by Fruit Brute in 1974. Yummy Mummy appeared more than a decade later in 1988 - completing the the group known as the General Mills Monster Cereals.",
|
|
454
|
+
"subject": "Third Eye Cinema; Classic Television Commercials; animation; cartoons;General Mills",
|
|
455
|
+
"licenseurl": "http://creativecommons.org/publicdomain/mark/1.0/",
|
|
456
|
+
"publicdate": "2011-01-29 21:36:42",
|
|
457
|
+
"addeddate": "2011-01-29 21:35:38",
|
|
458
|
+
"uploader": "bolexman@msn.com",
|
|
459
|
+
"updater": [
|
|
460
|
+
"Bolexman",
|
|
461
|
+
"Bolexman",
|
|
462
|
+
"Jeff Kaplan"
|
|
463
|
+
],
|
|
464
|
+
"updatedate": [
|
|
465
|
+
"2011-01-29 21:45:38",
|
|
466
|
+
"2011-01-29 21:55:46",
|
|
467
|
+
"2011-01-29 23:04:55"
|
|
468
|
+
],
|
|
469
|
+
"sound": "sound",
|
|
470
|
+
"color": "color",
|
|
471
|
+
"runtime": "0:31",
|
|
472
|
+
"backup_location": "ia903608_22",
|
|
473
|
+
"ia_orig__runtime": "31 seconds"
|
|
474
|
+
},
|
|
475
|
+
"reviews": [
|
|
476
|
+
{
|
|
477
|
+
"reviewbody": "Sugar cereal cartoon Karloff and Lugosi argue self-importance pre Lorre ghost. Interesting how kids still know the voices without any idea of the origins.",
|
|
478
|
+
"reviewtitle": "pre booberry",
|
|
479
|
+
"reviewer": "outofthebox",
|
|
480
|
+
"reviewdate": "2016-06-25 23:51:36",
|
|
481
|
+
"createdate": "2016-06-25 23:51:36",
|
|
482
|
+
"stars": "4"
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
"server": "ia800202.us.archive.org",
|
|
486
|
+
"uniq": 1957612749,
|
|
487
|
+
"workable_servers": [
|
|
488
|
+
"ia800202.us.archive.org",
|
|
489
|
+
"ia600202.us.archive.org"
|
|
490
|
+
]
|
|
491
|
+
}
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### A Manyfest Schema for Count Chocula to Thrive In
|
|
495
|
+
|
|
496
|
+
With just a small number of element descriptors, we can make this huge blob of JSON very usable for a developer.
|
|
497
|
+
|
|
498
|
+
```JSON
|
|
499
|
+
{
|
|
500
|
+
"Scope": "Archive.org",
|
|
501
|
+
"Descriptors": {
|
|
502
|
+
"d1": {
|
|
503
|
+
"Hash": "Server",
|
|
504
|
+
"Name": "Server",
|
|
505
|
+
"Description": "The primary server to download these files from.",
|
|
506
|
+
"DataType": "String"
|
|
507
|
+
},
|
|
508
|
+
"d2": {
|
|
509
|
+
"Hash": "ServerAlternate",
|
|
510
|
+
"Name": "Alternate Server",
|
|
511
|
+
"Description": "The alternate server to download these files from.",
|
|
512
|
+
"DataType": "String"
|
|
513
|
+
},
|
|
514
|
+
"dir": {
|
|
515
|
+
"Hash": "Path",
|
|
516
|
+
"Name": "Server URL Path",
|
|
517
|
+
"NameShort": "Path",
|
|
518
|
+
"Description": "The path on the server where these files are located."
|
|
519
|
+
},
|
|
520
|
+
"metadata.identifier": {
|
|
521
|
+
"Hash": "GUID",
|
|
522
|
+
"Name": "Globally Unique Identifier",
|
|
523
|
+
"NameShort": "GUID",
|
|
524
|
+
"Description": "Archive.org unique identifier string."
|
|
525
|
+
},
|
|
526
|
+
"metadata.title": {
|
|
527
|
+
"Hash": "Title",
|
|
528
|
+
"Name": "Title",
|
|
529
|
+
"NameShort": "Title",
|
|
530
|
+
"Description": "The title of the media item."
|
|
531
|
+
},
|
|
532
|
+
"metadata.creator": {
|
|
533
|
+
"Hash": "Creator",
|
|
534
|
+
"Name": "Creator",
|
|
535
|
+
"NameShort": "Creator",
|
|
536
|
+
"Description": "The creator of the media item."
|
|
537
|
+
},
|
|
538
|
+
"metadata.mediatype": {
|
|
539
|
+
"Hash": "Type",
|
|
540
|
+
"Name": "Media Type",
|
|
541
|
+
"NameShort": "Type",
|
|
542
|
+
"Description": "The type of media item."
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
These two JSON files are in the [examples/chocula](https://github.com/stevenvelozo/manyfest/tree/main/examples/chocula) folder along with a javascript file `Chocula.js` you can try out yourself and hack on.
|
|
549
|
+
|
|
550
|
+
```
|
|
551
|
+
let libManyfest = require('../../source/Manyfest.js');
|
|
552
|
+
|
|
553
|
+
let dataArchiveOrg = require(`./Data-Archive-org-Frankenberry.json`);
|
|
554
|
+
let schemaArchiveOrg = require(`./Schema-Archive-org-Item.json`);
|
|
555
|
+
|
|
556
|
+
let _Schema = new libManyfest(schemaArchiveOrg);
|
|
557
|
+
|
|
558
|
+
console.log(`The URL for "${_Schema.getValueByHash(dataArchiveOrg,'Title')}" is: ${_Schema.getValueByHash(dataArchiveOrg,'Server')}${_Schema.getValueByHash(dataArchiveOrg,'Path')}`);
|
|
559
|
+
```
|
|
560
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
let libManyfest = require('../../source/Manyfest.js');
|
|
2
|
+
|
|
3
|
+
let dataArchiveOrg = require(`./Data-Archive-org-Frankenberry.json`);
|
|
4
|
+
let schemaArchiveOrg = require(`./Schema-Archive-org-Item.json`);
|
|
5
|
+
|
|
6
|
+
let _Schema = new libManyfest(schemaArchiveOrg);
|
|
7
|
+
|
|
8
|
+
console.log(`The URL for "${_Schema.getValueByHash(dataArchiveOrg,'Title')}" is: ${_Schema.getValueByHash(dataArchiveOrg,'Server')}${_Schema.getValueByHash(dataArchiveOrg,'Path')}`);
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
{
|
|
2
|
+
"created": 1664830085,
|
|
3
|
+
"d1": "ia600202.us.archive.org",
|
|
4
|
+
"d2": "ia800202.us.archive.org",
|
|
5
|
+
"dir": "/7/items/FrankenberryCountChoculaTevevisionCommercial1971",
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000001.jpg",
|
|
9
|
+
"source": "derivative",
|
|
10
|
+
"format": "Thumbnail",
|
|
11
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
12
|
+
"mtime": "1296336956",
|
|
13
|
+
"size": "838",
|
|
14
|
+
"md5": "e47269cd5a82db9594f265a65785ec12",
|
|
15
|
+
"crc32": "165c668b",
|
|
16
|
+
"sha1": "383303d9546c381267569ad4e33aff691f0bb8c7"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000004.jpg",
|
|
20
|
+
"source": "derivative",
|
|
21
|
+
"format": "Thumbnail",
|
|
22
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
23
|
+
"mtime": "1296336957",
|
|
24
|
+
"size": "6843",
|
|
25
|
+
"md5": "c93fa52000ab4665e69b25c403e11aff",
|
|
26
|
+
"crc32": "9444e6f6",
|
|
27
|
+
"sha1": "716b4f9950b8147f51d3265f9c62ff86451308d5"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000009.jpg",
|
|
31
|
+
"source": "derivative",
|
|
32
|
+
"format": "Thumbnail",
|
|
33
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
34
|
+
"mtime": "1296336957",
|
|
35
|
+
"size": "8388",
|
|
36
|
+
"md5": "30eb3eb4cbbdfa08d531a0a74da7c000",
|
|
37
|
+
"crc32": "be874a9e",
|
|
38
|
+
"sha1": "0c392d777609e967b6022be27edad678c5ae74e2"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000014.jpg",
|
|
42
|
+
"source": "derivative",
|
|
43
|
+
"format": "Thumbnail",
|
|
44
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
45
|
+
"mtime": "1296336958",
|
|
46
|
+
"size": "5993",
|
|
47
|
+
"md5": "4e9ebc3d076bec8cf7dfe76795f8c769",
|
|
48
|
+
"crc32": "912ec98c",
|
|
49
|
+
"sha1": "01dc49c852e1bbb421199450dd902935c62b06de"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000019.jpg",
|
|
53
|
+
"source": "derivative",
|
|
54
|
+
"format": "Thumbnail",
|
|
55
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
56
|
+
"mtime": "1296336958",
|
|
57
|
+
"size": "4951",
|
|
58
|
+
"md5": "59f190f0c5b0a048415b26412860b6dd",
|
|
59
|
+
"crc32": "a70a30b1",
|
|
60
|
+
"sha1": "a284af9757cb24d28f96ec88ec1b1c23a8cea9fe"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000024.jpg",
|
|
64
|
+
"source": "derivative",
|
|
65
|
+
"format": "Thumbnail",
|
|
66
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
67
|
+
"mtime": "1296336959",
|
|
68
|
+
"size": "3383",
|
|
69
|
+
"md5": "be2a908acd563b896e7758b598295148",
|
|
70
|
+
"crc32": "ed467831",
|
|
71
|
+
"sha1": "94c001e72ebc86d837a78c61a004db9ab9d597bd"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971.thumbs/frankerberry_countchockula_1971.0001_000029.jpg",
|
|
75
|
+
"source": "derivative",
|
|
76
|
+
"format": "Thumbnail",
|
|
77
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
78
|
+
"mtime": "1296336960",
|
|
79
|
+
"size": "3503",
|
|
80
|
+
"md5": "c82199d09be07633000fd07b363dd8a3",
|
|
81
|
+
"crc32": "a1fd79cb",
|
|
82
|
+
"sha1": "2bc8e761edb24a441fa5906dda1c424e1f98a47a"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971_archive.torrent",
|
|
86
|
+
"source": "metadata",
|
|
87
|
+
"btih": "de6b371e7cc3c83db1cc08150500753eae533409",
|
|
88
|
+
"mtime": "1542761794",
|
|
89
|
+
"size": "4093",
|
|
90
|
+
"md5": "a275d3b4028cccb5bea8b47a88c838af",
|
|
91
|
+
"crc32": "5ffa7334",
|
|
92
|
+
"sha1": "af8222637b574cba1360d0ea77e231640ffd43c4",
|
|
93
|
+
"format": "Archive BitTorrent"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971_files.xml",
|
|
97
|
+
"source": "metadata",
|
|
98
|
+
"format": "Metadata",
|
|
99
|
+
"md5": "3a7e87b08bed1e203a5858b31352c110"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971_meta.xml",
|
|
103
|
+
"source": "metadata",
|
|
104
|
+
"format": "Metadata",
|
|
105
|
+
"mtime": "1542761793",
|
|
106
|
+
"size": "1371",
|
|
107
|
+
"md5": "0b9c9bf21b9a26aea43a2f735b404624",
|
|
108
|
+
"crc32": "41077288",
|
|
109
|
+
"sha1": "22e6f2c73bf63072f671d846355da2785db51dbd"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "FrankenberryCountChoculaTevevisionCommercial1971_reviews.xml",
|
|
113
|
+
"source": "original",
|
|
114
|
+
"mtime": "1466898697",
|
|
115
|
+
"size": "620",
|
|
116
|
+
"md5": "260bfba5d696772445dcc7ff6e6d5bdb",
|
|
117
|
+
"crc32": "25ea3229",
|
|
118
|
+
"sha1": "7d541f18fcd5ad9c6e593afe5a80f18771f23b32",
|
|
119
|
+
"format": "Metadata"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "__ia_thumb.jpg",
|
|
123
|
+
"source": "original",
|
|
124
|
+
"mtime": "1539115881",
|
|
125
|
+
"size": "7481",
|
|
126
|
+
"md5": "8cec324fa0016fd77cc04e6a4b2ebb00",
|
|
127
|
+
"crc32": "d9e1b316",
|
|
128
|
+
"sha1": "4dab42952fe0405a3b7f80146636b33d7b1bd01e",
|
|
129
|
+
"format": "Item Tile",
|
|
130
|
+
"rotation": "0"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "frankerberry_countchockula_1971.0001.gif",
|
|
134
|
+
"source": "derivative",
|
|
135
|
+
"format": "Animated GIF",
|
|
136
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
137
|
+
"mtime": "1296336965",
|
|
138
|
+
"size": "101114",
|
|
139
|
+
"md5": "b78a13094030f104900eb996bafe2b7d",
|
|
140
|
+
"crc32": "6650cd8",
|
|
141
|
+
"sha1": "669798c037205cac14f70592deef6f7831b3d4a1"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "frankerberry_countchockula_1971.0001.mpg",
|
|
145
|
+
"source": "original",
|
|
146
|
+
"format": "MPEG2",
|
|
147
|
+
"mtime": "1296335803",
|
|
148
|
+
"size": "31625216",
|
|
149
|
+
"md5": "762ba18b026b85b3f074523e7fcb4db0",
|
|
150
|
+
"crc32": "42347f78",
|
|
151
|
+
"sha1": "41162dc2d1a91b618124c84628d0c231544a02be",
|
|
152
|
+
"length": "31.14",
|
|
153
|
+
"height": "480",
|
|
154
|
+
"width": "640"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "frankerberry_countchockula_1971.0001.mpg.idx",
|
|
158
|
+
"source": "derivative",
|
|
159
|
+
"format": "Video Index",
|
|
160
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
161
|
+
"mtime": "1296336956",
|
|
162
|
+
"size": "31141",
|
|
163
|
+
"md5": "49423e072726e4ea3cdd8ebdd26c7dfc",
|
|
164
|
+
"crc32": "ae969a68",
|
|
165
|
+
"sha1": "805782cd2d0f9002555816daadf3b8607e621f79"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "frankerberry_countchockula_1971.0001.ogv",
|
|
169
|
+
"source": "derivative",
|
|
170
|
+
"format": "Ogg Video",
|
|
171
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
172
|
+
"mtime": "1296336994",
|
|
173
|
+
"size": "2248166",
|
|
174
|
+
"md5": "f1b933e97ce63594fb28a0a019ff3436",
|
|
175
|
+
"crc32": "a2a0e5e9",
|
|
176
|
+
"sha1": "a6bf0aec9f006baeca37c03f586686ebe685d59b",
|
|
177
|
+
"length": "31.15",
|
|
178
|
+
"height": "300",
|
|
179
|
+
"width": "400"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "frankerberry_countchockula_1971.0001_512kb.mp4",
|
|
183
|
+
"source": "derivative",
|
|
184
|
+
"format": "512Kb MPEG4",
|
|
185
|
+
"original": "frankerberry_countchockula_1971.0001.mpg",
|
|
186
|
+
"mtime": "1296336977",
|
|
187
|
+
"size": "2378677",
|
|
188
|
+
"md5": "a7750839519c61ba3bb99fc66b32011d",
|
|
189
|
+
"crc32": "4dbd37c8",
|
|
190
|
+
"sha1": "3929314c192dec006fac2739bcb4730788e8c068",
|
|
191
|
+
"length": "31.13",
|
|
192
|
+
"height": "240",
|
|
193
|
+
"width": "320"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"files_count": 17,
|
|
197
|
+
"item_last_updated": 1542761794,
|
|
198
|
+
"item_size": 36431778,
|
|
199
|
+
"metadata": {
|
|
200
|
+
"identifier": "FrankenberryCountChoculaTevevisionCommercial1971",
|
|
201
|
+
"title": "Franken Berry / Count Chocula : Tevevision Commercial 1971",
|
|
202
|
+
"creator": "General Mills",
|
|
203
|
+
"mediatype": "movies",
|
|
204
|
+
"collection": [
|
|
205
|
+
"classic_tv_commercials",
|
|
206
|
+
"television"
|
|
207
|
+
],
|
|
208
|
+
"description": "Count Chocula and Franken Berry were both introduced in 1971. Boo Berry Cereal appeared in 1973 followed by Fruit Brute in 1974. Yummy Mummy appeared more than a decade later in 1988 - completing the the group known as the General Mills Monster Cereals.",
|
|
209
|
+
"subject": "Third Eye Cinema; Classic Television Commercials; animation; cartoons;General Mills",
|
|
210
|
+
"licenseurl": "http://creativecommons.org/publicdomain/mark/1.0/",
|
|
211
|
+
"publicdate": "2011-01-29 21:36:42",
|
|
212
|
+
"addeddate": "2011-01-29 21:35:38",
|
|
213
|
+
"uploader": "bolexman@msn.com",
|
|
214
|
+
"updater": [
|
|
215
|
+
"Bolexman",
|
|
216
|
+
"Bolexman",
|
|
217
|
+
"Jeff Kaplan"
|
|
218
|
+
],
|
|
219
|
+
"updatedate": [
|
|
220
|
+
"2011-01-29 21:45:38",
|
|
221
|
+
"2011-01-29 21:55:46",
|
|
222
|
+
"2011-01-29 23:04:55"
|
|
223
|
+
],
|
|
224
|
+
"sound": "sound",
|
|
225
|
+
"color": "color",
|
|
226
|
+
"runtime": "0:31",
|
|
227
|
+
"backup_location": "ia903608_22",
|
|
228
|
+
"ia_orig__runtime": "31 seconds"
|
|
229
|
+
},
|
|
230
|
+
"reviews": [
|
|
231
|
+
{
|
|
232
|
+
"reviewbody": "Sugar cereal cartoon Karloff and Lugosi argue self-importance pre Lorre ghost. Interesting how kids still know the voices without any idea of the origins.",
|
|
233
|
+
"reviewtitle": "pre booberry",
|
|
234
|
+
"reviewer": "outofthebox",
|
|
235
|
+
"reviewdate": "2016-06-25 23:51:36",
|
|
236
|
+
"createdate": "2016-06-25 23:51:36",
|
|
237
|
+
"stars": "4"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"server": "ia800202.us.archive.org",
|
|
241
|
+
"uniq": 1957612749,
|
|
242
|
+
"workable_servers": [
|
|
243
|
+
"ia800202.us.archive.org",
|
|
244
|
+
"ia600202.us.archive.org"
|
|
245
|
+
]
|
|
246
|
+
}
|