mirror of
https://github.com/hemna/aprsd-twitter-plugin.git
synced 2024-11-21 07:41:56 -05:00
Update for aprsd 2.7.0
This commit is contained in:
parent
295e35aa06
commit
185d40a06e
18
ChangeLog
Normal file
18
ChangeLog
Normal file
@ -0,0 +1,18 @@
|
||||
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
|
6
Makefile
6
Makefile
@ -21,7 +21,7 @@ docs: build
|
||||
cp Changelog docs/changelog.rst
|
||||
tox -edocs
|
||||
|
||||
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
|
||||
clean: clean-build clean-pyc clean-test clean-dev ## remove all build, test, coverage and Python artifacts
|
||||
|
||||
clean-build: ## remove build artifacts
|
||||
rm -fr build/
|
||||
@ -42,6 +42,10 @@ 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
import tweepy
|
||||
from aprsd import messaging, plugin
|
||||
from aprsd import packets, plugin
|
||||
|
||||
import aprsd_twitter_plugin
|
||||
|
||||
@ -80,8 +80,8 @@ class SendTweetPlugin(plugin.APRSDRegexCommandPluginBase):
|
||||
|
||||
LOG.info("SendTweetPlugin Plugin")
|
||||
|
||||
from_callsign = packet.get("from")
|
||||
message = packet.get("message_text", None)
|
||||
from_callsign = packet.from_call
|
||||
message = packet.message_text
|
||||
message = message.split(" ")
|
||||
del message[0]
|
||||
message = " ".join(message)
|
||||
@ -105,4 +105,4 @@ class SendTweetPlugin(plugin.APRSDRegexCommandPluginBase):
|
||||
return "Tweet sent!"
|
||||
else:
|
||||
LOG.warning("SendTweetPlugin is disabled.")
|
||||
return messaging.NULL_MESSAGE
|
||||
return packets.NULL_MESSAGE
|
||||
|
@ -1,3 +1,3 @@
|
||||
pbr
|
||||
aprsd>=2.2.0
|
||||
aprsd>=2.7.0
|
||||
tweepy
|
||||
|
Loading…
Reference in New Issue
Block a user