Skip to content

Conversation

@thurask
Copy link
Contributor

@thurask thurask commented Apr 21, 2016

Continuing from #83, replace the league*.py files with leagues.json, which is similar in structure to teams.json.

...
      "properties":{  
        "cl":[  
          1,
          3
        ],
        "el":[  
          4,
          4
        ],
        "rl":[  
          19,
          20
        ]
      },
      "name":"Ligue 1",
      "code":"FL",
      "id":396
    },
    {  
      "properties":{  
        "cl":[  
          1,
          2
        ],
        "el":[  
          3,
          6
        ],
        "rl":[  
          21,
          24
        ]
      },
      "name":"League One",
      "code":"EL1",
      "id":425
    },
...

Rewrite main.py and writers.py to accomodate.

As well, add league codes to the --list arg, like so:
soccer1

Lastly, extend --lookup arg to work for leagues as well, in the spirit of #85.

$ soccer --league BL2 --lookup
2. Bundesliga

@thurask
Copy link
Contributor Author

thurask commented Apr 22, 2016

Okay, found some bugs with the initial commit. Had to move JSON loading into jsonhandler.py, then have main.py and writers.py work from there. Otherwise we'd get cyclical imports and other bad stuff.

As a result, this works not just with python main.py, but also regular old soccer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant