Created
October 24, 2016 12:48
-
-
Save equinoxel/dd8ea03864e0bff127fc76b1a4e021a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import json,urllib,datetime | |
def main(): | |
raw = urllib.urlopen("http://ec.europa.eu/research/participants/portal/data/call/h2020/calls.json").read() | |
data=json.loads(raw) | |
currentYear = datetime.date.today().year | |
print currentYear | |
for call in data['callData']['Calls']: | |
callName = call['CallIdentifier']['FileName'].split('-') | |
if (callName[0].lower() == 'erc'): | |
year = int(callName[1]) | |
if (year >= currentYear - 1): | |
print "%04d - %s" % (year, call['CallIdentifier']['FileName']) | |
pass | |
if __name__=='__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment