ulthar.xyz > Repos

leibowitz

Experimental Common Lisp object storage abstraction for Unix file systems
About Files Commits git clone https://ulthar.xyz/repos/leibowitz/leibowitz.git

Files

README.md

Leibowitz

Leibowitz is my attempt at building a personal knowledge management (PKM) platform. It consists of a Common Lisp library exposed as a command-line utility and a web interface that act as an abstraction layer over the Unix file system providing the following features:

At present Leibowitz is very much a work in progress and is varying degrees of useful from a REPL, the command line, and a web UI. I WOULD STRONGLY RECOMMEND AGAINST USING IT IN PRODUCTION.

Installation and Usage

In order to compile Leibowitz, you need to be running a Unix-like system with make(1) and the Steel Bank Common Lisp compiler. The ASDF build system and UIOP utility library are also needed, but will probably already be installed along with SBCL. In order to run Leibowitz, you need to have the SQLite3 library installed, and have the ffmpeg, mupdf, ImageMagick, and optionally LibreOffice programs installed somewhere in your $PATH.

Man page generation requires changes to the clingon library that have not yet made it to the release on quicklisp, so you'll need to clone it to the lib/ or your quicklisp/local-projects directory.

I've put effort into making building and installing as painless as possible for people who don't know Lisp:

make deps
make
sudo make install

This will download all of Leibowitz's Lisp dependencies to the build directory. If you have quicklisp installed, you can set WITH_QUICKLISP=1 when invoking make and forego the make deps.

Usage information is available with man 1 leibowitz, which is still admittedly sparse.

If you're familiar with Lisp, hacking on Leibowitz should be as simple as running (load #P"leibowitz.asd") and (ql:quickload :leibowitz). If you don't want to use Quicklisp, download the dependencies with make deps, and at the REPL

(load "build.lisp")
(leibowitz.build:discover-systems "build/dependences/")
(asdf:load-system :leibowitz)

Integration tests may be run at the command line with make test or in the REPL with (asdf:test-system :leibowitz) (if any of them fail, use (parachute:test 'leibowitz/tests::name-of-test :report 'parachute:interactive) to debug them directly).

Screenshot

These examples all show a library of ebooks, mostly epub and pdf files.

Web view showing the main file listing

Web view showing a directory listing

Web view showing a tag listing

Web view showing an epub file's metadata

Roadmap to 0.1 version; minimum viable product

Basic requirements: DONE

Core

  • [X] ~~Fix predicate/predicand bug where tags are being automatically applied where they shouldn't be. This might be a usage error in web, which itself would indicate that my API is probably too unintuitive and in need of revision.~~ I haven't encountered this since so I'm almost certain I miss-used the core's API.
  • [X] Common Lisp's pathname type treats certain characters (eg, *, [, ]) in file names specially; figure out how to work around this! This results in two different errors when calling index:
    • When such a file is in a directory that is being indexed we get ENOENT re-thrown up from index-worker in index (the error-handling currently truncates stack traces), I think this is caused by pathname/namestring conversion causes extra backslashes to be inserted at some point.
    • And when indexing it directly we get a type error SB-IMPL::PATTERN is not of type VECTOR from an aref call in library-path-indexable-p, I gather this is because pathname patterns are formed differently.

Web

  • [X] Add more error handling to the web UI! Right now it is insanely easy to get this thing to crash.
  • [X] Expose the full API functionality in the web frontend:
    • [X] Editing data entries:
      • [X] Adding tags
      • [X] Removing tags
      • [X] Moving/renaming
      • [X] Uploading/importing from URL
      • [X] Manually reindexing files and directories; useful /tree
      • [X] Deleting
    • [X] Editing tag entries:
      • [X] Removing data
      • [X] Renaming tags
      • [X] Editing tag description
      • [X] Adding parents
      • [X] Removing parents
    • [X] Search and listing:
      • [X] Support changing the sort order and criterion for all data listings
      • [X] Paginate
      • [X] Card view for more convenient browsing
    • [X] Remove use of library-list-files-in-dir in web; wrappers around list-files should leverage its full capabilities for filtering.

CLI

  • [X] The cli needs a way to normalize paths before passing them to the library; CL is absolutely clueless when it comes to resolving unix path notation.
  • [X] Expose the full API functionality in the CLI interface:
    • [X] Editing data entries:
      • [X] Adding tags
      • [X] Removing tags
      • [X] Moving/renaming
      • [X] Manually reindexing files and directories
      • [X] Deleting
      • [X] Viewing data summaries
    • [X] Editing tag entries:
      • [X] Adding data
      • [X] Removing data
      • [X] Renaming tags
      • [X] Editing tag description
      • [X] Adding parents
      • [X] Removing parents
      • [X] Adding children
      • [X] Removing children
      • [X] Viewing tag summaries
      • [X] Test -i|--invert flag for tag edit subcommands
    • [X] Search and listing:
      • [X] Support changing the sort order and criterion for all data listings

Known Bugs

Future Work

Web

Core

Miscellaneous

Notes

Generated 2024-06-10 19:24:14 -0700 by RepoRat