From 2f73bfae474996bd9c483385df70c09ca1a7c913 Mon Sep 17 00:00:00 2001 From: Alexander PapaTutuWawa Date: Mon, 21 Sep 2020 22:23:46 +0200 Subject: [PATCH] CSS: Fix path --- assets/css/main.css | 4 ++-- pgp-sign.py | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 076faa9..e3b3a88 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1,12 +1,12 @@ /* Fonts */ @font-face { font-family: roboto; - src: url(/assets/fonts/Roboto-Regular.ttf) + src: url(/fonts/Roboto-Regular.ttf) } @font-face { font-family: overpass; - src: url(/assets/fonts/OpenSans-Regular.ttf) + src: url(/fonts/OpenSans-Regular.ttf) } /* Element styling */ diff --git a/pgp-sign.py b/pgp-sign.py index ade9e47..a819f77 100644 --- a/pgp-sign.py +++ b/pgp-sign.py @@ -1,3 +1,4 @@ +import re import sys import subprocess @@ -7,9 +8,13 @@ if len(sys.argv) <= 1: for file_ in sys.argv[1:]: print(f'Signing {file_} ...') + with open(file_, 'r') as fh: + content = fh.read() + content = re.sub(r'^\s*]*>', '', content) proc = subprocess.run(['gpg', '--armor', '--detach-sign', '--output', '-', '--local-user', 'papatutuwawa@polynom.me', file_], - capture_output=True, check=True) - signature = proc.stdout.decode('utf-8')[:-1] + capture_output=True, check=True, input=content, encoding='utf-8') + signature = proc.stdout[:-1] + print(signature) with open(file_, 'r') as fh: content = fh.read().replace('%%%SIGNED_PAGES_PGP_SIGNATURE%%%', signature) with open(file_, 'w') as fh: