Add capture template for site updates

This commit is contained in:
mez 2025-06-13 21:56:02 +01:00
parent a2b2af24d6
commit 4949abc5cc

View file

@ -164,6 +164,16 @@
(setq realdescreturn (read-string "Description (full stop will be appended): "))
realdescreturn)
(defun theurl ()
"Point to a URL"
(setq theurlreturn (read-string "URL (relative, including leading slash): "))
theurlreturn)
(defun rsscategories ()
"Set categories for an RSS feed entry"
(setq categoriesreturn (read-string "Categories (comma-separated): "))
categoriesreturn)
(defun findperf ()
"Find or create heading for performances"
(filedate)
@ -213,6 +223,10 @@
(setq bookprogress (read-string "Progress (%): ")))
(setq returnprogress (concat "*" bookprogress "%.* "))
returnprogress)
(defun timenow ()
"Print the current time"
(format-time-string "%H:%M:%S"))
(setq org-capture-templates
'(("a" "Acquired book" entry
@ -251,9 +265,13 @@
(file+function "" findreading)
"* %^{Author} /%^{Title}/%(theworkbook)\n%(bookcalc)%?"
:jump-to-captured t)
("u" "Website update" entry
(file+function "" findweb)
"* %^{Title} :update:\n:PROPERTIES:\n:time: %(timenow)\n:url: %(theurl)\n:categories: %(rsscategories)\n:END:\n%?"
:jump-to-captured t)
("w" "Website post" entry
(file+function "" findweb)
"* %^{Title} :post:\n:PROPERTIES:\n:realtitle: %(realtitle)\n:ogdesc: %(realdesc).\n:category: %(setcategory)\n:comments: %(thecomments)\n:END:\n%?"
"* %^{Title} :post:\n:PROPERTIES:\n:realtitle: %(realtitle)\n:time: %(timenow)\n:ogdesc: %(realdesc).\n:category: %(setcategory)\n:comments: %(thecomments)\n:END:\n%?"
:jump-to-captured t)
("1" "Completed game" entry
(file+function "" findhundred)