Skip to content

Instantly share code, notes, and snippets.

@andylolz
Last active June 13, 2019 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andylolz/82a748a54671ea6d09b0f341e4ec448c to your computer and use it in GitHub Desktop.
Save andylolz/82a748a54671ea6d09b0f341e4ec448c to your computer and use it in GitHub Desktop.
All activities on the IATI registry with unicode identifiers
from urllib.parse import urlencode
import iatikit
isascii = lambda s: len(s) == len(s.encode())
unicode_identifiers = []
for activity in iatikit.data().activities:
id_ = activity.iati_identifier
if id_ and not isascii(id_):
unicode_identifiers.append(id_)
for id_ in unicode_identifiers:
print(' * [{id_}](https://d-portal.org/q.html?{qs})'.format(id_=id_, qs=urlencode({'aid': id_})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment