From 800712134a533f647b7ab2bbcfb21e8c1d143b3e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 27 Dec 2022 21:15:42 +0000 Subject: [PATCH] More licenses --- webapp_post.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index 0aa0602bb..13c1fcc9e 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1749,6 +1749,10 @@ def _get_content_license(post_json_object: {}) -> str: value = 'http://www.openoffice.org/licenses/PDL.html' elif 'FREEBSD' in value_upper: value = 'https://www.freebsd.org/copyright/freebsd-doc-license' + elif 'WTF' in value_upper: + value = 'http://www.wtfpl.net/txt/copying' + elif 'UNLICENSE' in value_upper: + value = 'https://unlicense.org' else: value = 'https://creativecommons.org/publicdomain/zero/1.0' return value @@ -2286,8 +2290,20 @@ def individual_post_as_html(signing_priv_key_pem: str, domain + ':' + str(port) + '/users/' in published_link: published_link = '/users/' + published_link.split('/users/')[1] + content_license_url = _get_content_license(post_json_object) if not is_news_post(post_json_object): - footer_str = '' + \ + '' + \ + copyright_symbol + ' ' + footer_str += '' + \ published_str + '\n' else: @@ -2367,7 +2383,6 @@ def individual_post_as_html(signing_priv_key_pem: str, if disallow_reply(content_all_str): reply_str = '' - content_license_url = _get_content_license(post_json_object) new_footer_str = \ _get_footer_with_icons(show_icons, container_class_icons,