@@ -25,7 +25,7 @@ def _build_filter(qualifiers): | |||||
contents of a config file because it originates from a known place on the | contents of a config file because it originates from a known place on the | ||||
filesystem. | filesystem. | ||||
""" | """ | ||||
namespace = {} | |||||
namespace = {"g": g} | |||||
body = "def _func(kill):\n" + textwrap.indent(qualifiers, " " * 4) | body = "def _func(kill):\n" + textwrap.indent(qualifiers, " " * 4) | ||||
exec(body, namespace) | exec(body, namespace) | ||||
return namespace["_func"] | return namespace["_func"] | ||||
@@ -35,8 +35,10 @@ campaigns: | |||||
isk: true | isk: true | ||||
# Python function to filter kills: | # Python function to filter kills: | ||||
qualifiers: |- | qualifiers: |- | ||||
return (kill["victim"]["corporationName"] == "Foo Corporation" and | |||||
kill["victim"]["shipTypeID"] in ...) | |||||
victim = kill["victim"] | |||||
corpname = victim["corporationName"] | |||||
killed = g.eve.universe.killable(victim["shipTypeID"]) | |||||
return corpname == "Foo Corporation" and killed.group == "Frigate" | |||||
# Will track possession of Tritanium by all corp members: | # Will track possession of Tritanium by all corp members: | ||||
titan: | titan: | ||||
title: Let's Build a Titan | title: Let's Build a Titan | ||||
@@ -1,6 +1,10 @@ | |||||
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
""" | |||||
Import an EVE Online Static Data Export dump to Calefaction. | |||||
""" | |||||
import gzip | import gzip | ||||
from pathlib import Path | from pathlib import Path | ||||
import shutil | import shutil | ||||