These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

script to use google spreadsheet as pos tracker

Author
Baron Holbach
The Northerners
Pandemic Horde
#1 - 2016-01-15 10:13:42 UTC  |  Edited by: Baron Holbach
maybe anyone find it helpfull, google spreadsheet scrip that will use eve api (tower data) to display lost of towers and they fuel left values, script can be found

https://github.com/eritikass/google_spreadsheet_eve_postracker/blob/master/towerdata.gs

from there, fill sheet name and api key data (starbase required) and run function: show_tower_list

should create list something like that:
http://dl.eve-files.com/media/1601/towers-example.png
Zad Murrard
Frozen Dawn Inc
Frozen Dawn Alliance
#2 - 2016-01-15 19:22:20 UTC  |  Edited by: Zad Murrard
Seems to work. Well, actually no, every other field seems to work, but claims that fuelblocks and fuel left is 0 for all posses. I know that for one they are but the rest are supposed to be running.

Doesn't like apikey definitions though with style 'MySheet!A1'

How easy would it be to convert it to just return all the values in an array?
Baron Holbach
The Northerners
Pandemic Horde
#3 - 2016-01-16 21:19:45 UTC
Zad Murrard wrote:
Seems to work. Well, actually no, every other field seems to work, but claims that fuelblocks and fuel left is 0 for all posses. I know that for one they are but the rest are supposed to be running.

Doesn't like apikey definitions though with style 'MySheet!A1'

How easy would it be to convert it to just return all the values in an array?


that was a very nice idea, i did a little rewrite and split it 2, now there are function named get_tower_list that will return tower list as array
and show_tower_list that will display it in spreadsheet

+ api key config are more clean to give to script
Zad Murrard
Frozen Dawn Inc
Frozen Dawn Alliance
#4 - 2016-01-18 07:11:46 UTC
Baron Holbach wrote:
now there are function named get_tower_list that will return tower list as array


Now it seems to return array of objects. What I was more after was that user of gdocs could put to some cell
=GiveMeMyValues(Sheet!ForceRefreshValue) and it would fill the data there. The idea of the refresh value of course is that user can change the value of one cell in some sheet forcing refresh to all the formulas that fetch data from the apis.

Of course it is now rather easy to add a function that does that so I can do it myself, but might be that others are too lazy.
Zad Murrard
Frozen Dawn Inc
Frozen Dawn Alliance
#5 - 2016-01-24 11:53:29 UTC
Ok, so for example something like:

var response = new Array()
var ii = 0;
for(var index in towers)
{
var tower = towers[index]
var row = [tower.fuelleft.str]
row = row.concat(tower.moon.systemName)
row = row.concat(tower.moon.planet)
row = row.concat(tower.moon.moon)
row = row.concat(tower.moon.regionName)
row = row.concat(tower.pos.typeName)
row = row.concat(tower.fuelblocks)
// I choose not to use the status value
response[ii] = row
++ii;
}

Makes is usable straight from spreadsheet.

There is a problem with towers[moonID].pos.fuel.typeID == '4246'
4246 is minmatar fuel block. If the pos is any other faction it will show 0 fuel.

It might be also a good idea to change the signature to
function get_tower_list(eveapi_keyid, eveapi_vcode, extraParam)
This enables users of the function to put the api things to the function call if they so please.
Baron Holbach
The Northerners
Pandemic Horde
#6 - 2016-01-29 22:03:30 UTC
tnx for feedback, will look into it - issue with other than minni fuel is probably that i have only minni towers - otehrwise it would come out, will fix it
Staysin Jita
#7 - 2016-02-02 12:42:19 UTC  |  Edited by: Staysin Jita
nice work.
This could also be expanded to show the volume in each silo in the POSes.

I would also recommend adding an option for Sov as this significantly reduces the amount of fuel needed for the towers
Baron Holbach
The Northerners
Pandemic Horde
#8 - 2016-02-15 22:24:06 UTC
i know sov is bit of issue for fuel calculations, and silo tracking would be boss feature in any case ... once i got bit more time will try to look into those things