diff --git a/examples/dump-db.lisp b/examples/dump-db.lisp new file mode 100644 index 0000000..686057a --- /dev/null +++ b/examples/dump-db.lisp @@ -0,0 +1,17 @@ +(eval-when (:compile-toplevel :load-toplevel :execute) + (ql:quickload '(coleslaw cl-store))) + +(in-package :coleslaw) + +(defun main () + (let ((db-file (rel-path (user-homedir-pathname) ".coleslaw.db"))) + (format t "~%~%Coleslaw loaded. Attempting to load config file.~%") + (load-config "") + (format t "~%Config loaded. Attempting to load blog content.~%") + (load-content) + (format t "~%Content loaded. Attempting to dump content database.~%") + (cl-store:store *site* db-file) + (format t "~%Content database saved to ~s!~%~%" (namestring db-file)))) + +(main) +(exit) diff --git a/examples/dump_db.sh b/examples/dump_db.sh new file mode 100755 index 0000000..d0bd651 --- /dev/null +++ b/examples/dump_db.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +LISP=sbcl + +## Disclaimer: +## I have not tested that all lisps take the "--load" flag. +## This code might spontaneously combust your whole everything. + +$LISP --load "dump-db.lisp"