Snippets are reusable pieces of code. The Snippets App allows users to collect, edit, manage and search snippets. The document discusses implementing advanced features like export, import and sharing by allowing users to create and run "Scrippets", which are scripts containing multiple steps to perform custom operations on snippets. Scrippets will provide a universal solution and allow anyone to develop tools that extend the functionality of the Snippets App.
10. Import
✓ Pasteboard ✗ XML
?
✓ Selection ✗ ZIP
✓ File system ✗ FTP
✓ iDisk ✗ Web
✗ etc.
11. Share
So many services all over the place:
Pastie Lodge It Paste2
DZone Snippets Snipt.org Gist
Snipt.net GnoPaste Snipplr
Pastebin.ca Droplr TinyPaste
Pastebin.com YFS* …
✓ * — your favorite service
15. Fact
Export, Import and Sharing have
something in common
These are custom operations
on snippets
16. Solution
Offered by the Snippets App
Provide a platform to
run custom operations
on selected snippets!
17. Example
How to share via Snipplr
1 Select snippets
18. Example
How to share via Snipplr
1 Select snippets 2 Enter API Key
User-speci c string provided by the Snipplr
service to allow authorized API-requests
827364827301
19. Example
How to share via Snipplr
1 Select snippets 2 Enter API Key 3 Upload snippets
827364827301 Script
20. Example
How to share via Snipplr
1 Select snippets 2 Enter API Key 3 Upload snippets 4 Display links
snipplr.com/?id=1
snipplr.com/?id=2
snipplr.com/?id=3
snipplr.com/?id=4
827364827301 Script
21. Example
How to share via Snipplr
1 Select snippets 2 Enter API Key 3 Upload snippets 4 Display links
snipplr.com/?id=1
snipplr.com/?id=2
snipplr.com/?id=3
snipplr.com/?id=4
827364827301 Script
Custom operations
22. Example
How to share via Snipplr
1 Select snippets 2 Enter API Key 3 Upload snippets 4 Display links
snipplr.com/?id=1
snipplr.com/?id=2
snipplr.com/?id=3
snipplr.com/?id=4
827364827301 Script
HTML Ruby HTML
+JavaScript (Perl, Bash, +JavaScript
+CSS Python) +CSS
Custom operations
23. Example
How to share via Snipplr
1 Select snippets 2 Enter API Key 3 Upload snippets 4 Display links
input.html uploader.rb output.html
Step 1: Step 2: Step 3:
Authorization Uploading Result
Custom Steps
24. Snippets App
Provides a mechanism to run any number of steps as…
input.html uploader.rb output.html
Step 1: Step 2: Step 3:
Authorization Uploading Result
Scrippet
26. Scrippet
Can be developed to automate
almost any task you want
✓ Export ✓ Tweet
✓ Import ✓ Transform
✓ Share ✓ Evaluate
✓ Backup ✓ Run
27. Scrippet
Includes property list describing
all steps to perform
</> </>
<Scrippet>
<Name>Share via Snipplr.com</Name>
<Icon>snipplr.png</Icon>
<Steps>
<Step>
<Name>Security Options</Name>
<Source>input.html</Source>
</Step>
<Step>
<Name>Uploading…</Name> input.html uploader.rb output.html
<Source>uploader.rb</Source>
</Step>
<Step>
<Name>Result</Name>
<Source>output.html</Source>
Aa
</Step>
</Steps>
</Scrippet>
S
info.plist
scrippet.js default.css snipplr.png
28. Scrippet
Is a folder with .scrippet extension
Snipplr.scrippet root of the package
/ Contents
info.plist property list
/ Resources
/ input.html UI for the 1st step
/ uploader.rb script for the 2nd step
/ output.html UI for the 3rd step
/ scrippet.js scrippet APIs
/ default.css CSS styles
/ snipplr.png icon image
29. Scrippets
Are recognized by Mac OS X as Bundles
Snipplr Pastie
Snipt.org …
30. Scrippets
Can be installed and executed by the Snippets App
Pastie
32. Scrippets
Easy to share over the internet
Developers Internet
33. Scrippets
Everyone can use them
Developers Internet Happy users
34. What’s Next
Developers Internet Happy users
Easy & powerful Public scrippet Pastie, Snipplr,
APIs will be database is in Snipt.org scrippets
published soon development* are available now;
more in development
✓ * — all scrippets will be tested for security before publishing
35. Summary
✓ Snippets application is a cool code
manager for Mac OS X
✓ Now we have universal solution for
extending its functionality
✓ Scrippets let you create powerful
custom scenarios
✓ Everybody can develop and use
them