Compare commits

...

2 commits

Author SHA1 Message Date
mez
72701ff56a Capture requisite metadata for website posts 2025-05-05 19:19:08 +01:00
mez
2157e8f144 Modify capture template for website posts 2025-05-05 19:07:33 +01:00

View file

@ -106,10 +106,10 @@
"Find or create heading for website posts" "Find or create heading for website posts"
(filedate) (filedate)
(goto-char (point-min)) (goto-char (point-min))
(if (not (search-forward "* post" nil t)) (if (not (search-forward "* site" nil t))
(progn (progn
(goto-char (point-max)) (goto-char (point-max))
(insert "* post")))) (insert "* site"))))
(defun therating () (defun therating ()
"Rate some media" "Rate some media"
@ -136,6 +136,15 @@
(setq workbookreturn " :work:")) (setq workbookreturn " :work:"))
workbookreturn) workbookreturn)
(defun thecomments ()
"Set whether a post should allow comments"
(setq commentsreturn "")
(setq querycomments (y-or-n-p "Allow comments?"))
(if querycomments
(setq commentsreturn "t")
(setq commentsreturn "nil"))
commentsreturn)
(defun thevisitdate () (defun thevisitdate ()
"Add dates for a visit" "Add dates for a visit"
(setq visitreturn "") (setq visitreturn "")
@ -145,6 +154,16 @@
(setq visitreturn (concat " <" visitstart ">--<" visitend ">"))) (setq visitreturn (concat " <" visitstart ">--<" visitend ">")))
visitreturn) visitreturn)
(defun realtitle ()
"Set title for the list of posts"
(setq realtitlereturn (read-string "Real title: "))
realtitlereturn)
(defun realdesc ()
"Set post description"
(setq realdescreturn (read-string "Description (full stop will be appended): "))
realdescreturn)
(defun findperf () (defun findperf ()
"Find or create heading for performances" "Find or create heading for performances"
(filedate) (filedate)
@ -166,6 +185,12 @@
(setq thevenue (completing-read "Venue: " venues)) (setq thevenue (completing-read "Venue: " venues))
thevenue) thevenue)
(defun setcategory ()
"Set a category for a website post"
(setq categories (s-split "\n" (f-read "~/Documents/drive/admin/emacs/categories.txt") t))
(setq thecategory (completing-read "Category: " categories))
thecategory)
(defun setconsole () (defun setconsole ()
"Get the console a game is played on" "Get the console a game is played on"
(setq consoles (s-split "\n" (f-read "~/Documents/drive/admin/emacs/consoles.txt") t)) (setq consoles (s-split "\n" (f-read "~/Documents/drive/admin/emacs/consoles.txt") t))
@ -223,7 +248,7 @@
:jump-to-captured t) :jump-to-captured t)
("w" "Website post" entry ("w" "Website post" entry
(file+function "" findweb) (file+function "" findweb)
"* %^{Title}\n%?" "* %^{Title} :post:\n:PROPERTIES:\n:realtitle: %(realtitle)\n:ogdesc: %(realdesc).\n:category: %(setcategory)\n:comments: %(thecomments)\n:END:\n%?"
:jump-to-captured t) :jump-to-captured t)
("1" "Completed game" entry ("1" "Completed game" entry
(file+function "" findhundred) (file+function "" findhundred)