manifest = ReadAsciiFile("pkg:/manifest")
lines = manifest.Tokenize(chr(10))
aa = {}
for each line in lines
entry = line.Tokenize("=")
aa.AddReplace(entry[0],entry[1])
end for
print aa
"migmigmig" wrote:
I suppose I could "ReadAsciiFile( "pkg:/manifest" ) and parse it myself, but I'm hoping there's a better way.
"migmigmig" wrote:
In the manifest file, I added an extra key for the url to that XML so it can be loaded from the internet as in the original example or directly from the package, depending upon the needs of my customer service teams who will use the eventual framework to create turnkey Roku (and multiple other set-top-box) applications for our customers.
"renojim" wrote:
I don't think there's any built-in way to do it. I've used this code for a similar purpose:manifest = ReadAsciiFile("pkg:/manifest")
lines = manifest.Tokenize(chr(10))
aa = {}
for each line in lines
entry = line.Tokenize("=")
aa.AddReplace(entry[0],entry[1].Trim())
end for
print aa
I'm sure there's a way to do it with regular expressions as well.
-JT
"migmigmig" wrote:
I'm using the basic "video player" sample code as the basis for my Roku application.
I've expanded the included "categories.xml" from that sample code into "application.xml" and included the ability to specify the entirety of the theme object, the styles of the poster screens, default images if the feed has no images, cooked attributes to be able to specify feeds with params rather than urls, etc, in that xml file.
In the manifest file, I added an extra key for the url to that XML so it can be loaded from the internet as in the original example or directly from the package, depending upon the needs of my customer service teams who will use the eventual framework to create turnkey Roku (and multiple other set-top-box) applications for our customers.
I use the manifest file because it's the one file I will always know where to find. Conceivably, I could have put all of my application configuration variables in the manifest file, but the XML format is more advantageous for complex configuration than a simple ini-style key-value set, so I just use it to configure the url to the real configuration.
"guidamedia2" wrote:
Is there a reason not to trim the values when building the array?