# file, You can obtain one at http://mozilla.org/MPL/2.0/. """corplist.py: generate character list from corp name""" from sys import argv import eveapi_simple as api import evewho if len(argv) <= 1: print("please supply corp name as argument") exit(1) corpname = argv[1] # corp name -> id result_object = api.query('/eve/CharacterID', {'names': corpname}) corpid = result_object.result.rowset.row.attrib['characterID'] # get character list and sort the result characters = evewho.corpmembers(corpid) characters.sort(key=lambda x: (x[0].upper(), x[0].islower())) # create html output print('<!DOCTYPE html>') print('<html>') print('<head>') print('<title>%s member list</title>' % corpname) print('<link rel="stylesheet" type="text/css" href="style.css" />') print('</head>') print('<body>') print('<h1>%s member list</h1>' % corpname)
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """charsheet.py: """ from sys import argv import eveapi_simple as api from evestatic import StaticDB api_args = {'keyID': argv[1], 'vCode': argv[2]} characters = [] key_info = api.query('/account/APIKeyInfo', api_args) for character in key_info.result.key.rowset.row: char_id = character.attrib['characterID'] char_name = character.attrib['characterName'] characters.append((char_id, char_name)) print('<!DOCTYPE html>') print('<html>') print('<head>') print('<title>API key info</title>') print('<link rel="stylesheet" type="text/css" href="style.css" />') print('</head>') print('<body>') sdb = StaticDB() for character in characters: char_id, char_name = character api_args['characterID'] = char_id charsheet = api.query('/char/CharacterSheet', api_args)
with open(skillset_name + '.csv', 'rb') as csvfile: skillsreader = csv.reader(csvfile, delimiter=',', quotechar='"') for row in skillsreader: skill_group, skill_name, required_level = row required_level = int(required_level) if not 1 <= required_level <= 5: continue skill_id = sdb.skill_id(skill_name) if skill_group not in skillset: skillset[skill_group] = [] skillset[skill_group].append((skill_name, skill_id, required_level)) api_args = {'keyID': argv[2], 'vCode': argv[3]} characters = [] key_info = api.query('/account/APIKeyInfo', api_args) for character in key_info.result.key.rowset.row: char_id = character.attrib['characterID'] char_name = character.attrib['characterName'] characters.append((char_id, char_name)) title = "Skillcheck - %s" % skillset_name print('<!DOCTYPE html>') print('<html>') print('<head>') print('<title>%s</title>' % title) print('<link rel="stylesheet" type="text/css" href="style.css" />') print('</head>') print('<body>') print('<h1>%s</h1>' % title)
"""corplist.py: generate character list from corp name""" from sys import argv import eveapi_simple as api import evewho if len(argv) <= 1: print("please supply corp name as argument") exit(1) corpname = argv[1] # corp name -> id result_object = api.query('/eve/CharacterID', {'names': corpname}) corpid = result_object.result.rowset.row.attrib['characterID'] # get character list and sort the result characters = evewho.corpmembers(corpid) characters.sort(key=lambda x: (x[0].upper(), x[0].islower())) # create html output print('<!DOCTYPE html>') print('<html>') print('<head>') print('<title>%s member list</title>' % corpname) print('<link rel="stylesheet" type="text/css" href="style.css" />') print('</head>') print('<body>') print('<h1>%s member list</h1>' % corpname)