|
@@ -7,8 +7,9 @@
|
7
|
7
|
|
8
|
8
|
(in-package :coleslaw-twitter)
|
9
|
9
|
|
10
|
|
-(defvar *tweet-format* '("~A" (title post) (text content))
|
11
|
|
- "Controls what the tweet annoucing the post looks like. It is the made up of a format control string followed with the pertinent variables.")
|
|
10
|
+(defvar *tweet-format* '("~A by ~A" coleslaw::post-title coleslaw::post-author)
|
|
11
|
+ "Controls what the tweet annoucing the post looks like. It contains a format
|
|
12
|
+ control string followed with the accesors to evaluate for post.")
|
12
|
13
|
|
13
|
14
|
(defun enable (&key api-key api-secret access-token access-secret tweet-format)
|
14
|
15
|
(if (and api-key api-secret access-token access-secret)
|
|
@@ -42,4 +43,7 @@
|
42
|
43
|
|
43
|
44
|
(defun render-tweet (post)
|
44
|
45
|
"Sans the url, which is a must."
|
45
|
|
- (apply #'format (append '(nil) *tweet-format*)))
|
|
46
|
+ (apply #'format `(nil ,(car *tweet-format*)
|
|
47
|
+ ,@(loop
|
|
48
|
+ :for accesor in (cdr *tweet-format*)
|
|
49
|
+ :collect (funcall accesor post)))))
|