Sir,
I have a problem with Regular Expressions again.
In order to make an extension to the planetarium I did the following:
First I made a Regex from te api https://ssd-api.jpl.nasa.gov/cad.api.
It will give all the NEO Earth close approaches for the next 60 days. But only the relevant data, i.e for instance distance and time.
So I got this:
[NEO]
Measure=WebParser
URL=https://ssd-api.jpl.nasa.gov/cad.api
RegExp=(?siU)"data":.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)"
DynamicVariables=1
[NEO1]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=1
[NEO2]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=2
[NEO3]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=3
[NEO4]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=4
[NEO5]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=5
[NEO6]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=6
[NEO7]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=7
[NEO8]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=8
[NEO9]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=9
[NEO10]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=10
In order to get the exact full-precision data for the orbits of NEO objects I downloaded a second api and put it in a Downloadfile, called NEOS.txt.
Because it’s huge, I only download it once, each time Rainmeter is started.
Like this:
[DoFi]
Measure=WebParser
URL=https://ssd-api.jpl.nasa.gov/sbdb_query.api?fields=full_name,epoch,e,a,i,om,w,tp,n,H&SB-group=NEO&full-prec=1
DownloadFile=NEOS.txt
Download=1
DynamicVariables=1
Now, my idea was to work with NEO1 … NEO10 and let Rainmeter look it up in the NEOS.txt.
I tried different regexes but it always says “RegExp matching error (-1)”.
Here is what I tried out, among others:
[WePaNEO1]
Measure=WebParser
URL=file://#CURRENTPATH#DownloadFile\NEOS.txt
RegExp=(?siU)"(NEO1)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)"
DynamicVariables=1
Can you help me out please?
I have a problem with Regular Expressions again.
In order to make an extension to the planetarium I did the following:
First I made a Regex from te api https://ssd-api.jpl.nasa.gov/cad.api.
It will give all the NEO Earth close approaches for the next 60 days. But only the relevant data, i.e for instance distance and time.
So I got this:
[NEO]
Measure=WebParser
URL=https://ssd-api.jpl.nasa.gov/cad.api
RegExp=(?siU)"data":.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)"
DynamicVariables=1
[NEO1]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=1
[NEO2]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=2
[NEO3]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=3
[NEO4]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=4
[NEO5]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=5
[NEO6]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=6
[NEO7]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=7
[NEO8]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=8
[NEO9]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=9
[NEO10]
Measure=WebParser
URL=[NEO]
DynamicVariables=1
StringIndex=10
In order to get the exact full-precision data for the orbits of NEO objects I downloaded a second api and put it in a Downloadfile, called NEOS.txt.
Because it’s huge, I only download it once, each time Rainmeter is started.
Like this:
[DoFi]
Measure=WebParser
URL=https://ssd-api.jpl.nasa.gov/sbdb_query.api?fields=full_name,epoch,e,a,i,om,w,tp,n,H&SB-group=NEO&full-prec=1
DownloadFile=NEOS.txt
Download=1
DynamicVariables=1
Now, my idea was to work with NEO1 … NEO10 and let Rainmeter look it up in the NEOS.txt.
I tried different regexes but it always says “RegExp matching error (-1)”.
Here is what I tried out, among others:
[WePaNEO1]
Measure=WebParser
URL=file://#CURRENTPATH#DownloadFile\NEOS.txt
RegExp=(?siU)"(NEO1)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)"
DynamicVariables=1
Can you help me out please?
Statistics: Posted by Fulmar — 15 minutes ago — Replies 22 — Views 3573