Skip to content

Instantly share code, notes, and snippets.

@petronius
Created April 3, 2013 21:40
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 petronius/5305624 to your computer and use it in GitHub Desktop.
Save petronius/5305624 to your computer and use it in GitHub Desktop.
Uriel api sketch
# Module map for MTFG corp management project
# Corporation API keys and user-defined settings
uriel.settings
# Static item information data, pulled from the Eve Static Data dumps, easily updatable.
uriel.iteminfo
# MySQL connector module
uriel.db
# Simple execute function
uriel.db.execute(query, data)
# Interact with the Eve corporation API
uriel.api
# API requestor classes
uriel.api.EveCCPAPIRequestor(api_keyid, api_vcode)
uriel.api.EveCentralAPIRequestor(???)
# Get corp assets. Returns a dict of all assets as { <item_id>: <count> }
uriel.api.get_corporation_assets()
# Get market info from Eve Central? Return a integer of ISK, or a range of sth.?
uriel.api.get_market_prices(item_id, system_or_region)
# Tabulation module
uriel.actuary
# Filter corp assets for current mineral data. Return a dict of { <item_id>: <number> }.
uriel.actuary.mineral_assets(corporation_assets_dict)
# Get the resources we need to product an item
uriel.actuary.mineral_deficit(item_id, mineral_assets_dict, qty = 1)
# Filter corp assets for BPCs. Return a dict of { <item_id>: <number> }.
uriel.actuary.bpc_assets(corporation_assets_dict)
# Find out what we can produce based on current assets. Return an integer.
uriel.actuary.production_max(item_id, mineral_assets_dict)
# Find out the most profitable production run. Returns a dict of { <item_id>: <number> }. How to factor in production time?
uriel.actuary.production_max_profit_run(tradehub_prices_dict, mineral_assets_dict, bpc_assets_dict)
# Spreadsheet dumps. Create a file.
uriel.csv
# Current assets.
uriel.csv.dump_mineral_assets()
# This should include a running average
uriel.csv.dump_mineral_asset_timeline(last_n_days = 7)
# Current assets.
uriel.csv.dump_bpc_assets()
# This should include a running average
uriel.csv.dump_bpc_asset_timeline(last_n_days = 14)
# This is 8 bajillion times easier if you can live with a command-line interface.
# But then again, a basic web interface isn't that hard, if you don't want it to be pretty.
uriel.interface
# Use mdserver to make editing the pages quicker? https://github.com/petronius/markdown-utils
uriel.interface.HTTPServer()
# Sub-module for simple graphs using Raphael.js or something.
uriel.interface.graphing
# Probably use a limited set of graph types. Could do it from the CSVs or MySQL directly (but that means feature seperation)
uriel.interface.graphing.make_graph(csv_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment