[basics] email adress is encoded

This commit is contained in:
max/sooulix 2024-08-15 20:12:25 +02:00
parent b1c55eb1b1
commit 89b12d2dcd
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import json
import locale import locale
import logging import logging
import subprocess import subprocess
import base64
from datetime import date from datetime import date
from pelican import readers from pelican import readers
from pelican import signals from pelican import signals
@ -27,6 +28,10 @@ class JSONResumeReader(readers.RstReader):
raise Exception('please give a jsonresume metadata field for this type') raise Exception('please give a jsonresume metadata field for this type')
metadata['resume'] = json.load(open(metadata['jsonresume'])) 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)]) metadata['locale'] = self.settings.get('LOCALE', [self.settings.get('DEFAULT_LOCALE', None)])
countryname = lambda code: 'langue' countryname = lambda code: 'langue'