-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanual-getting-started.html
More file actions
150 lines (132 loc) · 7.59 KB
/
manual-getting-started.html
File metadata and controls
150 lines (132 loc) · 7.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Tangler</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" type="text/css" media="screen" href="/css/normalize.css">
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.css">
<link rel="stylesheet" type="text/css" media="screen" href="/css/site.css">
<link rel="stylesheet" type="text/css" media="screen" href="/css/my.css">
</head>
<body>
<div class="followbar">
<a href="http://github.com/Tangler" target="_blanc"><img src="github.png" /></a>
<a href="http://facebook.com/tangler.io" target="_blanc"><img src="facebook.png" /></a>
<a href="http://twitter.com/tangler_io" target="_blanc"><img src="twitter.png" /></a>
</div>
<header>
<h1>Tangler</h1>
<div class="tagline">The Open Source Integration Engine</div>
<div class="motto">Are you familiar with <b>IFTTT</b> or <b>Zapier</b>? Then you'll feel right at home!</div>
</header>
<ul class="navbar">
<li><a href="/">Home</a></li>
<li>::</li>
<li><a href="/modules">Modules</a></li>
<li>::</li>
<li><a href="/modules-wishlist">Wishlist</a></li>
<li>::</li>
<li><a href="/manual">Manual</a></li>
<li>::</li>
<li><a href="http://github.com/Tangler" target="_blank">GitHub</a></li>
</ul>
<div role="main">
<h1>Getting started with Tangler</h1>
<p>This short guide will take you through your first steps in Tangler.
Once you've seen how it works, you are ready to create your own Tangler files.
This is where the fun starts, as the possibilities are endless!</p>
<h2>Installing Tangler</h2>
<pre><code># Get the main sourcecode.
git clone git@github.com:Tangler/Tangler.git
# Install dependencies in ./vendor/
composer.phar install --prefer-dist</code></pre>
<p>p.s.: don't have composer? <a href="http://getcomposer.org/download/">get it here</a>, it's awesome!</p>
<h2>Running examples</h2>
<p>Let's go through some simple examples to get you started:</p>
<h3>file2smtp</h3>
<p>Edit <code>example/file2smtp.xml</code> </p>
<pre><code><tangler>
<channel>
<key>file2smtp</key>
<label>Send all new files in a given directory by email</label>
<description>
Monitors the source directory for new files.
When new files are detected, they are sent through smtp
to the provided email address.
</description>
<!--
Configure the trigger and it's parameters
-->
<trigger class="Tangler\Module\File\NewFileTrigger">
<parameter key="dir">/tmp/tangler.in/</parameter>
</trigger>
<!--
Configure the action and it's parameters,
using variables provided by the trigger
-->
<action class="Tangler\Module\Smtp\SendEmailAction">
<parameter key="smtp.host">mail.example.web</parameter>
<parameter key="smtp.username">myusername</parameter>
<parameter key="smtp.password">mypassword</parameter>
<parameter key="subject">New file: {{filename}}</parameter>
<parameter key="from">tangler@example.web</parameter>
<parameter key="to">me@example.web</parameter>
<parameter key="body">Hey, this is Tangler,
I spotted a new file: '{{filename}}':
{{content}}
Kind regards,
Tangler
</parameter>
</action>
</channel>
</tangler></code></pre>
<p>First up, enter or edit the trigger parameter key <code>dir</code> and enter a valid source directory (for example: <code>/tmp/tangler.in/</code>),
Then edit the action parameters, especially the SMTP variables like <code>smtp.hostname</code>, <code>smtp.username</code> and <code>smtp.password</code>.</p>
<p>Now you can start your tangler file like this:</p>
<pre><code>vendor/bin/tangler run:file example/file2smtp.xml</code></pre>
<p>Copy a textfile into <code>/tmp/tangler.io/</code> and see how Tangler picks it up, and emails it to you!</p>
<h3>imap2hipchat</h3>
<p>Edit <code>example/imap2hipchat.xml</code> and enter a the imap credentials in the trigger section.</p>
<p>Obtain an <code>apikey</code> here: <a href="https://www.hipchat.com/admin/api"><a href="https://www.hipchat.com/admin/api">https://www.hipchat.com/admin/api</a></a>.
View the available rooms here: <a href="https://www.hipchat.com/admin/rooms"><a href="https://www.hipchat.com/admin/rooms">https://www.hipchat.com/admin/rooms</a></a> and find the <code>api roomid</code> of the room you want to publish your messages to.</p>
<p>Now you can start your tangler file like this:</p>
<pre><code>vendor/bin/tangler run:file example/imap2hipchat.xml</code></pre>
<p>Now send an email to the provided imap account and watch Tangler notify you in HipChat with subject, sender, etc!</p>
<h2>You are reading to start Tangling!</h2>
<p>Now that you've seen the basics, it's time to create your own Tangler files!
Check out the <a href="modules">available modules</a>, and see what Triggers and Actions they provide.</p>
<p>We are looking forward to hearing about the amazing things you'll create...
Be sure to share your creations with us, and we'll share them on our
<a href="https://twitter.com/tangler_io">Twitter</a> and <a href="https://www.facebook.com/tangler.io">Facebook</a> accounts to inspire others!</p>
<p>Happy Tangling!<br><em>Team Tangler</em></p>
</div>
<footer>
<p>Tangler is developed and maintained by <a href="http://www.linkorb.com">LinkORB</a> -- We're hiring!</p>
</footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>
$('pre').addClass('prettyprint');
</script>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-5382953-27', 'tangler.io');
ga('send', 'pageview');
</script>
<div class="followbar">
<a href="http://github.com/Tangler" target="_blanc"><img src="github.png" /></a>
<a href="http://facebook.com/tangler.io" target="_blanc"><img src="facebook.png" /></a>
<a href="http://twitter.com/tangler_io" target="_blanc"><img src="twitter.png" /></a>
</div>
</body>
</html>