Compare commits

..

No commits in common. "185d40a06e19d8c61bfb06d8b01b872ab364d004" and "06d36645860df9bf61dbe770300d22f172e554a4" have entirely different histories.

6 changed files with 8 additions and 35 deletions

View File

@ -1 +0,0 @@
Hemna <waboring@hemna.com>

View File

@ -1,18 +0,0 @@
CHANGES
=======
v0.3.0
------
* Added PBR Version
v0.2.0
------
* Updated command to 'tw' from 't'. Added Help
* First working version that tweets!
v0.1.0
------
* Initial commit

View File

@ -21,7 +21,7 @@ docs: build
cp Changelog docs/changelog.rst
tox -edocs
clean: clean-build clean-pyc clean-test clean-dev ## remove all build, test, coverage and Python artifacts
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-build: ## remove build artifacts
rm -fr build/
@ -42,10 +42,6 @@ clean-test: ## remove test and coverage artifacts
rm -fr htmlcov/
rm -fr .pytest_cache
clean-dev:
rm -rf $(VENVDIR)
rm Makefile.venv
coverage: ## check code coverage quickly with the default Python
coverage run --source aprsd_twitter_plugin setup.py test
coverage report -m

View File

@ -1,9 +1,7 @@
import logging
import tweepy
from aprsd import packets, plugin
import aprsd_twitter_plugin
from aprsd import messaging, plugin, trace
LOG = logging.getLogger("APRSD")
@ -11,7 +9,7 @@ LOG = logging.getLogger("APRSD")
class SendTweetPlugin(plugin.APRSDRegexCommandPluginBase):
version = aprsd_twitter_plugin.__version__
version = "1.0"
# Look for any command that starts with tw or tW or TW or Tw
command_regex = "^[tT][wW]"
# the command is for ?
@ -74,14 +72,15 @@ class SendTweetPlugin(plugin.APRSDRegexCommandPluginBase):
return api
@trace.trace
def process(self, packet):
"""This is called when a received packet matches self.command_regex."""
LOG.info("SendTweetPlugin Plugin")
from_callsign = packet.from_call
message = packet.message_text
from_callsign = packet.get("from")
message = packet.get("message_text", None)
message = message.split(" ")
del message[0]
message = " ".join(message)
@ -105,4 +104,4 @@ class SendTweetPlugin(plugin.APRSDRegexCommandPluginBase):
return "Tweet sent!"
else:
LOG.warning("SendTweetPlugin is disabled.")
return packets.NULL_MESSAGE
return messaging.NULL_MESSAGE

View File

@ -1,3 +1,3 @@
pbr
aprsd>=2.7.0
aprsd>=2.2.0
tweepy

View File

@ -38,6 +38,3 @@ upload-dir = doc/build/html
[mypy]
ignore_missing_imports = True
strict = True
[bdist_wheel]
universal = 1