Skip to content

Instantly share code, notes, and snippets.

@equinoxel
Created October 24, 2016 12:48
Show Gist options
  • Save equinoxel/dd8ea03864e0bff127fc76b1a4e021a6 to your computer and use it in GitHub Desktop.
Save equinoxel/dd8ea03864e0bff127fc76b1a4e021a6 to your computer and use it in GitHub Desktop.
#!/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