xsms
A simple SMS client written in Python + Tkinter which uses the em73xx library. Originally written for my Thinkpad X250 (which uses this chip) it was mainly written for use with xmobar - with a text-mode summary so you can quickly see any unread messages, and a lightweight GUI to read and send messages.
TODO
clean-up the UI, make it match the xmonad style I have (using ttk style in xsms/style.py)
reply, mark as [un]read, delete/archive functionality
Install
Either retrieve from pypi using pip:
$ pip install xsms
or clone this repo, and install using setup.py:
$ git clone https://github.com/smcl/xsms $ cd xsms $ python setup.py install
Using
Once xsms is installed you can either launch it standalone …
$ python -m xsms --device=/dev/ttyACM0
… or add it to xmobarrc, like the below (which takes advantage of the ability to specify the font via tags to easily get some icons from Font Awesome):
-- assumes you have Font Awesome installed and used here: -- additionalFonts = ["xft:FontAwesome-10"], Run Com "/usr/bin/python" [ "-m", "xsms", "-d", "/dev/ttyACM0", "-p", "1234", "-r", "<fn=1></fn>", "-u", "<fn=1></fn> %d" ] "xsms" 600,
This will result in an xmobar entry like the below:
xsms-xmobar.png
… and if you want to be able to click the icon to raise the GUI, you can:
template = "%StdinReader% }{ ... stuff ... <action=`python -m xsms -g -d /dev/ttyACM0 -p 1234`>%xsms%</action> ... "
xsms-inbox.png
For a quick reference of the switches and parameters supported, invoke python -m xms --help:
$ python -m xsms --help
usage: __main__.py [-h] [-d DEVICE] [-g] [-p PIN] [-r READ_FORMAT]
[-u UNREAD_FORMAT]
xsms - an sms client for linux systems with an em73xx modem
optional arguments:
-h, --help show this help message and exit
-d DEVICE, --device DEVICE
-g, --gui
-p PIN, --pin PIN
-r READ_FORMAT, --read_format READ_FORMAT
-u UNREAD_FORMAT, --unread_format UNREAD_FORMAT
Problems
If you’ve having a problem like the below…
$ python -m xsms --device /dev/ttyACM0 --pin 1234
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/sean/dev/py/xsms/xsms/__main__.py", line 63, in <module>
modem = Modem(args.device, pin=args.pin)
File "/usr/local/lib/python2.7/dist-packages/em73xx-0.5-py2.7.egg/em73xx/modem.py", line 23, in __init__
module>
self.device = serial.Serial(dev, bps, timeout=1)
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 182, in __init__
self.open()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 247, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 16] could not open port /dev/ttyACM0: [Errno 16] Device or resource busy: '/dev/ttyACM0'
… then it’s possible that the ModemManager service is accessing the device already. It’s not currently possible to use em73xx together with the modem. You can kill it off and retry:
$ sudo systemctl stop ModemManager $ python -m xsms --device /dev/ttyACM0 --pin 1234 5
Metadata
Release files for xsms 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xsms-0.6.tar.gz | 6.8 kB | Without provenance | Details for xsms-0.6.tar.gz |
Release files / xsms-0.6.tar.gz
| Download URL | xsms-0.6.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ef6f52c6422b5d3148517711af410cd792fa8fc2eca514cc29e93430a813d42
|
|
BLAKE2b-256 checksum How to use checksums |
4dbbf1d77452da192f3f3bae0bc5b12bb6ff017f12d7a393917cba5a0a6b7c49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for xsms 0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.