Kobus (antelope), Furnaceland, Fusion torch, Wędrynia & Árboles
This commit is contained in:
parent
915785a34d
commit
924e09255c
1 changed files with 15 additions and 16 deletions
31
litanize.el
31
litanize.el
|
@ -1,12 +1,12 @@
|
||||||
;;; litanize.el --- generate "Latour Litanies" -*- lexical-binding: t; -*-
|
;;; litanize.el --- Generate "Latour Litanies" -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Copyright 2019 FoAM oü
|
;; Copyright 2019 FoAM oü
|
||||||
;;
|
;;
|
||||||
;; AUTHOR: nik gaffney <nik@fo.am>
|
;; AUTHOR: nik gaffney <nik@fo.am>
|
||||||
;; Created: 2019-01-19
|
;; Created: 2019-01-19
|
||||||
;; Version: 0.1
|
;; Version: 0.1
|
||||||
;; Package-Requires: ((enlive))
|
;; Package-Requires: ((emacs "24.1") (enlive "0.0.1") (s "1.12.0"))
|
||||||
;; Keywords: Latour Litany, alien phenomenology, ontography, metaphorism, carpentry
|
;; Keywords: tools, Latour Litany, alien phenomenology, ontography, metaphorism, carpentry
|
||||||
;; URL: https://github.com/zzkt/litanize
|
;; URL: https://github.com/zzkt/litanize
|
||||||
|
|
||||||
;; This file is not part of GNU Emacs.
|
;; This file is not part of GNU Emacs.
|
||||||
|
@ -28,11 +28,11 @@
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;; a simple version of Ian Bogost's method of generating "Latour Litanies"
|
;; A simple version of Ian Bogost's method of generating "Latour Litanies"
|
||||||
;; from random wikipedia titles as an exercise in ontography, metaphorism,
|
;; from random wikipedia titles as an exercise in ontography, metaphorism,
|
||||||
;; and carpentry
|
;; and carpentry
|
||||||
;;
|
;;
|
||||||
;; currently uses random wikipedia titles as elements. might be extended to
|
;; Currently uses random wikipedia titles as elements. Might be extended to
|
||||||
;; use other lists in other futures.
|
;; use other lists in other futures.
|
||||||
;;
|
;;
|
||||||
;; 'M-x litanize' will generate a litany in a new buffer
|
;; 'M-x litanize' will generate a litany in a new buffer
|
||||||
|
@ -41,7 +41,6 @@
|
||||||
;;
|
;;
|
||||||
;; further -> http://bogost.com/writing/blog/latour_litanizer/
|
;; further -> http://bogost.com/writing/blog/latour_litanizer/
|
||||||
|
|
||||||
|
|
||||||
;;; Revision history:
|
;;; Revision history:
|
||||||
;;
|
;;
|
||||||
;; - 2019-01-19 - preliminary carpentry
|
;; - 2019-01-19 - preliminary carpentry
|
||||||
|
@ -54,11 +53,11 @@
|
||||||
"Generating 'Latour Litanies' as an exercise in ontography, metaphorism, and carpentry"
|
"Generating 'Latour Litanies' as an exercise in ontography, metaphorism, and carpentry"
|
||||||
:group 'stochastism)
|
:group 'stochastism)
|
||||||
|
|
||||||
|
(require 's)
|
||||||
(require 'enlive)
|
(require 'enlive)
|
||||||
;; enlive can be installed via melpa or from https://github.com/zweifisch/enlive
|
|
||||||
|
|
||||||
(defun random-wp-title ()
|
(defun litanize-wp-title ()
|
||||||
"Return a random wikipedia title"
|
"Return a random wikipedia title."
|
||||||
(s-chop-suffix
|
(s-chop-suffix
|
||||||
" - Wikipedia"
|
" - Wikipedia"
|
||||||
(nth 2 (enlive-query
|
(nth 2 (enlive-query
|
||||||
|
@ -67,30 +66,30 @@
|
||||||
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun latour-litany (length)
|
(defun litanize-litany (length)
|
||||||
"Create an arbitary (or random) length litany in its own buffer"
|
"Create an arbitary (or random) LENGTH litany in its own buffer."
|
||||||
(interactive "nHow long a litany? ")
|
(interactive "nHow long a litany? ")
|
||||||
(with-current-buffer (get-buffer-create "*Latour litany*")
|
(with-current-buffer (get-buffer-create "*Latour litany*")
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(when (<= length 3) (setq length 3))
|
(when (<= length 3) (setq length 3))
|
||||||
(dotimes (i length)
|
(dotimes (i length)
|
||||||
(insert (random-wp-title))
|
(insert (litanize-wp-title))
|
||||||
(cond ((<= i (- length 3)) (insert ", "))
|
(cond ((<= i (- length 3)) (insert ", "))
|
||||||
((= i (- length 2)) (insert " & "))
|
((= i (- length 2)) (insert " & "))
|
||||||
((= i (- length 1)) (insert "."))))))
|
((= i (- length 1)) (insert "."))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun litanize ()
|
(defun litanize ()
|
||||||
"Create a Latour Litany in its own buffer"
|
"Create a Latour Litany in its own buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(latour-litany 5))
|
(litanize-litany 5))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun insert-litany ()
|
(defun insert-litany ()
|
||||||
"Create a Latour Litany at the current point"
|
"Create a Latour Litany at the current point."
|
||||||
(interactive)
|
(interactive)
|
||||||
(dotimes (i 5)
|
(dotimes (i 5)
|
||||||
(insert (random-wp-title))
|
(insert (litanize-wp-title))
|
||||||
(cond ((<= i 2) (insert ", "))
|
(cond ((<= i 2) (insert ", "))
|
||||||
((= i 3) (insert " & "))
|
((= i 3) (insert " & "))
|
||||||
((= i 4) (insert ".")))))
|
((= i 4) (insert ".")))))
|
||||||
|
|
Loading…
Reference in a new issue