diff --git a/custom/capture.el b/custom/capture.el index 0544008..688ed7d 100644 --- a/custom/capture.el +++ b/custom/capture.el @@ -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)