Common Lisp Package: NUCLBLOG

README:

FUNCTION

Public

DEFINE-BLOG-HANDLERS (BLOG)

Defines the easy handlers for a given blog.

Private

CONCATENATE-URL (BASE &REST STRINGS)

Concatenates strings. In theory, this could be smarter about checking validity of URLs, fixing redundant slashes, etc...

ENTRY-HTML (BLOG ENTRY)

Outputs html for a blog entry.

ENTRY-RSS (BLOG ENTRY)

Outputs RSS 2.0 for a given blog entry.

Undocumented

ARCHIVES-URL (BLOG &KEY CATEGORY RSS)

BLOG-ARCHIVES (BLOG &KEY CATEGORY)

BLOG-ARCHIVES-RSS (BLOG &KEY LIMIT CATEGORY)

BLOG-DELETE (BLOG &KEY ID USER PASSWORD)

BLOG-DISPLAY (BLOG &KEY ID)

BLOG-EDIT (BLOG &KEY ID CATEGORY CONTENT TITLE USER PASSWORD)

BLOG-LOGIN (BLOG &KEY USER PASSWORD)

BLOG-LOGIN-PAGE (BLOG &OPTIONAL USER PASSWORD)

BLOG-LOGOUT (BLOG)

BLOG-MAIN (BLOG)

BLOG-NEW (BLOG &KEY CATEGORY CONTENT TITLE USER PASSWORD)

BLOG-PAGE (BLOG TITLE BODY-FUNCTION)

BLOG-STATUS (BLOG)

BUTTONS (BLOG)

CATEGORIES (BLOG)

CHANNEL-RSS (BLOG &KEY (LIMIT 10) CATEGORY)

CREATE-BLOG-ENTRY (BLOG CATEGORY TITLE CONTENTS USER &KEY (NUMBER (GET-NEXT-ENTRY-NUMBER BLOG)) (TIME (GET-UNIVERSAL-TIME)))

DELETE-BLOG-ENTRY (BLOG NUMBER)

ENTRY-LINK (BLOG ENTRY)

GET-BLOG-ENTRIES (BLOG &KEY CATEGORY)

GET-ENTRY (NUMBER BLOG)

GET-NEXT-ENTRY-NUMBER (BLOG)

GET-PROTOCOL

MAKE-ARCHIVES-URL (BLOG CATEGORY &KEY RSS)

MAKE-DELETE-ENTRY-URL (BLOG ENTRY)

MAKE-EDIT-ENTRY-URL (BLOG ENTRY)

MAKE-ENTRY-URL (BLOG ENTRY)

MAKE-FULL-ENTRY-URL (BLOG ENTRY)

MAKE-FULL-ROOT-URL (BLOG)

MAKE-KEYWORD (STRING)

MARKDOWN* (SOURCE)

PARSE-HOST-NAME-AND-PORT (HOST-AND-PORT)

RECENT-ENTRIES (BLOG)

SORTED-BLOG-ENTRIES (BLOG &KEY CATEGORY)

MACRO

Private

DEFINE-BLOG-HANDLER (DESCRIPTION LAMBDA-LIST BLOG-FN)

Like define-easy-handler, except it takes a first argument blog. If description is an atom, it is the blog for which the handler is to be defined. If it is a list, the first item is the blog, followed by the keyword args. The keyword :uri argument in the description will be appended to the blog-url-root of the specified blog. See define-easy-handler for further details. A function designator to be funcalled is provided. This function is then called with the blog as the first argument and keyword arguments for each of the parameters in lambda-list. Note that the called function need not specify default values for the keyword parameters as those are established here.

WITH-HTML (&BODY BODY)

Executes BODY inside a cl-who:with-html-output body.

WITH-HTML-PAGE (&BODY BODY)

Executes BODY inside a cl-who:wtih-html-output-to-string body, directing the output to *standard-output* and setting :prologue to t.

WITH-UNIQUE-NAMES ((&REST BINDINGS) &BODY BODY)

Syntax: WITH-UNIQUE-NAMES ( { var | (var x) }* ) declaration* form* Executes a series of forms with each VAR bound to a fresh, uninterned symbol. The uninterned symbol is as if returned by a call to GENSYM with the string denoted by X - or, if X is not supplied, the string denoted by VAR - as argument. The variable bindings created are lexical unless special declarations are specified. The scopes of the name bindings and declarations do not include the Xs. The forms are evaluated in order, and the values of all but the last are discarded (that is, the body is an implicit PROGN).

WITH-XML (&BODY BODY)

Executes BODY inside a cl-who:with-html-output body. This is a synonym for with-html, but it would be nice if this could automatically deal with turning off the tag downcasing, which it currently doesn't.

WITH-XML-OUTPUT-TO-STRING ((&OPTIONAL (STREAM *STANDARD-OUTPUT*)) &BODY BODY)

Prints the <?xml...?> header to stream and Executes BODY inside of a cl-who:with-html-output-to-string block. There is some machinery to turn off downcasing of the tags, but I think this doesn't work as I intended and should be removed.

Undocumented

BOX ((&KEY CLASS ID) HEAD &REST BODY)

DEFINE-AUTHORIZED-BLOG-HANDLER (DESCRIPTION LAMBDA-LIST BLOG-FN)

WITH-BLOG-PAGE (BLOG TITLE &BODY BODY)

GENERIC-FUNCTION

Public

Undocumented

Private

BLOG-DISPATCH (REQUEST BLOG)

The dispatch (generic) function for the blog handlers. This should be added to the hunchentoot:*dispatch-table*.

Undocumented

ADD-USER (BLOG USER PASSWORD)

BLOG-ARCHIVES-URL (BLOG)

BLOG-CSS-URL (BLOG)

BLOG-DELETE-ENTRY-URL (BLOG)

BLOG-DISPLAY-ENTRY-URL (BLOG)

BLOG-EDIT-ENTRY-URL (BLOG)

BLOG-EMAIL-REDIRECT-URL (BLOG)

BLOG-ENTRY-DISPLAY (BLOG ENTRY)

BLOG-LOGIN-URL (BLOG)

BLOG-LOGOUT-URL (BLOG)

BLOG-NEW-CATEGORY-URL (BLOG)

BLOG-NEW-ENTRY-URL (BLOG)

BLOG-RSS-URL (BLOG)

BLOG-TRACKBACK-URL (BLOG)

CHECK-PASSWORD (BLOG USER PASSWORD)

READ-BLOG-ENTRIES (BLOG &KEY PATH (PATH (BLOG-ENTRY-STORAGE-PATH BLOG)))

STORE-BLOG-ENTRIES (BLOG PATH)

SLOT-ACCESSOR

Public

BLOG-ENTRIES (OBJECT)

A list of the entries for this blog. This should eventually be changed to something more flexible to allow for other representations of blog entries.

SETFBLOG-ENTRIES (NEW-VALUE OBJECT)

A list of the entries for this blog. This should eventually be changed to something more flexible to allow for other representations of blog entries.

BLOG-REALM (OBJECT)

A realm to manage users and passwords for the blog.

SETFBLOG-REALM (NEW-VALUE OBJECT)

A realm to manage users and passwords for the blog.

Private

BLOG-BANNER (OBJECT)

A function to be used as the banner (or NIL).

SETFBLOG-BANNER (NEW-VALUE OBJECT)

A function to be used as the banner (or NIL).

BLOG-BUTTONS (OBJECT)

A list of lambda-lists of the form (&key href-url id img-url alt) that specifies the the buttons to be displayed on blog pages.

SETFBLOG-BUTTONS (NEW-VALUE OBJECT)

A list of lambda-lists of the form (&key href-url id img-url alt) that specifies the the buttons to be displayed on blog pages.

BLOG-CATEGORIES (OBJECT)

A list of the categories of the possible categories for entries in this blog.

SETFBLOG-CATEGORIES (NEW-VALUE OBJECT)

A list of the categories of the possible categories for entries in this blog.

BLOG-ENTRY-STORAGE-PATH (OBJECT)

The path to the file to store the blog entries. This should be replaced with something more flexible.

SETFBLOG-ENTRY-STORAGE-PATH (NEW-VALUE OBJECT)

The path to the file to store the blog entries. This should be replaced with something more flexible.

BLOG-HANDLER-ALIST (OBJECT)

An alist of (URL . function) pairs for use by the blog-dispatcher.

SETFBLOG-HANDLER-ALIST (NEW-VALUE OBJECT)

An alist of (URL . function) pairs for use by the blog-dispatcher.

BLOG-LOGO-IMG-URL (OBJECT)

The URL of the logo for this blog.

SETFBLOG-LOGO-IMG-URL (NEW-VALUE OBJECT)

The URL of the logo for this blog.

BLOG-OWNER-EMAIL (OBJECT)

The email address of the owner of this blog.

SETFBLOG-OWNER-EMAIL (NEW-VALUE OBJECT)

The email address of the owner of this blog.

BLOG-PAGE-CSS (OBJECT)

A URL to the CSS style to load for the pages for this blog.

SETFBLOG-PAGE-CSS (NEW-VALUE OBJECT)

A URL to the CSS style to load for the pages for this blog.

BLOG-SHORT-NAME (OBJECT)

An abbreviated name for this blog.

SETFBLOG-SHORT-NAME (NEW-VALUE OBJECT)

An abbreviated name for this blog.

BLOG-SSL-PORT (OBJECT)

If use-ssl-p is non-nil, the port on which to use https links. If this is no port is explicitly specified and, presumably, the browser will use 443.

SETFBLOG-SSL-PORT (NEW-VALUE OBJECT)

If use-ssl-p is non-nil, the port on which to use https links. If this is no port is explicitly specified and, presumably, the browser will use 443.

BLOG-SUBTITLE (OBJECT)

The subtitle of this blog.

SETFBLOG-SUBTITLE (NEW-VALUE OBJECT)

The subtitle of this blog.

BLOG-TITLE (OBJECT)

The title of this blog.

SETFBLOG-TITLE (NEW-VALUE OBJECT)

The title of this blog.

BLOG-URL-ROOT (OBJECT)

The URL for the root of this blog. Prepended to the suffixes of various blog-related URLs

SETFBLOG-URL-ROOT (NEW-VALUE OBJECT)

The URL for the root of this blog. Prepended to the suffixes of various blog-related URLs

BLOG-USE-SSL-P (OBJECT)

If non-nil, use https pages for authorized blog pages.

SETFBLOG-USE-SSL-P (NEW-VALUE OBJECT)

If non-nil, use https pages for authorized blog pages.

Undocumented

BLOG-ENTRY-CATEGORY (OBJECT)

SETFBLOG-ENTRY-CATEGORY (NEW-VALUE OBJECT)

BLOG-ENTRY-CONTENTS (OBJECT)

SETFBLOG-ENTRY-CONTENTS (NEW-VALUE OBJECT)

BLOG-ENTRY-NUMBER (OBJECT)

SETFBLOG-ENTRY-NUMBER (NEW-VALUE OBJECT)

BLOG-ENTRY-REVISED-TIME (OBJECT)

SETFBLOG-ENTRY-REVISED-TIME (NEW-VALUE OBJECT)

BLOG-ENTRY-TIME (OBJECT)

SETFBLOG-ENTRY-TIME (NEW-VALUE OBJECT)

BLOG-ENTRY-TITLE (OBJECT)

SETFBLOG-ENTRY-TITLE (NEW-VALUE OBJECT)

BLOG-ENTRY-TRACKBACKS (OBJECT)

SETFBLOG-ENTRY-TRACKBACKS (NEW-VALUE OBJECT)

BLOG-ENTRY-USER (OBJECT)

SETFBLOG-ENTRY-USER (NEW-VALUE OBJECT)

BLOG-URI-HANDLER-HANDLER (OBJECT)

SETFBLOG-URI-HANDLER-HANDLER (NEW-VALUE OBJECT)

BLOG-URI-HANDLER-REQUIRE-AUTHORIZATION (OBJECT)

SETFBLOG-URI-HANDLER-REQUIRE-AUTHORIZATION (NEW-VALUE OBJECT)

BLOG-URI-HANDLER-URI (OBJECT)

SETFBLOG-URI-HANDLER-URI (NEW-VALUE OBJECT)

VARIABLE

Private

*BLOG-DISPATCH-BLOGS*

Undocumented

*ENTRIES-FILE-LOCK*

*ENTRIES-LOCK*

*LOGIN-PAGE-FUNCTION*

*TAG-STATE*

CLASS

Public

BLOG

Objects of this class represent nuclblog instances.

Undocumented

AUTHORIZED-BLOG

Private

Undocumented

BLOG-ENTRY

BLOG-URI-HANDLER