Skip to content

Commit

Permalink
Add running section to readme
Browse files Browse the repository at this point in the history
Add script for easy execution outside the IDE
  • Loading branch information
brather1ng committed Jan 17, 2017
1 parent bd0bcd2 commit 20b37c9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -35,3 +35,15 @@ The following data is currently available:
keys and their translation as value.
- `gem_tooltips.json`: Describes tooltips for skill gems and skill gem effects only
provided by mods.

## Running RePoE

- Install Python 3.4 or 3.5 and Git
- Install [PyPoE](https://github.com/OmegaK2/PyPoE):
* Clone PyPoE and go into its folder
* Minimal install: `pip install -e .`
* Full install: `pip install -e .[full]` (not required for RePoE, requires Python
3.4)
- Clone RePoE and go into its folder
- Run `python RePoE.py`
(`python RePoE.py -h` to see arguments)
2 changes: 2 additions & 0 deletions RePoE.py
@@ -0,0 +1,2 @@
import RePoE
RePoE.main('data/')
13 changes: 8 additions & 5 deletions RePoE/__init__.py
Expand Up @@ -7,17 +7,17 @@
from RePoE.stats import write_stats
from RePoE.util import load_ggpk, create_relational_reader, create_translation_file_cache

if __name__ == '__main__':

def main(data_path='../data/'):
modules = {
'stat_translations': write_stat_translations,
'mods': write_mods,
'stats': write_stats,
'gems': write_gems,
'gem_tags': write_gem_tags,
# todo Affixes: mod ids sorted by item,
# use mods.groups, mods.spawn_tags, CraftingBenchOptions.dat and maybe Essences.dat
# todo 'buffs': BuffDefinitions.dat?
# todo 'master_crafting': CraftingBenchOptions.dat
# todo 'essences': Essences.dat
# todo GrantedEffects.dat and GrantedEffectsPerLevel.dat
}

parser = argparse.ArgumentParser(description="Convert GGPK files to Json using PyPoE")
Expand All @@ -35,4 +35,7 @@
tfc = create_translation_file_cache(ggpk)
for module in args.modules:
print("Running module '%s'" % module)
modules[module](ggpk=ggpk, data_path='../data/', relational_reader=rr, translation_file_cache=tfc)
modules[module](ggpk=ggpk, data_path=data_path, relational_reader=rr, translation_file_cache=tfc)

if __name__ == '__main__':
main()

0 comments on commit 20b37c9

Please sign in to comment.