Permalink
Browse files

update README.md and COPYRIGHT

  • Loading branch information...
1 parent f8d2cd7 commit 925f3be401cfb6cf71affce8a68929cbe9745dd5 @slyrus committed Mar 19, 2012
Showing with 82 additions and 4 deletions.
  1. +1 −1 COPYRIGHT
  2. +81 −3 README.md
View
@@ -1,7 +1,7 @@
soiree, a library for working with address book and calendar data in
Common Lisp
-Copyright (c) 2011 Cyrus Harmon
+Copyright (c) 2011-2012 Cyrus Harmon
All rights reserved.
Redistribution and use in source and binary forms, with or without
View
@@ -5,11 +5,89 @@ soiree, A Common Lisp library for working with the vcard and icalendar
By Cyrus Harmon <ch-lisp@bobobeach.com>, February 2012. See COPYRIGHT
file for license details.
-Version 3 of the VCARD specification can be found here:
+# Overview
-http://tools.ietf.org/html/rfc2426
+Soiree is a library for working with information about individuals,
+events, calendars and related pieces of information. It provides
+parsers for the VCARD and iCalendar formats and represents the
+information in XML documents corresponding to the xCard and xCal
+specifications.
+
+# Getting started:
To load soiree:
-(asdf:load-system 'soiree)
+ (asdf:load-system 'soiree)
+
+# A quick example
+
+Here's an example of using soiree to parse a simple vCard:
+
+ (asdf:load-system 'soiree)
+
+ (cl:defpackage #:soiree-example
+ (:use #:cl #:soiree))
+
+ (cl:in-package #:soiree-example)
+
+ (defparameter *baba-oriley-vcard*
+ (convert-string-to-dos-line-endings
+ "BEGIN:VCARD
+ VERSION:3.0
+ N:O'Riley;Baba;;;
+ FN:Baba O'Riley
+ ORG:Polydor Records
+ TITLE:Field Worker
+ PHOTO;VALUE=URL;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif
+ ADR;type=WORK;type=pref:;;Trafalgar Square;London;England;;UK
+ TEL;TYPE=WORK,VOICE:(415) 555-1212
+ TEL;TYPE=HOME,VOICE:(415) 555-1213
+ EMAIL;TYPE=PREF,INTERNET:thewho@example.com
+ END:VCARD
+ "))
+
+ (defparameter *baba* (parse-vcard *baba-oriley-vcard*))
+
+Doing this at the REPL, we see:
+
+ SOIREE-EXAMPLE> (defparameter *baba* (parse-vcard *baba-oriley-vcard*))
+ *BABA*
+ SOIREE-EXAMPLE> *baba*
+ #.(CXML-STP-IMPL::DOCUMENT
+ :CHILDREN '(#.(CXML-STP:ELEMENT
+ #| :PARENT of type DOCUMENT |#
+ :EXTRA-NAMESPACES '(("" "urn:ietf:params:xml:ns:vcard-4.0"))
+ :CHILDREN '(#.(CXML-STP:ELEMENT
+ #| :PARENT of type ELEMENT |#
+ :CHILDREN '(#.(CXML-STP:ELEMENT
+ #| :PARENT of type ELEMENT |#
+ :CHILDREN '(#.(CXML-STP:ELEMENT
+ #| :PARENT of type ELEMENT |#
+ :CHILDREN '(#.(CXML-STP:TEXT
+ #| :PARENT of type ELEMENT |#
+ :DATA "O'Riley"))
+ :LOCAL-NAME "surname"
+ :NAMESPACE-URI "urn:ietf:params:xml:ns:vcard-4.0")
+ #.(CXML-STP:ELEMENT
+ #| :PARENT of type ELEMENT |#
+ :CHILDREN '(#.(CXML-STP:TEXT
+ #| :PARENT of type ELEMENT |#
+ :DATA "Baba"))
+ :LOCAL-NAME "given"
+ :NAMESPACE-URI "urn:ietf:params:xml:ns:vcard-4.0")
+
+ ...
+
+ SOIREE-EXAMPLE>
+
+# References:
+
+VCARD specification Version 3:
+[http://tools.ietf.org/html/rfc2426](http://tools.ietf.org/html/rfc2426)
+
+VCARD specification Version 4:
+[http://tools.ietf.org/html/rfc6350](http://tools.ietf.org/html/rfc6350)
+
+xCard specification:
+[http://tools.ietf.org/html/rfc6351](http://tools.ietf.org/html/rfc6351)

0 comments on commit 925f3be

Please sign in to comment.