ftpuploader

ftpuploader is a simple command line script that is packaged with TwoToneDetect that can be used to upload the audio files recorded by TwoToneDetect to a web server via FTP.  This script is packaged as a .exe file for use on Windows, and is also provided as a raw .py source file for use on Linux or on Windows systems that have Python installed.

Windows EXE command line usage is as follows:

ftpuploader filename host username password --port(opt.) --remotepath(opt.)

The optional –port parameter can be used to set a port other than 21 (default) for the FTP connection.

The optional –remotepath parameter can be used to set the path on the remote server to upload the file to (other than the root FTP directory).  For example, to put the file in the /audio folder on the remote server, use “–remotepath /audio/”.

As an example, to use ftpuploader to upload the mp3 audio file that TwoToneDetect creates to a web server, put ftpuploader in the same directory as TwoToneDetect and then put the following into the post_email_command field for that tone set:

ftpuploader [mp3] ftp.mywebsite.com myusername mypassword

TwoToneDetect will substitute the name of the file (and path relative to the TwoToneDetect program directory) that was created in place of the [mp3] tag in the argument when calling ftpuploader.

Sending a Hyperlink via SMS

To send a hyperlink to the web address of the file that was uploaded via FTP, set the “Email Body” field in the TonesEditor program to the root web address, and use the [mp3] tag to insert the filename of the file that was uploaded to the web server.  Note that the [mp3] tag includes the relative path to the file.  For example:

Setting “Email Body” to:   http://www.myfd.org/[mp3]

will send this hyperlink in the body of the message:

http://www.myfd.org/audio/Tone1_2016_12_22_15_32_17.mp3