From 6d71a8b84437d5145bb59bbcd2d6d47dc7acc925 Mon Sep 17 00:00:00 2001 From: mez Date: Wed, 25 Jun 2025 20:23:16 +0100 Subject: [PATCH] Add fediverse link to posts in July 2024 or later --- export.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/export.el b/export.el index 2bfb71b..92c4912 100644 --- a/export.el +++ b/export.el @@ -29,7 +29,12 @@ t nil)) -(setq org-html-head (concat "\n\n\n\n\n\n\n\n\n\n\n\n\n")) +(setq thedate (concat (substring (file-name-base) 0 4) (substring (file-name-base) 5 7) (substring (file-name-base) 8 10))) +(if (> (string-to-number thedate) 20240700) + (setq bridged t) + (setq bridged nil)) + +(setq org-html-head (concat "\n\n\n\n\n\n\n\n\n\n\n\n\n\n")) (defun org-html-template (contents info) "Return complete document string after HTML conversion. @@ -95,7 +100,9 @@ holding export options." (unless (string-match "tumblr" thecategory) (concat "

If the formatting of this post seems odd or incomplete, try viewing the original on my site.

")) contents - "\n" + "\n\n
" + (when bridged + (concat "

You can find this post on the fediverse by searching for https://fed.brid.gy/r/https://tre.praze.net/notes/" thedate "/ in your fediverse client.

")) (if havecomments "
\n

Comments

\n\n

You can comment on this post if you like. Comments will be posted below after moderation.

\n
\n\n\n\n\n\n
\n
\n") "
\n"