diff --git a/jsonresume_reader.py b/jsonresume_reader.py index f4b51e5..1fa430a 100644 --- a/jsonresume_reader.py +++ b/jsonresume_reader.py @@ -10,6 +10,7 @@ import json import locale import logging import subprocess +import base64 from datetime import date from pelican import readers from pelican import signals @@ -27,6 +28,10 @@ class JSONResumeReader(readers.RstReader): raise Exception('please give a jsonresume metadata field for this type') metadata['resume'] = json.load(open(metadata['jsonresume'])) + if 'email' in metadata['resume']['basics']: + metadata['resume']['basics']['email'] = base64.b64encode( + metadata['resume']['basics']['email'].encode() + ).decode() metadata['locale'] = self.settings.get('LOCALE', [self.settings.get('DEFAULT_LOCALE', None)]) countryname = lambda code: 'langue'