First version of atom.el --A library for creating Atom feeds

2011-02-07 Thread Frédéric Perrin
Hello,

I am pleased to announce the first version of atom.el. This is a library
for creating an Atom feed from a Lisp program. The normal usage is to
create a feed with `atom-create', giving it a title and a Web address.
Once the feed has been created, entries may be added to the feed, by
specifying (at the minimum) a title, a permanent link and the content of
the entry. Text-only, HTML and XHTML entries are supported.

It is possible to produce both Atom and RSS feeds.

A simple feed would be created like this:

 (let ((my-atom-feed (atom-create My feed http://example.org;)))

   ;; A simple, text-only entry
   (atom-add-text-entry
my-atom-feed
Hello world
http://example.org/hello;
Hello the world!)

   ;; an XHTML entry
   (atom-add-xhtml-entry
my-atom-feed
An XHTML example
http://example.org/html-example;
pOne can also use acronymXHTML/acronym in the entries./p)

   ;; Get the resulting Atom feed (see also `atom-write-file')
   (atom-print my-atom-feed))

The code for this library is hosted at http://code.tar-jx.bz/atom.git;
a complete manual can be found at http://tar-jx.bz/code/atom.html.

-- 
Frédéric Perrin -- http://tar-jx.bz



atom.el
Description: atom.el -- a library for creating Atom feeds
___
gnu-emacs-sources mailing list
gnu-emacs-sources@gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources


Re: tarot.el update

2011-02-07 Thread Joe Corneli
Some time ago I posted a version of tarot.el that didn't do tarot
spreads.  This version does one type of (very simple) tarot spread.
Attached, and appended for convenience.

;;; tarot.el -- draw a random tarot card

;; Copyright (C) 2007, 2011 Joseph Corneli holtzerman...@gmail.com
;; Notice: Copyright transfered to public domain wherever applicable.

;; Time-stamp: 2011-02-07 01:03:35 joe

;;; Commentary:

;; Latest version now includes a simple four-card spread
;; and alt-text from Alliete and Crowley (where
;; applicable).

;;; Code:

(defvar tarot-deck [[Fool   La Follie ou l'Alchemiste]
[Magician   Le Magicien ou le Bateleur]
[High Priestess Repos]
[EmpressLes Astres]
[EmperorLes Ouiseaux et les Poissons]
[Hierophant Le Grand pretre]
[Lovers Le Chaos]
[ChariotLe Despote africain]
[Strength   La Force]
[Hermit Le Capucin]
[Wheel of Fortune   La Roue de Fortune]
[JusticeLa Justice]
[Hanged Man La Prudence]
[Death  La Mort]
[Temperance La Temperance]
[Devil  Le Diable]
[Tower  Le Temple Foudroye]
[Star   La Ciel]
[Moon   Les Plantes]
[SunLa Lumiere]
[Judgement  Le Jugement Dernier]
[World  L'homme et les Quadrupedes]
[Ace of Wands   The Root of the Powers of Fire]
[2 of Wands Dominion]
[3 of Wands Virtue]
[4 of Wands Completion]
[5 of Wands Strife]
[6 of Wands Victory]
[7 of Wands Valour]
[8 of Wands Swiftness]
[9 of Wands Strength]
[10 of WandsOppression]
[Page of Wands]
[Knight of Wands]
[Queen of Wands]
[King of Wands]
[Ace of CupsThe Root of the Powers of Water]
[2 of Cups  Love]
[3 of Cups  Abundance]
[4 of Cups  Luxury]
[5 of Cups  Disappointment]
[6 of Cups  Pleasure]
[7 of Cups  Debauch]
[8 of Cups  Indolence]
[9 of Cups  Happiness]
[10 of Cups Satiety]
[Page of Cups]
[Knight of Cups]
[Queen of Cups]
[King of Cups]
[Ace of Swords  The Root of the Powers of Air]
[2 of SwordsPeace]
[3 of SwordsSorrow]
[4 of SwordsTruce]
[5 of SwordsDefeat]
[6 of SwordsScience]
[7 of SwordsFutility]
[8 of SwordsInterference]
[9 of SwordsCruelty]
[10 of Swords   Ruin]
[Page of Swords]
[Knight of Swords]
[Queen of Swords]
[King of Swords]
[Ace of Pentacles  The Root of the Powers of Earth]
[2 of PentaclesChange]
[3 of PentaclesWork]
[4 of PentaclesPower]
[5 of PentaclesWorry]
[6 of PentaclesSuccess]
[7 of PentaclesFailure]
[8 of PentaclesPrudence]
[9 of PentaclesGain]
[10 of Pentacles   Wealth]
[Page of Pentacles]
[Knight of Pentacles]
[Queen of Pentacles]
[King of Pentacles]])

(defun random-aref (array)
  (let ((index (random (length array
(values (aref array index) index)))

(defun read-tarot-card (card)
  (let ((len (length card)))
  (if (= len 2)
  (concat (aref card 0)  ( (aref card 1) ))
(aref card 0

(defun tarot-card ()
  (multiple-value-bind
  (card index) (random-aref tarot-deck)
(read-tarot-card card)))

(defun tarot-draw-card ()
  (interactive)
  (message %s (tarot-card)))

(defun tarot-cards (n)
  (let ((pack tarot-deck)
stack)
(dotimes (i n)