|
From: Kasemir, K. <kas...@or...> - 2017-08-09 17:16:52
|
Hello Dominic: --- I am working at ISIS neutron and muon source. We currently scrape the archive engine webpage to gather information for our own webpages to display the state of our instruments. We have come across a couple of formatting issues with how the data is displayed on the archive engine webpage and want to simplify the code by instead modifying the archive engine to serve JSON that we could more easily read. We are currently using archive engine version <artifact classifier='binary' id='org.csstudio.archive.engine.engine_root.win32.win32.x86_64' version='3.1.1.201306041011'> and are currently unable to update our data browser to the most up to date version. We therefore have a couple of questions: · Would the most recent archive engine work with our current data browser? · If not, what would be the most up to date version that we could fork from? · Would these changes we make be of interest to you in feeding back into the code? --- I'm also parsing the web content to create summaries of all archive engines etc. It's not too bad, I basically get the topics and values from the table lines that look like <th>TOPIC</th><td>VALUE</td> with the only complication being that the VALUE is sometimes wrapped in a <font>. That's in "Alarm Reports" at https://ics-web.sns.ornl.gov/css/products.html Still, I agree that a json or xml format would be easier to parse. One way to get this would be to add an optional 'format' parameter to all the responses, so http://engine:4812/main or http://engine:4812/main?format=html would return the same html as before, but http://engine:4812/main?format=json would return just the data as json. Yes, all the archive engine versions work with all the data browser versions, so please try by branching off the current 'master'. Yes, I'm interested in merging such a ".. format=.." support. I would like to see this implemented without having to add external libraries. So if you can just 'print' the json text or use standard JRE libs that'd much preferred over dragging in some new json lib. Thanks, Kay |