Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moved Engines from Sms.Gw* to Sms.Engines.*

  • Loading branch information...
commit 67ae47e429534e274e3a3fc399982a41026507ed 1 parent 3e0b96e
@mludvig authored
View
4 README
@@ -32,8 +32,8 @@ Configuration - Clickatell
--------------------------
Put this to your $HOME/.sms-cli.conf file:
[default]
- sms_engine="GwClickatell"
- sms_url_pattern = "https://api.clickatell.com/http/sendmsg?api_id=APIID&user=USERNAME&password=PASSWORD&to=%(recipient)s&text=%(message)s"
+ engine="Clickatell"
+ url_pattern = "https://api.clickatell.com/http/sendmsg?api_id=APIID&user=USERNAME&password=PASSWORD&to=%(recipient)s&text=%(message)s"
Replace APIID, USERNAME and PASSWORD with the values of your
Clickatell account. Check out the Clickatell HTTP API
documentation for more available options, e.g. for setting
View
2  Sms/Config.py
@@ -13,7 +13,7 @@ class Config(object):
_parsed_files = []
_engine_options = {}
- engine = "GwGenericHttp" ## Module must export class SmsDriver
+ engine = "GenericHttp" ## Module must export class SmsDriver
timestamp_format = "%m/%d %H:%M"
profile = "default"
View
6 Sms/GwClickatell.py → Sms/Engines/Clickatell.py
@@ -3,10 +3,10 @@
## License: GPL Version 2
from logging import debug, info
-from Exceptions import SmsError
-import Sms.GwGenericHttp
+from Sms.Exceptions import SmsError
+import GenericHttp
-class SmsDriver(Sms.GwGenericHttp.SmsDriver):
+class SmsDriver(GenericHttp.SmsDriver):
def send(self, message, recipient):
ret = super(self.__class__, self).send(message, recipient)
arr = ret.split("\n")[0].split(" ", 1)
View
4 Sms/GwGenericHttp.py → Sms/Engines/GenericHttp.py
@@ -5,8 +5,8 @@
import urllib
import urllib2
-from Exceptions import *
-from GenericSmsDriver import GenericSmsDriver
+from Sms.Exceptions import *
+from Sms.GenericSmsDriver import GenericSmsDriver
class SmsDriver(GenericSmsDriver):
def send(self, message, recipient):
View
0  Sms/Engines/__init__.py
No changes.
View
2  Sms/Sender.py
@@ -9,7 +9,7 @@
class SmsSender(object):
def __init__(self, recipients = [], engine_options = {}, **kwargs):
debug("Importing engine: %s" % Config().engine)
- driver_module = __import__("Sms." + Config().engine, fromlist = ["Sms"])
+ driver_module = __import__("Sms.Engines." + Config().engine, fromlist = ["Sms.Engines"])
self._driver = driver_module.SmsDriver(options = Config().engine_options(), **kwargs)
self._recipients = recipients
self._message = ""

0 comments on commit 67ae47e

Please sign in to comment.
Something went wrong with that request. Please try again.