going-flying.com gemini git repository
aa6668c006fff392667fc116dc15a99e408b16f6 - Matthew Ernisse - 1672670398
blank thought can happen I guess
diff --git a/files/thoughts-to-gemini.py b/files/thoughts-to-gemini.py index 9cff7ff..8682ade 100755 --- a/files/thoughts-to-gemini.py +++ b/files/thoughts-to-gemini.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: UTF-8 -*- -'''thoughts-to-gemini.py (c) 2020-2022 Matthew J Ernisse <matt@going-flying.com> +'''thoughts-to-gemini.py (c) 2020-2023 Matthew J Ernisse <matt@going-flying.com> All Rights Reserved. Redistribution and use in source and binary forms, @@ -96,6 +96,9 @@ class DeHTMLizer(object): self.gemini = '' self.links = [] + if not s or not soup.find('body'): + return + for el in soup.find('body').contents: self.gemini += self.parseElement(el)