diff options
author | Logan Hunt <loganjh@amazon.com> | 2022-05-24 09:57:15 -0700 |
---|---|---|
committer | Logan Hunt <loganjh@amazon.com> | 2022-05-24 09:57:15 -0700 |
commit | 3db9a2eb7a7d14ce935f5902b0c21ce4fd5eb729 (patch) | |
tree | f618b9a6342b8d30c39454e9cf7b3cabefc04db4 /main.lisp | |
download | lispruns-3db9a2eb7a7d14ce935f5902b0c21ce4fd5eb729.tar.gz lispruns-3db9a2eb7a7d14ce935f5902b0c21ce4fd5eb729.zip |
None of the original commit messages would actually help anyone
Diffstat (limited to 'main.lisp')
-rw-r--r-- | main.lisp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main.lisp b/main.lisp new file mode 100644 index 0000000..5efd61e --- /dev/null +++ b/main.lisp @@ -0,0 +1,39 @@ +(ql:quickload '(unix-opts mito cl-ppcre croatoan local-time)) + +;; Migrate database structure +(mito:connect-toplevel :sqlite3 :database-name #P"timer.db") +(setq mito:*auto-migration-mode* t) +(load "database/category.lisp") +(load "database/run.lisp") + +;; Utils +(load "util.lisp") + +;; Config file importing +(load "config.lisp") + +;; Load the UI +(load "ui.lisp") + +;; The timing logic +(load "speedrun.lisp") + +;; Define command line arguments +(opts:define-opts + (:name :import + :description "create splits and category from a config file" + :short #\i + :long "import" + :arg-parser #'identity)) + +(defmacro when-option ((options opt) &body body) + `(let ((it (getf ,options ,opt))) + (when it + ,@body))) +(defun main () + (let ((options (opts:get-opts))) + (when-option (options :import) + (import-config (getf options :import)))) + (run-ui)) + +(main) |