diff --git a/README.md b/README.md new file mode 100644 index 0000000..f74aa9d --- /dev/null +++ b/README.md @@ -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" +) +``` diff --git a/bash/next/next.sh b/bash/next/next.sh index b9359e7..dd69135 100755 --- a/bash/next/next.sh +++ b/bash/next/next.sh @@ -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\"))" diff --git a/elisp/um.el b/elisp/um.el index e53189a..38e429b 100644 --- a/elisp/um.el +++ b/elisp/um.el @@ -27,15 +27,13 @@ ;; 4. Using the built-in `project' package to organize compositions built from ;; these source files. -;; 5. (Optional) Use `embark' to visit files with a single keystroke. - ;; features provided: ;; `um-journal-header' defines the standard header ;; `um-project-find-meta' via `project-switch-project': open a file like ;; *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/ ;; `um-grep-tag': search files with same tag