Like Athena, this project emerged fully formed from my head
At least, from this historical record as preserved by git, it is. In reality, this project represents a year of off-and-on development in another git repository, and has been converted and reformatted for (potentially) public consumption. Particularly lacking is the Tables and other charts that make this useful, but I need to make sure I don't violate any copyright laws, as many of my tables were copy/pasted from digital books I own.
This commit is contained in:
parent
1602a9b01d
commit
5455785b08
18 changed files with 1915 additions and 29 deletions
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 2021 Howard X. Abrams
|
||||
;;
|
||||
;; Author: Howard X. Abrams <http://gitlab.com/howardabrams>
|
||||
;; Maintainer: Howard X. Abrams <howard.abrams@workday.com>
|
||||
;; Maintainer: Howard X. Abrams
|
||||
;; Created: January 8, 2021
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
|
@ -38,6 +38,10 @@
|
|||
(defvar rpgdm-tables (make-hash-table :test 'equal)
|
||||
"Collection of tables and lists for the Dungeon Master.")
|
||||
|
||||
(defun rpgdm-tables-clear ()
|
||||
"Clear previously loaded tables."
|
||||
(interactive)
|
||||
(setq rpgdm-tables (make-hash-table :test 'equal)))
|
||||
|
||||
(defun rpgdm-tables-load (&optional filepath)
|
||||
"Read and parse table files located in FILEPATH directory.
|
||||
|
|
@ -161,6 +165,15 @@ would be converted randomly to something like: 'You found a box.'"
|
|||
(goto-char (point-min))
|
||||
(flush-lines (rx bol (zero-or-more space) "#"))
|
||||
|
||||
;; I noticed that org-mode links we screwing up the output, so we strip them out:
|
||||
|
||||
(goto-char (point-min))
|
||||
(let ((org-link-re (rx "[[" (one-or-more (not "]")) "]["
|
||||
(group (one-or-more (not "]")))
|
||||
"]]")))
|
||||
(while (re-search-forward org-link-re nil t)
|
||||
(replace-match (match-string 1) nil nil)))
|
||||
|
||||
;; The following predicates are not /pure functions/, as they scan the
|
||||
;; current buffer, leaving the initial match in the 'hopper', so the parsing
|
||||
;; function called makes that assumption, and will immediately grab that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue