Files
OpenSpace/data/assets/examples/urlsynchronization.asset
T
Andreas Engberg 0fc9265837 Feature/assetvalidation (#3396)
# To run the script
Make sure to install the latest Python API version `openspace-api 0.1.2`
The script is located in `OpenSpace/support/assetvalidation`, the main script takes a few command line arguments

`--dir` - specify the OpenSpace directory 
`--filter` - optionally supply a regex string to filter which assets to validate
`--verbose` - flag to print debug info to log and also console (default off), if off only warnings and errors are logged
`--start` - flag to start OpenSpace as a subprocess (default on) if this is off it assumes OpenSpace is already running, useful if you want to run OpenSpace via Visual Studio for example. 
`--at` - specify an index to start at a specific asset

run eg: 
`python main.py --dir="C:/User/Desktop/OpenSpace" --filter="examples" --verbose=True --start=False --at=35`
2024-10-10 15:55:53 +02:00

66 lines
2.0 KiB
Lua

asset.resource({
Name = "Example Single",
Type = "UrlSynchronization",
Identifier = "example_single",
Url = "http://celestrak.com/NORAD/elements/geo.txt"
})
asset.resource({
Name = "Example Multiple",
Type = "UrlSynchronization",
Identifier = "example_multiple",
Url = {
"http://celestrak.com/NORAD/elements/stations.txt",
"http://celestrak.com/NORAD/elements/gps-ops.txt"
}
})
asset.resource({
Name = "Example Large",
Type = "UrlSynchronization",
Identifier = "example_large",
Url = {
"https://proof.ovh.net/files/100Mb.dat",
"http://ipv4.download.thinkbroadband.com/200MB.zip",
"http://ipv4.download.thinkbroadband.com/100MB.zip",
"http://ipv4.download.thinkbroadband.com/50MB.zip",
"http://ipv4.download.thinkbroadband.com/20MB.zip",
"http://ipv4.download.thinkbroadband.com/10MB.zip",
"http://ipv4.download.thinkbroadband.com/5MB.zip",
},
SecondsUntilResync = 0
})
asset.resource({
Name = "Example Medium",
Type = "UrlSynchronization",
Identifier = "example_medium",
Url = "http://ipv4.download.thinkbroadband.com/5MB.zip",
SecondsUntilResync = 0
})
-- Load a resource without hashing, meaning that the bare directory name will be
-- used for the downloaded file. If UseHash is true, the hash of the URL is appended
-- to the directory name to produce a unique directory under all circumstances
asset.resource({
Name = "Example No Hash",
Type = "UrlSynchronization",
Identifier = "no_hash",
Url = "http://liu-se.wms.openspaceproject.com/Mercury/Messenger_Mosaic/Messenger_Mosaic.wms",
UseHash = false
})
asset.meta = {
Name = "UrlSynchronization",
Description = [[Example showing how to load resources (any type of data file) from
online sources, using the UrlSynchronization resource type. These can then be used
in other assets. See more information on resources on the OpenSpace wiki page.
]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}