Package: gemtide
GemTideA Jetforce application for serving information about UK tidal events over the Gemini Protocol.Take a look|Report a bug|Contact the authorBuilt withJetforce- framework for writing Gemini applicationsUKHO Tides- client wrapper for the Admiralty UK Tidal APIJinja2- templating enginePrerequisitesPython 3.7 or newerAPI key for theUK Tidal APIfrom Admiralty Maritime Data Solutions Developer Portal. The Discovery subscription is free and provides current plus 6 days' worth of events. Follow theStart up guidefor help.Quick StartCreate a virtual environment(Recommended)$mkdir/opt/gemtide
$python3-mvenv/opt/gemtide/venv
$python3-mpipinstall--upgradepip
$source/opt/gemtide/venv/bin/activateInstall gemtide package from PyPi$pipinstallgemtideCreate fileconfig.yamland add:api_key:Your UK Tidal API key``Run the application with a default Jetforce server```bash$ python3 -m gemtideIn your preferred gemini client go togemini://localhostThe application has the following routes:/- index page with customisable menu/searchprompts for query input/location/name.gmishows tidal events for the named location in gemini text format/location/name.txtshows tidal events for the named location in plain text formatFull Installation GuideRequired packagesFor Ubuntu 20.04 LTS:python3python3-pippython3-venvpython3-devlibffi-devlibssl-devFor Alpine Edge:python3python3-devlibffi-devlibc-devgccInstallationCreate virtual environment as per "Quick Start" above, and install from PyPi.Or to install from source see "Developing" below.Usage as a standalone serverCreate fileconfig.yamland add:api_key:Your UK Tidal API key (required)station_prefix: Customise the path/prefix of the location routes (default:"location/")menu: List displayed on index page (default:None)-link:label:server:Options for the Jetforce server configurationhost: (default:"127.0.0.1")port: (default:1965)hostname: (default:"localhost")tls-certfile: (default:None)tls-keyfile: (default:None)tls-cafile: (default:None)tls-capath: (default:None)Start the server$python3-mgemtide[path/to/config.yaml]Or if the virtual environment is not activated$/opt/venv/gemtide/bin/gemtide[path/to/config.yaml]Usage as a custom Jetforce applicationSee Jetforce README section onVirtual HostingSingle applicationfromjetforceimportGeminiServerfromgemtideimportGemTideApplicationapp=GemTideApplication(api_key,station_prefix="location/",menu=[{link:label}])server=GeminiServer(app)server.run()Composite applicationfromjetforceimportGeminiServer,StaticDirectoryApplicationfromjetforce.app.compositeimportCompositeApplicationfromgemtideimportGemTideApplicationapp_gemtide=GemTideApplication(api_key,station_prefix="location/",menu=[{link:label}])app_default=StaticDirectoryApplication(root_directory="/var/gemini/")app=CompositeApplication({"gemtide.example.com":app_gemtide,# Use a default static file server for all other domainsNone:app_default,})DevelopingClone the repository (read-only)$gitclonehttps://git.sr.ht/~supergrizzlybear/gemtideor read/write$gitclonegit@git.sr.ht:~supergrizzlybear/gemtideInstall gemtide from source$cdgemtide
$python3-mpipinstall.Install development dependencies$python3-mpipinstallfreezegunTest$python3test_gemtide.pyLicenseThis project is licensed under theFloodgap Free Software License.The Floodgap Free Software License (FFSL) has one overriding mandate: that software
using it, or derivative works based on software that uses it, must be free. By free
we mean simply "free as in beer" -- you may put your work into open or closed source
packages as you see fit, whether or not you choose to release your changes or updates
publicly, but you must not ask any fee for it.ContactEmail:supergrizzlybear@protonmail.comMastodon:@supergrizzlybear@fosstodon.orgGemini:super.grizzlybear.site