From 9a2164451cf8c232024c8a796df7324bc5e3238e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Perrin?= Date: Sun, 30 Jan 2011 23:05:14 +0100 Subject: [PATCH] Add example usage. --- atom.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/atom.el b/atom.el index 7b43065..694176d 100644 --- a/atom.el +++ b/atom.el @@ -22,9 +22,23 @@ ;; This is a library for creating an Atom file from a Lisp program. +;; A typical usage would look like this: + +;; (let ((my-atom-feed (atom-create "My feed" "http://example.org"))) +;; (atom-add-text-entry my-atom-feed +;; "Hello world" +;; "http://example.org/hello" +;; "Hello the world!") +;; (atom-add-xhtml-entry my-atom-feed +;; "An XHTML example" +;; "http://example.org/html-example" +;; "

One can also use XHTML in the +;; entries.

") +;; (atom-print my-atom-feed)) + ;;; Code: -(defun atom-create (title author link &optional updated id) +(defun atom-create (title link &optional author updated id) "Create a new atom structure. TITLE is the title for the feed, a short, text-only, human @@ -41,6 +55,7 @@ UPDATED is the date the feed was last updated. If not given, ID is a unique identifier for this feed. If not given, it defaults to LINK." + `((title nil ,title) (link ((href . ,link))) ,(atom-massage-author author) -- 2.43.0