Version bump to 0.6. Move LOAD-PLUGINS into config file. Minor cleanups.

This commit is contained in:
Brit Butler 2012-08-29 13:23:35 -04:00
parent e7c74770f0
commit aa0ddff149
3 changed files with 15 additions and 17 deletions

View file

@ -1,17 +1,16 @@
(defsystem #:coleslaw (defsystem #:coleslaw
:name "coleslaw-core" :name "coleslaw-core"
:description "Flexible Lisp Blogware" :description "Flexible Lisp Blogware"
:version "0.5" :version "0.6"
:license "BSD" :license "BSD"
:author "Brit Butler <redline6561@gmail.com>" :author "Brit Butler <redline6561@gmail.com>"
:pathname "src/" :pathname "src/"
:depends-on (:alexandria :closure-template :3bmd :3bmd-ext-code-blocks :depends-on (:closure-template :3bmd :3bmd-ext-code-blocks
:local-time :trivial-shell :cl-fad) :alexandria :local-time :trivial-shell :cl-fad)
:serial t :serial t
:components ((:file "packages") :components ((:file "packages")
(:file "config")
(:file "util") (:file "util")
(:file "plugins") (:file "config")
(:file "themes") (:file "themes")
(:file "coleslaw") (:file "coleslaw")
(:file "feeds") (:file "feeds")

View file

@ -15,6 +15,17 @@
(defparameter *config* nil (defparameter *config* nil
"A variable to store the blog configuration and plugin settings.") "A variable to store the blog configuration and plugin settings.")
(defun load-plugins (plugins)
"Resolve the path of each symbol in PLUGINS and call LOAD on the
resulting pathnames. It is expected that the matching *.lisp files
are in the plugins folder in coleslaw's source directory."
(let ((files (mapcar (lambda (sym)
(app-path "plugins/~a" (string-downcase (symbol-name sym))))
plugins)))
(map nil (lambda (file)
(compile-file file)
(load file)) files)))
(defun load-config (&optional (dir (user-homedir-pathname))) (defun load-config (&optional (dir (user-homedir-pathname)))
"Load the coleslaw configuration from DIR/.coleslawrc. DIR is ~ by default." "Load the coleslaw configuration from DIR/.coleslawrc. DIR is ~ by default."
(with-open-file (in (merge-pathnames ".coleslawrc" dir)) (with-open-file (in (merge-pathnames ".coleslawrc" dir))

View file

@ -1,12 +0,0 @@
(in-package :coleslaw)
(defun load-plugins (plugins)
"Resolve the path of each symbol in PLUGINS and call LOAD on the
resulting pathnames. It is expected that the matching *.lisp files
are in the plugins folder in coleslaw's source directory."
(let ((files (mapcar (lambda (sym)
(app-path "plugins/~a" (string-downcase (symbol-name sym))))
plugins)))
(map nil (lambda (file)
(compile-file file)
(load file)) files)))