diff options
| author | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-11-01 17:32:42 +0000 | 
|---|---|---|
| committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-11-01 17:32:42 +0000 | 
| commit | 93044d0f4c93f79c7f5e8dc7d14d6a5f0d4d422e (patch) | |
| tree | 2ae62bb915b6704ab2b33a1163eb8f097e897336 | |
| parent | a09e1cfb55d28b176f0f1703c4e8a9d1629f2d4b (diff) | |
| -rw-r--r-- | README | 16 | ||||
| -rw-r--r-- | blasms.c | 4 | 
2 files changed, 14 insertions, 6 deletions
@@ -3,9 +3,9 @@ Usage: blasms sender-number send-date  SMS content should be passed using stdin.  blasms.conf is the configuration file and should be in the format: -  default SYSTEM COMMANDS -  CMD1 SYSTEM COMMANDS -  CMD2 SYSTEM COMMANDS +  default SYSTEMCOMMANDS +  CMD1 SYSTEMCOMMANDS +  CMD2 SYSTEMCOMMANDS    etc.  Where SYSTEM COMMANDS can be any command to be executed.  The line starting @@ -18,8 +18,12 @@ are available, allowing for text replacement.  The macros available are:    %n - replaced with the sender-number    %d - replaced with the send-date    %s - replaced with the SMS content -  %P - attempts to replace the second word in the SMS with a destination number\n" -       from phonebook.conf - SMS not processed if entry not found\n" +  %P - attempts to replace the second word in the SMS with a destination number +       from phonebook.conf - SMS not processed if entry not found +  %M - intepret the second word (i.e. after the command) of the SMS +       as FILENAME, attempt to open the file "pending/FILENAME", treating +       the first word of it as a number, attempting to look up its name, +       and insert a colon between it and the rest of the file.  An example blasms.conf might be:    default echo \"SMS from %N at %d: %s\" @@ -32,7 +36,7 @@ Sender names are looked up in phonebook.conf, which should be in the format:  An example phonebook.conf might be:    +447777123456 John -  +447713987654 Bill +  +447713987654 Bill Billy  With a default gnokii (at least with gnokii-0.6.29) apostrophes (') will be  escaped.  Removing this behaviour is desirble to blasms and does not cause @@ -273,6 +273,10 @@ int main(int argc, char *argv[]) {                          "  %%s - replaced with the SMS content\n"                          "  %%P - attempts to replace the second word in the SMS with a destination number\n"                          "       from phonebook.conf - SMS not processed if entry not found\n" +                        "  %%M - intepret the second word (i.e. after the command) of the SMS\n" +                        "       as FILENAME, attempt to open the file \"pending/FILENAME\", treating\n" +                        "       the first word of it as a number, attempting to look up its name,\n" +                        "       and insert a colon between it and the rest of the file.\n"                          "\n"                          "An example blasms.conf might be:\n"                          "  default echo \\\"SMS from %%N at %%d: %%s\\\"\n"  | 
