Created
January 10, 2014 02:54
-
-
Save Celeo/8346235 to your computer and use it in GitHub Desktop.
Use evelink to determine time all corp POSs run out of fuel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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