Edengineer: External json stored mats file

Created on 16 Nov 2016  ·  20Comments  ·  Source: msarilar/EDEngineer

Ey msarilar!, congrats for this great work.

I'm using this wonderful app with Spanish translation, and i can see a big potential for use it with voiceattack API called "VATextReader". This API can read xml and json files, If you could enable an real time copy of json stored mats file, everyone could use it to develop voice commands to request real time cargo information, very useful and smart :)

Regards,
Shemuev

enhancement

All 20 comments

I support this request, for a different reason, as I want to import the material counts to Excel for further analysis. An external dump in JSON and/or CSV or tab delimited format would be great.

It looks like the app doesn't store the actual amounts, but instead uses a manual amount file in C:\Users\AppData\Local\EDEngineer and then reads the logs to apply modifiers to it.

I know Andargor, and i know the manual changes json, but it isn't enough to make precise queries for amounts or another kind of information about stored cargo/materials/data with voiceattack commands.

I'm thinking about adding an optional local server using suave library, because since I don't really care about the feature I need the development to be at least fun :D

You would have a http://localhost:XXXX server running which you could query like:
COMMANDER_NAME/materials
COMMANDER_NAME/data
COMMANDER_NAME/commodities
COMMANDER_NAME/cargo
COMMANDER_NAME/blueprints
COMMANDER_NAME/favoriteBlueprints

And based on the HTTP request header (or the extension given), I would give you the data requested (as json, xml, csv, whatever).

For example, typing http://localhost:8083/Hg/materials.xml would output the current materials in xml format for Hg (which is my commander's name).

Is that something usable by VATextReader? Also, do you guys consider that a reasonable way to export data?

Hi msarilar!

Thx for answer, this feature seems good, but i think in the beginning is enough with a stored material json copy in the same directory of manual changes. It's possible generate a stored mats json copy and update at the same time when a mat change occurs?

This feature open new possibilities for future improvements, like import these json to update a new installation BD in another computer.

PD: xml format is an option also.

Thx in advance :)

deployed in 1.0.3.0

if you have any idea for new routes we could add for the server, please open a new feature request !
the server's code is pretty lightweight (thanks to @SuaveIO) and should be pretty readable if you feel like adding the route yourself.

I have a doubt

can be the request stored like a file (xml, json) in a local path not only is a browser?

If this is possible, can you show me an example?

not sure I understand quite right what you want ; you can save the query result you see in your browser with ctrl+S

My fault,

I thought that this new feature allowed to save the query result in a file in the desired path. This make it harder to work with Voice attack, because i can't save the result without make more direct interaction with browser.

Thanks again

You can't make voice attack point to a URL rather than a file ?

otherwise nothing keeps you from writing a quick powershell / wget script to periodically download the query result http://superuser.com/a/252038/318903

but I'm sure voiceattack can be configured to monitor a URL ; that'd be very weird if that wasn't the case

I'm using a external plugin to make possible read files, Voice Attack can't read file for itself, this plugin don't allow to read url results.

do you use this plugin ? https://groups.google.com/forum/#!msg/voiceattack/VotudmB84hE/AHXWKT2liesJ

it says :

The plugin adds commands for extracting content from plain text or XML files, locally or over the Internet, and push it back to VoiceAttack for Text-to-Speech or any other use.

I'm going to check it, thanks

Great is the same that i'm using xDDDD, I did not know that it also works for extracting url info `: )

Ey!

VATextReader it's now obsolete and do not work with VA no more, but it have a substitute:

VAExtensions: https://github.com/Antaniserse/VAExtensions

It's works properly extracting data from url source.

alright great!
if you write any script or stuff (or whatever VA consumes, I don't use it so I don't know how it works) that could benefit other users, don't hesitate to open a new wikipage (I think you can edit it, but let me know if you can't) !

Sure!

The problem will be that my command will use voice inputs in Spanish and it should be translated, but the base command that performs the queries is generic for all languages, only the section that performs the url cargo query should be adapted to be performed in the desired language.

no worries ; when you're ready to share, you can post it on the forums too :)

And here is! Thanks Max!

https://github.com/Shemuev/CIVAQUERY

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Uriei picture Uriei  ·  19Comments

Alekhoff picture Alekhoff  ·  41Comments

Wlaspec picture Wlaspec  ·  5Comments

StrasnyLada picture StrasnyLada  ·  4Comments

CMDRPhaedra picture CMDRPhaedra  ·  17Comments