Skip to content

Instantly share code, notes, and snippets.

@Celeo
Created January 10, 2014 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Celeo/8346235 to your computer and use it in GitHub Desktop.
Save Celeo/8346235 to your computer and use it in GitHub Desktop.
Use evelink to determine time all corp POSs run out of fuel
import evelink
from datetime import datetime
eve = evelink.eve.EVE()
char_id = eve.character_id_from_name(raw_input('Enter your character name: '))
api = evelink.api.API(api_key=(raw_input('Key ID: '), raw_input('vCode: ')))
char = evelink.char.Char(char_id=char_id, api=api)
events = char.calendar_events()
print ''
for event in events.itervalues():
if not 'will run out of fuel and go offline' in event['description']:
continue
print 'Tower for', event['owner']['name'], 'named', event['description'].split('<b>Name</b>: ')[1].split('<br />')[0], 'goes offline', datetime.fromtimestamp(event['start_ts']).strftime('%Y-%m-%d %H:%M:%S')
print ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment