Skip to content

Commit

Permalink
Static pages generation is fully automated
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedol committed Feb 2, 2012
1 parent 8b3cdca commit e208256
Show file tree
Hide file tree
Showing 13 changed files with 411 additions and 539 deletions.
182 changes: 70 additions & 112 deletions genwebsite/doc.mkd
@@ -1,83 +1,62 @@
<div class="page-header">
<h1>Documentation <small>This documents how to integrate SMSSync into your project.</small></h1>
</div>
<div class="row">
<div class="span8 columns">
<h2>Instructions</h2>
<ul>
<li>
SMSSync uses the <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">
HTTP</a> and <a href="http://en.wikipedia.org/wiki/HTTPS">
HTTPS</a> protocols for communication.
<p>To start the SMSSync Gateway, you'll need to specify a callback URL.
This URL is where all incoming SMS will be transmitted to.
Remember to enter the full URL including the filename. A
typical example will be <code>http://somedomain.com/index.php</code></p></li>
<li>
For security you can specify a secret key at the callback URL. If
the secret key doesn't match, the callback URL will ignore
the transmission.
</li>
<li>
Additionally, you can specify keywords with which to filter
incoming SMS. Only matching SMS will be sent to
the SMSSync Gateway URL.
</li>
<li>
SMSSync uses the following variables to transmit the incoming SMS via the POST method:
<ul>
<li><strong>from</strong> -- the number that sent the SMS</li>
<li><strong>message</strong> -- the SMS sent</strong></li>
<li><strong>message_id</strong> -- the unique ID of the SMS</li>
<li><strong>sent_to</strong> -- the phone number the SMS was sent to</li>

<li><strong>secret</strong> -- the secret key set on the app</li>
<li><strong>sent_timestamp</strong> -- the timestamp the SMS was sent.
In the format, mm-dd-yy-hh:mm Eg. 11-27-11-07:11</strong></li>
</ul>
</li>
</ul>
<p>
In order for SMSSync to account for perfect transmission, the callback URL
needs to give back a formatted JSON string such as its shown below to
indicate if it received the message or not.
<br /><br />
<strong>Succeeded</strong>
<h1>Documentation <small>This documents how to integrate SMSSync into your project.</small></h1>
</div>
<div class="row">
<div class="span8 columns">
<h2>Instructions</h2>
<ul>
<li>
SMSSync uses the <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP</a> and <a href="http://en.wikipedia.org/wiki/HTTPS">HTTPS</a> protocols for communication.
<p>To start the SMSSync Gateway, you'll need to specify a callback URL. This URL is where all incoming SMS will be transmitted to.
Remember to enter the full URL including the filename. A typical example will be <code>http://somedomain.com/index.php</code></p></li>
<li>
For security you can specify a secret key at the callback URL. If the secret key doesn't match, the callback URL will ignore the transmission.
</li>
<li>
Additionally, you can specify keywords with which to filter incoming SMS. Only matching SMS will be sent to the SMSSync Gateway URL.
</li>
<li>
SMSSync uses the following variables to transmit the incoming SMS via the POST method:
<ul>
<li><strong>from</strong> -- the number that sent the SMS</li>
<li><strong>message</strong> -- the SMS sent</strong></li>
<li><strong>message_id</strong> -- the unique ID of the SMS</li>
<li><strong>sent_to</strong> -- the phone number the SMS was sent to</li>

<li><strong>secret</strong> -- the secret key set on the app</li>
<li><strong>sent_timestamp</strong> -- the timestamp the SMS was sent. In the format, mm-dd-yy-hh:mm Eg. 11-27-11-07:11</strong></li>
</ul>
</li>
</ul>
<p>
In order for SMSSync to account for perfect transmission, the callback URL needs to give back a formatted JSON string such as its shown below to indicate if it received the message or not.
<br /><br />
<strong>Succeeded</strong>
<pre class="prettyprint linenums">
{
payload: {
success: "true"
}
}</pre>

<br /><br />
<strong>Failed</strong>
<br /><br />
<br /><br />
<strong>Failed</strong>
<br /><br />
<pre class="prettyprint linenums">{
payload: {
success: "false"
}
}</pre>
</p>
<p>&nbsp;</p>
<strong>Response from server</strong>
<p>
SMSSync allows auto response to be configured on the app itself or to be
retrieved from the server. When the app makes an HTTP Post request to sync the
incoming SMS to the configured URL, it can send a JSON string that has
messages in it as opposed to sending a success or failed JSON string as
stated above. The app then sends the messages as SMS to users phone.
<p>
This makes it possible to have an instant response via SMS when an HTTP Post
request is made. To leverage this feature, a JSON formatted string like the one
below needs to be returned by the configured URL after the app makes the
HTTP Post request.
</p>
<p>
Also, make sure <strong>*Get Reply From Server*</strong> is checked on
SMSSync otherwise it will fail to send the SMS.<p>

<strong>Response JSON data from the callback URL</strong>
</p>
<p>&nbsp;</p>
<strong>Response from server</strong>
<p>
SMSSync allows auto response to be configured on the app itself or to be retrieved from the server. When the app makes an HTTP Post request to sync the incoming SMS to the configured URL, it can send a JSON string that has messages in it as opposed to sending a success or failed JSON string as stated above. The app then sends the messages as SMS to users phone.
<p>
This makes it possible to have an instant response via SMS when an HTTP Post request is made. To leverage this feature, a JSON formatted string like the one below needs to be returned by the configured URL after the app makes the HTTP Post request.
</p>
<p>
Also, make sure <strong>*Get Reply From Server*</strong> is checked on SMSSync otherwise it will fail to send the SMS.<p>
<strong>Response JSON data from the callback URL</strong>
<pre class="prettyprint linenums">{
"payload": {
"success": "true",
Expand All @@ -98,23 +77,15 @@
]
}
}</pre>
</p>
<p>&nbsp;</p>
<strong>Task</strong>
<p>
SMSSync supports execution of task sent from the configured callback URL. At
the moment, it supports sending of messages sent from the callback URL as SMS.
This feature is targeted towards developers. If you are a developer and you want
SMSSync to send an SMS, send a JSON formatted string as shown below to
SMSSync with the variable task=send. When SMSSync does an HTTP GET request with
a sample URL like this one, <code>http://callback_url/smssync?task=send</code>, it
should bring back a JSON string below.</p>
<br /><br />
<p><strong>Note:</strong> The secret key has to match the secret key
configured with SMSSync, otherwise, SMSSync will not execute the task. To
play it safe, add the country code to the phone number. Eg. +254700709142</p>

<p><strong>Response JSON data from the callback URL</strong></p>
</p>
<p>&nbsp;</p>
<strong>Task</strong>
<p>
SMSSync supports execution of task sent from the configured callback URL. At the moment, it supports sending of messages sent from the callback URL as SMS. This feature is targeted towards developers. If you are a developer and you want SMSSync to send an SMS, send a JSON formatted string as shown below to SMSSync with the variable task=send. When SMSSync does an HTTP GET request with a sample URL like this one, <code>http://callback_url/smssync?task=send</code>, it should bring back a JSON string below.</p>
<br /><br />
<p><strong>Note:</strong> The secret key has to match the secret key configured with SMSSync, otherwise, SMSSync will not execute the task. To play it safe, add the country code to the phone number. Eg. +254700709142</p>

<p><strong>Response JSON data from the callback URL</strong></p>

<pre class="prettyprint linenums">{
"payload": {
Expand All @@ -136,12 +107,10 @@
]
}
}</pre>

</div>
<div class="span8 columns">
<h2>A sample web service</h2>
<p>This is a sample PHP script to demonstrate how to write a webservice to
successfully communicate with SMSSync.</p>
</div>
<div class="span8 columns">
<h2>A sample web service</h2>
<p>This is a sample PHP script to demonstrate how to write a webservice to successfully communicate with SMSSync.</p>
<pre class="prettyprint linenums">
/**
* get the phone number that sent the SMS.
Expand Down Expand Up @@ -212,17 +181,9 @@ if ((strlen($from) > 0) AND (strlen($message) > 0) AND
if ( ! ( $secret == '123456'))
{
$success = "false";
}
else
{
echo "Secret: ".$secret;
}

/**
* now let's write the info sent by SMSSync
* to a file called test.txt
*/

// now let's write the info sent by SMSSync
//to a file called test.txt
$string = "From: ".$from."\n";
$string .= "Message: ".$message."\n";
$string .= "Timestamp: ".$sent_timestamp."\n";
Expand All @@ -233,8 +194,6 @@ if ((strlen($from) > 0) AND (strlen($message) > 0) AND
@fwrite($fh, $string);
@fclose($fh);



}
else
{
Expand Down Expand Up @@ -263,12 +222,11 @@ echo json_encode(array("payload"=>array(
* echo json_encode(array("payload"=>array("success"=>$success,"task"=>"send","messages"=>array_values($reply))));
*/
</pre>
<p>
For a complete web service application, look at Ushahidi's <a href="https://github.com/ushahidi/Ushahidi_Web/tree/master/plugins/smssync">SMSSync plugin</a>.
It utilizes most of SMSSync features.
</p>

<p>
There is also SMSSync webservice for Django that implements most of the features of SMSSync. You can download it from <a href="https://github.com/cwanjau/SMSsync-Python-Django-webservice">github.com</a>. Thanks to <a href="https://github.com/cwanjau">Caine Wanjau</a>
</p>
</div>
<p>
For a complete web service application, look at Ushahidi's <a href="https://github.com/ushahidi/Ushahidi_Web/tree/master/plugins/smssync">SMSSync plugin</a>.It utilizes most of SMSSync features.
</p>
<p>
There is also SMSSync webservice for Django that implements most of the features of SMSSync. You can download it from <a href="https://github.com/cwanjau/SMSsync-Python-Django-webservice">github.com</a>. Thanks to <a href="https://github.com/cwanjau">Caine Wanjau</a>
</p>
</div>
</div>
32 changes: 15 additions & 17 deletions genwebsite/download.mkd
@@ -1,17 +1,15 @@
<div class="page-header">
<h1>Downloads <small>Where to download the app.</small></h1>
</div>
<div class="row">
<div class="span8 columns">
<h2>QR Code</h2>
<p><strong>Scan the QR below to install SMSSync on your Android powered phone</strong></p>
<p><img src="http://qrcode.kaywa.com/img.php?s=6&#038;d=http%3A%2F%2Fmarket.android.com%2Fdetails%3Fid%3Dorg.addhen.smssync" alt="qrcode" />
</div>
<div class="span8 columns">
<h2>Android market</h2>
<p><strong>The app is available today on the Android market. You can download it on your phone by clicking on the image on the left or scanning the QR code on the right. Enjoy!</strong></p>
<p><a href="https://market.android.com/details?id=org.addhen.smssync"><img class="size-thumbnail wp-image-4527 " title="ushahidi_android_on_the_market" src="http://blog.ushahidi.com/wp-content/uploads/2011/07/ushahidi_android_on_the_market-150x150.png" alt="Android market" width="200" height="200" /></a>
</div>

</div>

<div class="page-header">
<h1>Downloads <small>Where to download the app.</small></h1>
</div>
<div class="row">
<div class="span8 columns">
<h2>QR Code</h2>
<p><strong>Scan the QR below to install SMSSync on your Android powered phone</strong></p>
<p><img src="http://qrcode.kaywa.com/img.php?s=6&#038;d=http%3A%2F%2Fmarket.android.com%2Fdetails%3Fid%3Dorg.addhen.smssync" alt="qrcode" />
</div>
<div class="span8 columns">
<h2>Android market</h2>
<p><strong>The app is available today on the Android market. You can download it on your phone by clicking on the image on the left or scanning the QR code on the right. Enjoy!</strong></p>
<p><a href="https://market.android.com/details?id=org.addhen.smssync"><img class="size-thumbnail wp-image-4527 " title="ushahidi_android_on_the_market" src="http://blog.ushahidi.com/wp-content/uploads/2011/07/ushahidi_android_on_the_market-150x150.png" alt="Android market" width="200" height="200" /></a>
</div>
</div>
44 changes: 17 additions & 27 deletions genwebsite/index.mkd
@@ -1,11 +1,11 @@
<div class="container">
<!-- About SMSSync -->
<section id="about">
<div class="page-header">
<h1>About</h1>
</div>
<div class="row"><!--start row-->
<div class="span-one-third">
<!-- About SMSSync -->
<section id="about">
<div class="page-header">
<h1>About</h1>
</div>
<div class="row"><!--start row-->
<div class="span-one-third">
<h3>What is it</h3>
<p>
SMSSync is a simple, yet powerful SMS to HTTP sync utility,that turns any Android phone into a local SMS gateway by sending incoming messages(SMS) to a configured URL(web service).
Expand All @@ -22,15 +22,9 @@
</div>
<div class="span-one-third">
<h3>Participation</h3>
<p>
There are a variety of ways to actively participate in the project.
These range from writing documentation for the project to
translating the app into various
other languages. If you are a developer and want to help write code
for the project, feel free to browse through our <a href="https://github.com/ushahidi/SMSSync/issues/">issue
tracker</a> on github.
</p>
</div>
<p>There are a variety of ways to actively participate in the project. These range from writing documentation for the project to translating the app into various other languages. If you are a developer and want to help write code for the project, feel free to browse through our <a href="https://github.com/ushahidi/SMSSync/issues/">issue tracker</a> on github.
</p>
</div>
</div><!--end row-->
</section>
<section id="project-status">
Expand All @@ -41,8 +35,8 @@
<strong>Public release:</strong>
<ul>
<li>Released December 12, 2011</li>
<li>Revision r11</li>
<li>Version 1.1.9</li>
<li>Revision <a href"https://github.com/ushahidi/SMSSync/tree/v1.1.9">r11</a></li>
<li>Version <a href="https://github.com/ushahidi/SMSSync/zipball/v1.1.9">1.1.9</a></li>
</ul>
<strong>Stable branch:</strong>
<ul>
Expand All @@ -52,7 +46,7 @@
<ul>
<li><a href="https://github.com/ushahidi/SMSsync/">master branch</a> open for commit/contributions for SMSSync 1.1.10</li>
</ul>
<a href="http://dev.ushahidi.com/projects/SMSSync/news">More</a>
<a href="../releases/">More</a>
</p>
</div>
<div class="span-one-third">
Expand All @@ -64,23 +58,19 @@
<p>
It uses <a href="http://github.com">Github</a>
for project management and for tracking
<a href="https://github.com/ushahidi/SMSSync/issues/">bugs and issues</a>.
Transifex, the free and open source localization tool, is used for translations.
<a href="https://github.com/ushahidi/SMSSync/issues/">bugs and issues</a>. Transifex, the free and open source localization tool, is used for translations.
</p>
</div>
</div>
<div class="span-one-third">
<h3>Translations</h3>
<h3>Translations</h3>
<p>
SMSSync, as of now, has been completely translated into 5 languages. We use
transifex for hosting our strings and to make translation much easier.

SMSSync, as of now, has been completely translated into 5 languages. We use transifex for hosting our strings and to make translation much easier.
<p>To help translate SMSSync into other languages, simply headover to
<a href="https://www.transifex.net/projects/p/smssync/resource/stringsxml/">transifex.net</a>,
add a language if it's not there or contribute to the uncompleted
translations.
</p>
</div>
</div><!--end row-->

</section>
</div>
6 changes: 3 additions & 3 deletions genwebsite/releases.mkd
Expand Up @@ -3,9 +3,9 @@
</div>
# Current release

* Released %release%
* Revision [%revision%](https://github.com/ushahidi/SMSSync/tree/v1.1.9)
* Version [%version%](https://github.com/ushahidi/SMSSync/zipball/v1.1.9)
* Released December 12, 2011
* Revision [r12](https://github.com/ushahidi/SMSSync/tree/v1.1.9)
* Version [1.1.9](https://github.com/ushahidi/SMSSync/zipball/v1.1.9)
### Changelog

* Bug:
Expand Down

0 comments on commit e208256

Please sign in to comment.