Export all stickies at once on OS X 10.8?
Export stickies created by Stickies.app

Install Notational Velocity (NV) and start the application
In Finder open your Library folder and locate StickiesDatabase
Drag StickiesDatabase into the 'Filtered Note List' in the NV main window (see here for reference)
In NV select any number of notes and choose Export from the menu

If you prefer to write your own code, have a look at Learning Cocoa with Objective-C which explains how to reverse-engineer the StickiesDatabase format.
Export Dashboard stickies
Run this in Terminal.app
plutil -convert json -r -o - ~/Library/Preferences/widget-com.apple.widget.stickies.plist |
    awk '$1 ~ /-data/ { start=index($0, &quot;:&quot;)+3
                        end=length($0)-2
                        sticky=substr($0, start, end-start+1)
                        gsub(/&lt;.?.?div&gt;/, &quot;&quot;, sticky)
                        gsub(/&lt;br&gt;/, &quot;\n&quot;, sticky)
                        print sticky
                        print &quot;---&quot; }' &gt; ~/all-my-stickies.txt