Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Populating an Array with URLs

$
0
0

I need to write an application in Svelte to be used in Amazon Turk for data collection, that will go over URLs (located at some online storage like GitHub) and show them to the screen.

I have a demo app working, which may be pulled from this repo. It has someI'm stuck at the actual construction of the Array populated with the URLs of the images.

The structure of the folders is as follows:

img_dir_0          |_ frame_0.jpg          |_ frame_1.jpg         |_ frame_2.jpg         .         .         .         |_ frame_M.jpgimg_dir_1          |_ frame_0.jpg          |_ frame_1.jpg         |_ frame_2.jpg         .         .         .         |_ frame_K.jpg...img_dir_N          |_ frame_0.jpg          |_ frame_1.jpg         |_ frame_2.jpg         .         .         .         |_ frame_L.jpg

I.e., there are total of N folder, each may contain a variable number of images. The images and folder structure may be viewed here.

My goal is by having the root of the images, i.e. https://github.com/lieldvd/mturk, construct an array of dictionaries as follows:

root = "https://github.com/lieldvd/mturk"frames = {  {'url': 'root/img_dir_1','numberOfFrames': M  },  {'url': 'root/img_dir_2','numberOfFrames': K  },  .  .  .  {'url': 'root/img_dir_N','numberOfFrames': L  },}

Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>