This commit is contained in:
bth 2024-01-13 12:18:55 -08:00
commit a61ce23294
3 changed files with 42 additions and 4 deletions

40
README.md Normal file
View file

@ -0,0 +1,40 @@
# um
An (U)ltralight database for (M)arkdown composition.
`um` is an ultralight database design and emacs toolkit for organizing writing into larger compositions. It uses only unique filenames, POSIX filesystem conventions, the builtin emacs `project` package, and standard POSIX commandline tools to build out the CLI.
It consists of two parts:
1. Elisp for functionality within emacs. Most of it is integrated directly with the `project` interface, and consists the ability to find a file from a filename.
2. Bash scripts for the commandline interface. I prefer a CLI for file creation and management rather than more emacs functions, because chaining shell commands is easy and I think of the commandline as the point of reference for all filesystem management.
Conceptually, `um` is somewhat like org-roam, except without any database dependency. (And it assumes Markdown rather than org, which I don't care for.)
The "database" depends on a few simple ideas:
1. A numbered filename specification which serves as unique id. The files are their own representation.
2. Placing that same id into the file header, so that concatenated files have reference back to their source. See the `um cat` command.
3. Using a source "journal/" directory, where source files should first be composed and where we can assume a file exists if not elsewhere.
4. Using the built-in emacs `project` package to organize compositions built from these source files.
## config
My config looks like this:
```elisp
(use-package um
:after (project embark)
:config
(defalias 'journal 'uldb-journal-header)
(advice-add 'embark-target-file-at-point :around 'uldb-file-at-point-advice)
:load-path "~/dev/um/elisp"
)
```

View file

@ -111,4 +111,4 @@ print finalstr
}' }'
` `
emacsclient --eval "(progn (find-file \"$NEXTFILE\") (journal) (message \"creating $NEXTFILE\"))" emacsclient --eval "(progn (find-file \"$NEXTFILE\") (uldb-journal-header) (message \"creating $NEXTFILE\"))"

View file

@ -27,15 +27,13 @@
;; 4. Using the built-in `project' package to organize compositions built from ;; 4. Using the built-in `project' package to organize compositions built from
;; these source files. ;; these source files.
;; 5. (Optional) Use `embark' to visit files with a single keystroke.
;; features provided: ;; features provided:
;; `um-journal-header' defines the standard header ;; `um-journal-header' defines the standard header
;; `um-project-find-meta' via `project-switch-project': open a file like ;; `um-project-find-meta' via `project-switch-project': open a file like
;; *meta.md in a given project. ;; *meta.md in a given project.
;; `um-file-at-point-advice' via `embark-dwim': open file in known projects ;; (Optional) `um-file-at-point-advice' via `embark-dwim': open file in known projects
;; with fallback to journal/ ;; with fallback to journal/
;; `um-grep-tag': search files with same tag ;; `um-grep-tag': search files with same tag