1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-18 14:22:01 -05:00
Commit Graph

13 Commits

Author SHA1 Message Date
fc3a747aa4 Added new time plugins
This patch adds 2 new time plugins to allow admins to use their
opencagedata APIkey or openweathermap API key to fetch the timezone
from the lat/lon GPS coordinates for the callsign requesting the time.

This will enable fetching the time local to the ham radio's last beacon,
and not time local to the aprsd server instance running.  If the
location is not found, then the timezone will default to UTC.

The 2 new plugins are
- aprsd.plugins.time.TimeOpenCageDataPlugin
   Fetches timezone from lat/lon using the opencagedata api that can be
   found here:  https://opencagedata.com/dashboard#api-keys

   This requires a new ~/.config/aprsd/aprsd.yml entry to specify the
   api key.
   opencagedata:
       apiKey: <the api key hash here>

- aprsd.plugins.time.TimeOWMPlugin
   Fetches the timezone from lat/lon using the openweathermap api
   that can be found here:  https://home.openweathermap.org/api_keys

   This requires a new ~/.config/aprsd/aprsd.yml entry to specify the
   api key.
   openweathermap:
       apiKey: <the api key hash here>
2021-01-20 10:19:49 -05:00
9f38fd179e Fixed TimePlugin timezone issue
The existing time plugin had a hard coded PDT for pacific timezone,
when it wasn't.   This patch adds some real timezone conversion from
utc to the tz of the running aprsd server.   This will eventually allow
us to use either the tz of the running aprsd and/or the tz of the
calling callsign if we can just get the tz string from the location
beacon of the caller's callsign.
2021-01-19 11:26:07 -05:00
Craig Lamparter
7de2820caa change query char from ? to ! 2021-01-17 07:55:59 -08:00
Craig Lamparter
3be373d7fc test plugin expect responses update to match query output 2021-01-14 12:06:57 -08:00
Craig Lamparter
e7dc537900 fix plugin tests to expect new strings 2021-01-14 11:28:59 -08:00
94708024da Fixed unit test for fortune plugin 2021-01-11 14:29:02 -05:00
Craig Lamparter
e1a292d8e0 expect different reply from query plugin 2021-01-11 09:20:25 -08:00
68e6f5b986 Added unit test for QueryPlugin
This patch adds a simple test for the QueryPlugin
2021-01-11 12:09:29 -05:00
d5a34b4d11 refactor Plugin objects to plugins directory
This patch moves all of the plugins out of plugin.py
into their own separate plugins/<plugin>.py file.  This
makes it easier to maintain each plugin.

NOTE:  You will have to update your ~/.config/aprsd/aprsd.yml

to change the python location path for each plugin enabled.

For example:
OLD:
  enabled_plugins:
   - aprsd.plugin.EmailPlugin

TO NEW
  enabled_plugins:
   - aprsd.plugins.email.EmailPlugin
2021-01-09 10:00:37 -05:00
231c15b1af Lots of fixes 2021-01-08 20:58:18 -05:00
75f610d971 Added pre-commit hooks
This patch adds pre-commit hook support to ensure
code passes basic checks prior to allowing a commit.
2021-01-06 17:54:50 -05:00
9d3ede6e71 Added FortunePlugin unit test
this patch adds te FortunePlugin unit tests.
2020-12-25 18:13:52 -05:00
171703ac1a Added some plugin unit tests
This patch adds some real unit tests for the following plugins
PingPlugin
TimePlugin
VersionPlugin
2020-12-25 16:54:46 -05:00