X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mixi-atom.el;h=4cd250f9f12913340e84df7e6749c0d7f59e9c9b;hb=13307b6d03ef2420dadd7ef96a85ba7c1d126ece;hp=2ac5e12f2031b93c916dab8e93c2048488156575;hpb=bda146f582b9a42f29c8dea55107dae30f055a25;p=elisp%2Fmixi.git diff --git a/mixi-atom.el b/mixi-atom.el index 2ac5e12..4cd250f 100644 --- a/mixi-atom.el +++ b/mixi-atom.el @@ -44,6 +44,11 @@ :type 'string :group 'mixi) +(defcustom mixi-atom-self "" + "*URI for retrieving Atom Feed Documents representing this Atom feed." + :type 'string + :group 'mixi) + (defcustom mixi-atom-title "Mixi Feed" "*Title for feed." :type 'string @@ -96,7 +101,8 @@ RANGE is the range for getting articles. If RANGE is nil, get all articles." " " (mixi-make-tag-uri object) "\n" " " (mixi-atom-make-date (mixi-object-time object)) "\n" - " " (mixi-remove-markup (mixi-make-content object)) + " " (mixi-encode-specials-string + (mixi-remove-markup (mixi-make-content object))) "\n" "\n")) @@ -116,12 +122,12 @@ RANGE is the range for getting articles. If RANGE is nil, get all articles." objects) entries)) -;;;###autoload (defun mixi-make-atom () "Make Atom Syndication Format" - (insert "\n" "\n" + "\n" "\n" "" mixi-atom-title "\n" "\n" @@ -146,9 +152,17 @@ RANGE is the range for getting articles. If RANGE is nil, get all articles." "\n")) ;;;###autoload -(defun mixi-make-atom-file () +(defun mixi-atom-cgi () + (princ (concat "Content-Type: application/atom+xml; charset=" + (symbol-name mixi-atom-coding-system) "\n" + "\n" + (encode-coding-string (mixi-make-atom) + mixi-atom-coding-system)))) + +;;;###autoload +(defun mixi-atom-file () (with-temp-buffer - (mixi-make-atom) + (insert (mixi-make-atom)) (let ((coding-system-for-write mixi-atom-coding-system) (file (expand-file-name mixi-atom-file))) (write-region (point-min) (point-max) file))))