-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b920f0c
commit d9912bb
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Track activity in a journal file and write it to stdout. This is NOT shipped with the plug-in. | ||
# | ||
# use: python report.py [log file] | ||
|
||
import json | ||
import sys | ||
import logging | ||
|
||
from edmfs.tracker import Tracker | ||
|
||
|
||
def load_test_market(): | ||
return { | ||
"Algae": {"id": 128049177, "Name": "$algae_name;", "Name_Localised": "Algae", "Category": "$MARKET_category_foods;", "Category_Localised": "Foods", "BuyPrice": 27, "SellPrice": 26, "MeanPrice": 356, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Atmospheric Processors": {"id": 128064028, "Name": "$atmosphericextractors_name;", "Name_Localised": "Atmospheric Processors", "Category": "$MARKET_category_machinery;", "Category_Localised": "Machinery", "BuyPrice": 205, "SellPrice": 204, "MeanPrice": 571, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Bertrandite": {"id": 128049156, "Name": "$bertrandite_name;", "Name_Localised": "Bertrandite", "Category": "$MARKET_category_minerals;", "Category_Localised": "Minerals", "BuyPrice": 16442, "SellPrice": 16025, "MeanPrice": 18817, "StockBracket": 3, "DemandBracket": 0, "Stock": 175, "Demand": 1, "Consumer": False, "Producer": True, "Rare": False}, | ||
"Beryllium": {"id": 128049168, "Name": "$beryllium_name;", "Name_Localised": "Beryllium", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 5631, "SellPrice": 5630, "MeanPrice": 8243, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Biowaste": {"id": 128049244, "Name": "$biowaste_name;", "Name_Localised": "Biowaste", "Category": "$MARKET_category_waste;", "Category_Localised": "Waste", "BuyPrice": 62, "SellPrice": 38, "MeanPrice": 358, "StockBracket": 3, "DemandBracket": 0, "Stock": 130, "Demand": 1, "Consumer": False, "Producer": True, "Rare": False}, | ||
"Clothing": {"id": 128049241, "Name": "$clothing_name;", "Name_Localised": "Clothing", "Category": "$MARKET_category_consumer_items;", "Category_Localised": "Consumer items", "BuyPrice": 0, "SellPrice": 642, "MeanPrice": 546, "StockBracket": 0, "DemandBracket": 2, "Stock": 0, "Demand": 229, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Coltan": {"id": 128049159, "Name": "$coltan_name;", "Name_Localised": "Coltan", "Category": "$MARKET_category_minerals;", "Category_Localised": "Minerals", "BuyPrice": 5051, "SellPrice": 4846, "MeanPrice": 6163, "StockBracket": 3, "DemandBracket": 0, "Stock": 277, "Demand": 1, "Consumer": False, "Producer": True, "Rare": False}, | ||
"Computer Components": {"id": 128049240, "Name": "$computercomponents_name;", "Name_Localised": "Computer Components", "Category": "$MARKET_technology;", "Category_Localised": "Computer Components", "BuyPrice": 0, "SellPrice": 7186, "MeanPrice": 6690, "StockBracket": 0, "DemandBracket": 2, "Stock": 0, "Demand": 18, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Consumer Technology": {"id": 128049240, "Name": "$consumertechnology_name;", "Name_Localised": "Consumer Technology", "Category": "$MARKET_category_consumer_items;", "Category_Localised": "Consumer items", "BuyPrice": 0, "SellPrice": 7186, "MeanPrice": 6690, "StockBracket": 0, "DemandBracket": 2, "Stock": 0, "Demand": 18, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Copper": {"id": 128049175, "Name": "$copper_name;", "Name_Localised": "Copper", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 246, "SellPrice": 245, "MeanPrice": 689, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Crop Harvesters": {"id": 128049222, "Name": "$cropharvesters_name;", "Name_Localised": "Crop Harvesters", "Category": "$MARKET_category_machinery;", "Category_Localised": "Machinery", "BuyPrice": 1365, "SellPrice": 1364, "MeanPrice": 2230, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Eden Apples Of Aerial": {"id": 128049152, "Name": "$edenapplesofaerial_name;", "Name_Localised": "Eden Apples of Aerial", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 30908, "SellPrice": 30906, "MeanPrice": 58263, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": True}, | ||
"Food Cartridges": {"id": 128049184, "Name": "$foodcartridges_name;", "Name_Localised": "Food Cartridges", "Category": "$MARKET_category_foods;", "Category_Localised": "Foods", "BuyPrice": 0, "SellPrice": 436, "MeanPrice": 265, "StockBracket": 0, "DemandBracket": 2, "Stock": 0, "Demand": 83, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Gold": {"id": 128049154, "Name": "$gold_name;", "Name_Localised": "Gold", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 44266, "SellPrice": 43761, "MeanPrice": 47610, "StockBracket": 3, "DemandBracket": 0, "Stock": 80, "Demand": 1, "Consumer": False, "Producer": True, "Rare": False}, | ||
"Grain": {"id": 128049180, "Name": "$grain_name;", "Name_Localised": "Grain", "Category": "$MARKET_category_foods;", "Category_Localised": "Foods", "BuyPrice": 0, "SellPrice": 810, "MeanPrice": 410, "StockBracket": 0, "DemandBracket": 3, "Stock": 0, "Demand": 569, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Hydrogen Fuel": {"id": 128049202, "Name": "$hydrogenfuel_name;", "Name_Localised": "Hydrogen Fuel", "Category": "$MARKET_category_chemicals;", "Category_Localised": "Chemicals", "BuyPrice": 84, "SellPrice": 80, "MeanPrice": 113, "StockBracket": 3, "DemandBracket": 0, "Stock": 1103, "Demand": 1, "Consumer": False, "Producer": True, "Rare": False}, | ||
"Indium": {"id": 128049169, "Name": "$indium_name;", "Name_Localised": "Indium", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 3949, "SellPrice": 3948, "MeanPrice": 5845, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Moissanite": {"id": 128672296, "Name": "$moissanite_name;", "Name_Localised": "Moissanite", "Category": "$MARKET_category_minerals;", "Category_Localised": "Minerals", "BuyPrice": 15255, "SellPrice": 15254, "MeanPrice": 24833, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Non-Lethal Weapons": {"id": 128049236, "Name": "$nonlethalweapons_name;", "Name_Localised": "Non-Lethal Weapons", "Category": "$MARKET_category_weapons;", "Category_Localised": "Weapons", "BuyPrice": 0, "SellPrice": 2176, "MeanPrice": 1943, "StockBracket": 0, "DemandBracket": 2, "Stock": 0, "Demand": 31, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Onionhead": {"id": 128049200, "Name": "$onionhead_name;", "Name_Localised": "Onionhead", "Category": "$MARKET_category_industrial_materials;", "Category_Localised": "Industrial materials", "BuyPrice": 4508, "SellPrice": 4507, "MeanPrice": 6679, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": True}, | ||
"Palladium": {"id": 128049153, "Name": "$palladium_name;", "Name_Localised": "Palladium", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 47403, "SellPrice": 46818, "MeanPrice": 50639, "StockBracket": 3, "DemandBracket": 0, "Stock": 12, "Demand": 1, "Consumer": False, "Producer": True, "Rare": False}, | ||
"Pavonis Ear Grubs": {"id": 128666747, "Name": "$pavoniseargrubs_name;", "Name_Localised": "Pavonis Ear Grubs", "Category": "$MARKET_category_drugs;", "Category_Localised": "Legal drugs", "BuyPrice": 2802, "SellPrice": 2801, "MeanPrice": 10365, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": True}, | ||
"Pesticides": {"id": 128049205, "Name": "$pesticides_name;", "Name_Localised": "Pesticides", "Category": "$MARKET_category_chemicals;", "Category_Localised": "Chemicals", "BuyPrice": 91, "SellPrice": 90, "MeanPrice": 437, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Platinum Alloy": {"id": 128049152, "Name": "$platinumalloy_name;", "Name_Localised": "Platinum Alloy", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 30908, "SellPrice": 30906, "MeanPrice": 58263, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": True}, | ||
"Polymers": {"id": 128049197, "Name": "$polymers_name;", "Name_Localised": "Polymers", "Category": "$MARKET_category_industrial_materials;", "Category_Localised": "Industrial materials", "BuyPrice": 41, "SellPrice": 40, "MeanPrice": 376, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Power Generators": {"id": 128049217, "Name": "$powergenerators_name;", "Name_Localised": "Power Generators", "Category": "$MARKET_category_machinery;", "Category_Localised": "Machinery", "BuyPrice": 0, "SellPrice": 2728, "MeanPrice": 2466, "StockBracket": 0, "DemandBracket": 2, "Stock": 0, "Demand": 30, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Reactive Armour": {"id": 128049235, "Name": "$reactivearmour_name;", "Name_Localised": "Reactive Armour", "Category": "$MARKET_category_weapons;", "Category_Localised": "Weapons", "BuyPrice": 0, "SellPrice": 2649, "MeanPrice": 2224, "StockBracket": 0, "DemandBracket": 3, "Stock": 0, "Demand": 46, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Scrap": {"id": 128049248, "Name": "$scrap_name;", "Name_Localised": "Scrap", "Category": "$MARKET_category_waste;", "Category_Localised": "Waste", "BuyPrice": 59, "SellPrice": 58, "MeanPrice": 300, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Superconductors": {"id": 128049200, "Name": "$superconductors_name;", "Name_Localised": "Superconductors", "Category": "$MARKET_category_industrial_materials;", "Category_Localised": "Industrial materials", "BuyPrice": 4508, "SellPrice": 4507, "MeanPrice": 6679, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Survival Equipment": {"id": 128682048, "Name": "$survivalequipment_name;", "Name_Localised": "Survival Equipment", "Category": "$MARKET_category_consumer_items;", "Category_Localised": "Consumer items", "BuyPrice": 283, "SellPrice": 282, "MeanPrice": 684, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Taaffeite": {"id": 128672775, "Name": "$taaffeite_name;", "Name_Localised": "Taaffeite", "Category": "$MARKET_category_minerals;", "Category_Localised": "Minerals", "BuyPrice": 36027, "SellPrice": 36025, "MeanPrice": 52089, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Tantalum": {"id": 128049171, "Name": "$tantalum_name;", "Name_Localised": "Tantalum", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 2567, "SellPrice": 2566, "MeanPrice": 4044, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Tritium": {"id": 128961249, "Name": "$tritium_name;", "Name_Localised": "Tritium", "Category": "$MARKET_category_chemicals;", "Category_Localised": "Chemicals", "BuyPrice": 39541, "SellPrice": 39539, "MeanPrice": 51707, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Tea": {"id": 128049188, "Name": "$tea_name;", "Name_Localised": "Tea", "Category": "$MARKET_category_foods;", "Category_Localised": "Foods", "BuyPrice": 0, "SellPrice": 2053, "MeanPrice": 1696, "StockBracket": 0, "DemandBracket": 3, "Stock": 0, "Demand": 53, "Consumer": True, "Producer": False, "Rare": False}, | ||
"Uranium": {"id": 128049172, "Name": "$uranium_name;", "Name_Localised": "Uranium", "Category": "$MARKET_category_metals;", "Category_Localised": "Metals", "BuyPrice": 1697, "SellPrice": 1696, "MeanPrice": 2827, "StockBracket": 0, "DemandBracket": 0, "Stock": 0, "Demand": 0, "Consumer": False, "Producer": False, "Rare": False}, | ||
"Water": {"id": 128049166, "Name": "$water_name;", "Name_Localised": "Water", "Category": "$MARKET_category_chemicals;", "Category_Localised": "Chemicals", "BuyPrice": 0, "SellPrice": 423, "MeanPrice": 278, "StockBracket": 0, "DemandBracket": 2, "Stock": 0, "Demand": 39, "Consumer": True, "Producer": False, "Rare": False}, | ||
} | ||
|
||
|
||
if __name__ == "__main__": | ||
journal_file_name = sys.argv[1] | ||
minor_factions = ["EDA Kunti League"] # TODO: Read this from the command line | ||
show_anti = True # TODO: Read this from the command line | ||
tracker = Tracker(minor_factions=minor_factions, show_anti=show_anti, get_last_market=load_test_market, logger=logging.getLogger()) | ||
with open(journal_file_name) as journal_file: | ||
for line in journal_file.readlines(): | ||
tracker.on_event(json.loads(line)) | ||
print(tracker.activity) |