def character_list(): if not session.get('characters', None): return redirect(url_for('index')) auth = auth_from_session(session) access = [] for id, name in API_ACCESS_TYPE.items(): access.append((name, mask_check(session['accessmask'], id))) charinfo = {} if mask_check(session['accessmask'], 3): for id, name in session['characters'].items(): res = auth.char.CharacterSheet(characterID=id) charinfo[id] = { 'corporation': res.corporationName, 'balance': res.balance, 'sp_total': 0 } if hasattr(res, 'allianceName') and type( res.allianceName) == unicode: charinfo[id]['alliance'] = res.allianceName for skill in res.skills: charinfo[id]['sp_total'] += skill.skillpoints if mask_check(session['accessmask'], 23): status = auth.account.AccountStatus() else: status = None return render_template('characters.html', characters=session['characters'], access=access, charinfo=charinfo, status=status)
def character_list(): if not session.get('characters', None): return redirect(url_for('index')) auth = auth_from_session(session) access = [] for id, name in API_ACCESS_TYPE.items(): access.append((name, mask_check(session['accessmask'], id))) charinfo = {} if mask_check(session['accessmask'], 3): for id, name in session['characters'].items(): res = auth.char.CharacterSheet(characterID=id) charinfo[id] = {'corporation': res.corporationName, 'balance': res.balance, 'sp_total': 0} if hasattr(res, 'allianceName') and type(res.allianceName) == unicode: charinfo[id]['alliance'] = res.allianceName for skill in res.skills: charinfo[id]['sp_total'] += skill.skillpoints if mask_check(session['accessmask'], 23): status = auth.account.AccountStatus() else: status = None return render_template('characters.html', characters=session['characters'], access=access, charinfo=charinfo, status=status)
def character(character_id): if mask_check(session['accessmask'], 3): auth = auth_from_session(session) charinfo = auth.eve.CharacterInfo(characterID=character_id) charsheet = auth.char.CharacterSheet(characterID=character_id) corp = eveapi.corp.CorporationSheet(corporationID=charsheet.corporationID) skilltree = eveapi.eve.SkillTree() skilllist = {} for skillgroup in skilltree.skillGroups: for skill in skillgroup.skills: skilllist[skill['typeID']] = skill['typeName'] return render_template('character.html', character=charsheet, corp=corp, skilllist=skilllist, charinfo=charinfo) return redirect(url_for('characters'))
def character(character_id): if mask_check(session['accessmask'], 3): auth = auth_from_session(session) charinfo = auth.eve.CharacterInfo(characterID=character_id) charsheet = auth.char.CharacterSheet(characterID=character_id) corp = eveapi.corp.CorporationSheet( corporationID=charsheet.corporationID) skilltree = eveapi.eve.SkillTree() skilllist = {} for skillgroup in skilltree.skillGroups: for skill in skillgroup.skills: skilllist[skill['typeID']] = skill['typeName'] return render_template('character.html', character=charsheet, corp=corp, skilllist=skilllist, charinfo=charinfo) return redirect(url_for('characters'))
def contact(character_id): if mask_check(session['accessmask'], 4): auth = auth_from_session(session) contactlist = auth.char.ContactList(characterID=character_id) contacts = [] for row in contactlist.contactList: temp = {} try: temp['contactInfo'] = eveapi.eve.CharacterInfo(characterID=row.contactID) except: temp['contactInfo'] = False temp['contactID'] = row.contactID temp['contactName'] = row.contactName temp['inWatchlist'] = row.inWatchlist temp['standing'] = row.standing contacts.append(temp) return render_template('contacts.html', contactlist=contacts) return redirect(url_for('characters'))
def contact(character_id): if mask_check(session['accessmask'], 4): auth = auth_from_session(session) contactlist = auth.char.ContactList(characterID=character_id) contacts = [] for row in contactlist.contactList: temp = {} try: temp['contactInfo'] = eveapi.eve.CharacterInfo( characterID=row.contactID) except: temp['contactInfo'] = False temp['contactID'] = row.contactID temp['contactName'] = row.contactName temp['inWatchlist'] = row.inWatchlist temp['standing'] = row.standing contacts.append(temp) return render_template('contacts.html', contactlist=contacts) return redirect(url_for('characters'))