From 89b12d2dcd5b79133a2a400848b186fc1bcb12c4 Mon Sep 17 00:00:00 2001 From: max/sooulix Date: Thu, 15 Aug 2024 20:12:25 +0200 Subject: [PATCH] [basics] email adress is encoded --- jsonresume_reader.py | 5 +++++ 1 file changed, 5 insertions(+) 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'