Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 83 lines (64 sloc) 2.797 kB
c6f7e39 @mojombo first commit
authored
1 Clippy - Helping you copy text to your clipboard
2 ================================================
3
4 Clippy is a very simple Flash widget that makes it possible to place arbitrary
5 text onto the client's clipboard. Here is what Clippy looks like on GitHub:
6
7 ![Clippy in action](http://img.skitch.com/20090213-cjiawnwig8udf5a6qf1c45cne8.png)
8
9 Here is a sample Rails (Ruby) helper that can be used to place Clippy on a
10 page:
11
12 def clippy(text, bgcolor='#FFFFFF')
13 html = <<-EOF
14 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
15 width="110"
16 height="14"
17 id="clippy" >
18 <param name="movie" value="/flash/clippy.swf"/>
19 <param name="allowScriptAccess" value="always" />
20 <param name="quality" value="high" />
21 <param name="scale" value="noscale" />
22 <param NAME="FlashVars" value="text=#{text}">
23 <param name="bgcolor" value="#{bgcolor}">
24 <embed src="/flash/clippy.swf"
25 width="110"
26 height="14"
27 name="clippy"
28 quality="high"
29 allowScriptAccess="always"
30 type="application/x-shockwave-flash"
31 pluginspage="http://www.macromedia.com/go/getflashplayer"
32 FlashVars="text=#{text}"
33 bgcolor="#{bgcolor}"
34 />
35 </object>
36 EOF
37 end
38
39 Installation (Pre-Built SWF)
40 ---------------------------
41
42 If you want to use Clippy unmodified, just copy `build/clippy.swf` to your
43 `public` directory or wherever your static assets can be found.
44
45 Installation (Compiling)
46 ------------------------
47
48 In order to compile Clippy from source, you need to install the following:
49
50 * [haXe](http://haxe.org/)
51 * [swfmill](http://swfmill.org/)
52
53 The haXe code is in `clippy.hx`, the button images are in `assets`, and the
54 compiler config is in `compile.hxml`. Make sure you look at all of these to
55 see where and what you'll need to modify. To compile everything into a final
56 SWF, run the following from Clippy's root directory:
57
58 swfmill simple library.xml library.swf && haxe compile.hxml
59
60 If that is successful, copy `build/clippy.swf` to your
61 `public` directory or wherever your static assets can be found.
62
63 Contribute
64 ----------
65
66 If you'd like to hack on Clippy, start by forking my repo on GitHub:
67
68 http://github.com/mojombo/clippy
69
70 The best way to get your changes merged back into core is as follows:
71
7329b72 @mojombo fix contribute list in readme
authored
72 1. Clone down your fork
73 1. Create a topic branch to contain your change
74 1. Hack away
75 1. If you are adding new functionality, document it in README.md
76 1. If necessary, rebase your commits into logical chunks, without errors
77 1. Push the branch up to GitHub
78 1. Send me (mojombo) a pull request for your branch
c6f7e39 @mojombo first commit
authored
79
80 License
81 -------
82
83 MIT License (see LICENSE file)
Something went wrong with that request. Please try again.