Permalink
Browse files

Use d for docs.

  • Loading branch information...
1 parent 206a179 commit 19e8a0600dcfd986d7da55b2d3a60b75438444ed @sjl sjl committed Feb 5, 2012
Showing with 94 additions and 56 deletions.
  1. +1 −56 README.markdown
  2. +18 −0 docs/footer.markdown
  3. +8 −0 docs/index.markdown
  4. +5 −0 docs/installation.markdown
  5. +9 −0 docs/publish.sh
  6. +53 −0 docs/usage.markdown
View
@@ -3,67 +3,12 @@
`clojure-postmark` lets you talk to [Postmark](http://postmarkapp.com/) from
Clojure.
+* Documentation: <http://sjl.bitbucket.org/sjl/clojure-postmark/>
* Source (Mercurial): <http://bitbucket.org/sjl/clojure-postmark>
* Source (Git): <http://github.com/sjl/clojure-postmark>
* Issues: <http://github.com/sjl/clojure-postmark/issues>
* License: [MIT/X11](http://www.opensource.org/licenses/mit-license.php)
-## Installation
-
-Slap this in your `project.clj` `:dependencies`:
-
- [postmark "1.1.0"]
-
-## Usage
-
-First you need to load the `postmark` function:
-
- ;; In an (ns)
- (:use [postmark.core :only (postmark)])
-
- ;; Outside an (ns)
- (use '[postmark.core :only (postmark)])
-
-Create a customized `postmark` function:
-
- (def pm (postmark "YOUR_API_KEY" "from-address@example.com"))
-
-Now just call the function to send an email:
-
- (pm {:to "fluffy@example.com"
- :subject "Your Noms"
- :text "I wants them."})
-
-You can send to multiple addresses by using a seq for `:to`, but remember that
-Postmark's API won't let you send to more than twenty recipients at a time:
-
- (pm {:to ["fluffy@example.com" "sprinkles@example.com"]
- :subject "All of Your Noms"
- :text "I wants them."})
-
-There are a few other keys you can use in the map you pass to the call:
-
- (pm {:to ["fluffy@example.com" "sprinkles@example.com"]
- :cc ["haiku@example.com"]
- :bcc ["admin@example.com"]
- :subject "All of Your Noms"
- :text "I wants them."
- :html "I <b>wants</b> them."
- :tag "Noms"
- :reply-to "avedon@example.com"})
-
-## Testing
-
-If you just want to run a test you can use `postmark-test` without an API key
-instead of `postmark`:
-
- (use '[postmark.core :only (postmark-test)])
- (def pt (postmark-test "from-address@example.com"))
-
- (pt {:to ["fluffy@example.com" "sprinkles@example.com"]
- :subject "Testing"
- :text "I might want your noms."})
-
## Todo List
* Automatically generate plain text body if you just pass an html body.
View
@@ -0,0 +1,18 @@
+Created by [Steve Losh](http://stevelosh.com).
+Documentation created with [d](http://sjl.bitbucket.org/d/).
+
+<br/><a id='rochester-made' href='http://rochestermade.com' title='Rochester Made'><img src='http://rochestermade.com/media/images/rochester-made-dark-on-light.png' alt='Rochester Made' title='Rochester Made' /></a>
+
+<script type="text/javascript">
+ var _gauges = _gauges || [];
+ (function() {
+ var t = document.createElement('script');
+ t.type = 'text/javascript';
+ t.async = true;
+ t.id = 'gauges-tracker';
+ t.setAttribute('data-site-id', '4f2ee8e5f5a1f5736a000033');
+ t.src = '//secure.gaug.es/track.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(t, s);
+ })();
+</script>
View
@@ -0,0 +1,8 @@
+`clojure-postmark` lets you talk to [Postmark](http://postmarkapp.com/) from
+Clojure.
+
+* Documentation: <http://sjl.bitbucket.org/sjl/clojure-postmark/>
+* Source (Mercurial): <http://bitbucket.org/sjl/clojure-postmark>
+* Source (Git): <http://github.com/sjl/clojure-postmark>
+* Issues: <http://github.com/sjl/clojure-postmark/issues>
+* License: [MIT/X11](http://www.opensource.org/licenses/mit-license.php)
@@ -0,0 +1,5 @@
+To get started just slap this in your `project.clj` `:dependencies`:
+
+ [postmark "1.1.0"]
+
+`clojure-postmark` works with Clojure 1.2 and 1.3.
View
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+rm -rf ./build
+~/lib/virtualenvs/d/bin/d
+hg -R ~/src/sjl.bitbucket.org pull -u
+rsync --delete -a ./build/ ~/src/sjl.bitbucket.org/clojure-postmark
+hg -R ~/src/sjl.bitbucket.org commit -Am 'clojure-postmark: Update site.'
+hg -R ~/src/sjl.bitbucket.org push
+
View
@@ -0,0 +1,53 @@
+First you need to load the `postmark` function:
+
+ :::clojure
+ ; In an (ns)
+ (:use [postmark.core :only (postmark)])
+
+ ; Outside an (ns)
+ (use '[postmark.core :only (postmark)])
+
+Create a customized `postmark` function:
+
+ :::clojure
+ (def pm (postmark "YOUR_API_KEY" "from-address@example.com"))
+
+Now just call the function to send an email:
+
+ :::clojure
+ (pm {:to "fluffy@example.com"
+ :subject "Your Noms"
+ :text "I wants them."})
+
+You can send to multiple addresses by using a seq for `:to`, but remember that
+Postmark's API won't let you send to more than twenty recipients at a time:
+
+ :::clojure
+ (pm {:to ["fluffy@example.com" "sprinkles@example.com"]
+ :subject "All of Your Noms"
+ :text "I wants them."})
+
+There are a few other keys you can use in the map you pass to the call:
+
+ :::clojure
+ (pm {:to ["fluffy@example.com" "sprinkles@example.com"]
+ :cc ["haiku@example.com"]
+ :bcc ["admin@example.com"]
+ :subject "All of Your Noms"
+ :text "I wants them."
+ :html "I <b>wants</b> them."
+ :tag "Noms"
+ :reply-to "avedon@example.com"})
+
+## Testing
+
+If you just want to run a test you can use `postmark-test` without an API key
+instead of `postmark`:
+
+ :::clojure
+ (use '[postmark.core :only (postmark-test)])
+ (def pt (postmark-test "from-address@example.com"))
+
+ (pt {:to ["fluffy@example.com" "sprinkles@example.com"]
+ :subject "Testing"
+ :text "I might want your noms."})

0 comments on commit 19e8a06

Please sign in to comment.