diff --git a/static/apidocs/openapi.yml b/static/apidocs/openapi.yml index 8d38dcd..5b8dee9 100644 --- a/static/apidocs/openapi.yml +++ b/static/apidocs/openapi.yml @@ -5,7 +5,7 @@ info: description: |- Spothole is a utility to aggregate "spots" from amateur radio DX clusters and xOTA spotting sites, and provide an open JSON API as well as a website to browse the data. This page is an OpenAPI specification which describes Spothole's API. Clients can use this API to retrieve all the spots, alerts, and other information known to Spothole. - You can find out more information about Spothole at https://spothole.app/help. + You can find out more information about Spothole at https://spothole.app/help, and specifically about creating a client to this API at https://spothole.app/help/usage/clients. The API provided by https://spothole.app is provided free of charge, and no authentication is required. By using it, you accept the following: * You wrote the client code yourself, OR, if you got an AI to write it for you, you promise to read and understand what it wrote before contacting me about any problems. diff --git a/templates/add_spot.html b/templates/add-spot.html similarity index 98% rename from templates/add_spot.html rename to templates/add-spot.html index 7cacf17..7f09588 100644 --- a/templates/add_spot.html +++ b/templates/add-spot.html @@ -77,7 +77,7 @@ - + diff --git a/templates/alerts.html b/templates/alerts.html index 5e4cdbf..c608906 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -85,7 +85,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index d1402f1..e3626ea 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,8 +76,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 680c970..0f53d1d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -16,10 +16,10 @@ window.fetchEventSource = fetchEventSource; - - - - + + + + {% end %} {% block body %}
Welcome to Spothole's help pages.
Spothole is a utility to aggregate spots from amateur radio DX clusters and xOTA spotting sites, and provide an - open JSON API as well as a website to browse the data.
+ open JSON API as well as a website to browse the data. (If that sounds like nonsense to you, I recommend + starting with the FAQ!)In the sections below, you can find more information about what Spothole is, and how to use it.
There are a number of different ways to use Spothole, depending on what you want to do with it and your level of + technical skill:
+{{ telnet_server_address }} and port {{ telnet_server_port }}. You can also access
+ it from a terminal with telnet {{ telnet_server_address }} {{ telnet_server_port }}.
+ One of the key strengths of Spothole is that the API is well-defined and open to anyone to use. This means you can build -your own software that uses data from Spothole.
+One of the key strengths of Spothole is that the API is well-defined and open to anyone to use. This means you can + build your own software that uses data from Spothole.
As well as the main API endpoints to fetch spots and alerts, with various possible query parameters, there are also -Server-Sent Events (SSE) API endpoints to receive a live feed, plus various utility lookup endpoints for things like -callsign and park data.
+ Server-Sent Events (SSE) API endpoints to receive a live feed, plus various utility lookup endpoints for things like + callsign and park data.Various approaches exist to writing your own client, but in general:
/static/apidocs/openapi.yml), which you can
- automatically use to generate a client skeleton using various software.https://spothole.app/api/v2/spots once every few minutes. Apply filters if necessary./static/apidocs/openapi.yml),
+ which you can automatically use to generate a client skeleton using various software.
https://spothole.app/api/v2/spots once every few minutes. Apply filters if necessary.
+ Please don't hammer the API with an unnecessarily high request rate. For example, Spothole only queries the POTA API -once every two minutes, so if your client is interested in POTA data there's no need to poll Spothole any more often -than that.
-If you absolutely must be informed within seconds of a spot arriving in Spothole, please use the SSE endpoints instead,
-e.g. https://spothole.app/api/v2/spots/stream.
If you want to handle different types of spot or alert differently within your client, please consider making a single
-request to the Spothole API to retrieve all the data, then filtering on your side. For example, call
-https://spothole.app/api/v2/spots?sig=POTA,SOTA rather than making two separate calls to
-https://spothole.app/api/v2/spots?sig=POTA and https://spothole.app/api/v2/spots?sig=SOTA.
If you absolutely must be informed within seconds of a spot arriving in Spothole, please use the SSE endpoints
+ instead, e.g. https://spothole.app/api/v2/spots/stream.
If you want to handle different types of spot or alert differently within your client, please consider making a
+ single request to the Spothole API to retrieve all the data, then filtering on your side. For example, call
+ https://spothole.app/api/v2/spots?sig=POTA,SOTA rather than making two separate calls to
+ https://spothole.app/api/v2/spots?sig=POTA and https://spothole.app/api/v2/spots?sig=SOTA.
+
Remember, here at Spothole Inc. we offer an industry-standard "five nines" uptime on our server, with our own unique
-twist: we don't tell you which side of the decimal point the nines start! (Translation: This is a hobby project.
-spothole.app runs on the same server as my blog and other stuff. It might go down without warning. By all means base
-your own project on data from the main server if you like, but if you want any control over reliability and downtime,
-please run your own copy instead.)
spothole.app runs on the same server as my blog and other stuff. It might go down without warning. By
+ all means base your own project on data from the main server if you like, but if you want any control over
+ reliability and downtime, please run your own copy instead.)
{% end %}
diff --git a/templates/help/usage/docker.html b/templates/help/usage/docker.html
index 8a4f9bc..7e757c7 100644
--- a/templates/help/usage/docker.html
+++ b/templates/help/usage/docker.html
@@ -2,9 +2,9 @@
{% block help_content %}
Spothole comes with a Docker configuration to make it easy to run it in a containerised environment. To set it up using
-Docker, the easiest way is to use a Docker Compose file. Create a new directory such as /opt/docker/spothole and
-create a compose.yaml file inside it with the following contents:
Spothole comes with a Docker configuration to make it easy to run it in a containerised environment. To set it up
+ using Docker, the easiest way is to use a Docker Compose file. Create a new directory such as /opt/docker/spothole
+ and create a compose.yaml file inside it with the following contents:
services:
spothole:
container_name: spothole
@@ -18,23 +18,24 @@ create a compose.yaml file inside it with the following contents:
- ./config.yml:/app/config.yml
- ./cache:/app/cache
-You can replace #main with any other branch or tag reference, for example #1.5 to pin the build to tagged version
-1.5.
Save the file. You will still need to create a copy of config-example.yml and name it config.yml, though with the
-Docker setup nothing has actually been downloaded yet, so you will have to copy the example from the repository some
-other way,
-e.g. from the repo in a web browser.
With that in place, run docker compose up and you should be good to go. To detach, press d or run the command with
-the -d flag.
You can replace #main with any other branch or tag reference, for example #1.5 to pin the
+ build to tagged version 1.5.
Save the file. You will still need to create a copy of config-example.yml and name it
+ config.yml, though with the Docker setup nothing has actually been downloaded yet, so you will have to
+ copy the example from the repository some other way, e.g. from the repo in a web
+ browser.
With that in place, run docker compose up and you should be good to go. To detach, press d
+ or run the command with the -d flag.
In a containerised setup, it's typical to run an nginx reverse proxy in one container, alongside certbot for renewal of -HTTPS certificates, and then applications like Spothole in a separate container. In this case, there are a couple of -variations of the docker compose file above, and the nginx reverse proxy configuration covered here, that -you will want to make.
+In a containerised setup, it's typical to run an nginx reverse proxy in one container, alongside certbot for renewal + of HTTPS certificates, and then applications like Spothole in a separate container. In this case, there are a couple + of variations of the docker compose file above, and the nginx reverse proxy configuration covered here, that you will want to make.
http://spothole:8080http://spothole:8080So your compose.yaml might look like this:
In your nginx site configuration, you'll want to refer to the Spothole container directly, and drop the block that -allows nginx to access static files directly, as these will be inaccessible in another container. So you may end up with -something like:
+ allows nginx to access static files directly, as these will be inaccessible in another container. So you may end up + with something like:server {
server_name spothole.app;
@@ -138,12 +139,13 @@ server {
}
If desired, you could even change the port on which Spothole runs from 8080 to a plain 80, in which case your
-proxy_pass statements could drop the :8080 suffix. Since Spothole is in a container, it can serve HTTP on port 80 if
-desired, because it doesn't conflict with the host system.
proxy_pass statements could drop the :8080 suffix. Since Spothole is in a container, it
+ can serve HTTP on port 80 if desired, because it doesn't conflict with the host system.
If you would still like to bypass Spothole's web server for the static files, and serve them with nginx, you can do. The
-easiest way is to run another nginx container to serve the files, so your Spothole compose.yaml becomes:
If you would still like to bypass Spothole's web server for the static files, and serve them with nginx, you can do.
+ The easiest way is to run another nginx container to serve the files, so your Spothole compose.yaml
+ becomes:
services:
spothole:
container_name: spothole
@@ -171,8 +173,8 @@ networks:
docker-network:
external: true
-Then you can re-add the block that handles the /static path in your nginx reverse proxy config, but this time point it
-at the new container rather than at a filesystem path:
Then you can re-add the block that handles the /static path in your nginx reverse proxy config, but this
+ time point it at the new container rather than at a filesystem path:
# Load static assets from the spothole-static-nginx container
location /static/ {
proxy_pass http://spothole-static-nginx/;
diff --git a/templates/help/usage/embedding.html b/templates/help/usage/embedding.html
index 8e3eb5a..e445380 100644
--- a/templates/help/usage/embedding.html
+++ b/templates/help/usage/embedding.html
@@ -1,142 +1,162 @@
{% extends "../help_page.html" %}
{% block help_content %}
-Embedding Spothole in another website
+Embedding Spothole in Another Website
You can embed Spothole's web interface in another website, e.g. for use as part of a ham radio custom dashboard.
URL parameters can be used to trigger an "embedded" mode which hides the headers, footers and settings. In this mode,
-you provide configuration for the various filter and display options via additional URL parameters. Any settings that
-the user has set for Spothole are ignored. This is so that the embedding site can select, for example, their choice of
-dark mode or activity filters, which will not impact how Spothole appears when the user accesses it directly. Effectively, it
-becomes separate to their normal Spothole settings.
-Setting embedded to true is important for the rest of the settings to be applied; otherwise, the user's defaults will
-be used in preference to the URL params.
+ you provide configuration for the various filter and display options via additional URL parameters. Any settings
+ that the user has set for Spothole are ignored. This is so that the embedding site can select, for example, their
+ choice of dark mode or activity filters, which will not impact how Spothole appears when the user accesses it
+ directly. Effectively, it becomes separate to their normal Spothole settings.
+Setting embedded to true is important for the rest of the settings to be applied; otherwise, the user's
+ defaults will be used in preference to the URL params.
These are supplied with the URL to the page you want to embed, for example for an embedded version of the band map in
-dark mode, use https://spothole.app/bands?embedded=true&dark-mode=true. For an embedded version of the main spots/home
-page in the system light/dark mode, use https://spothole.app/?embedded=true. For dark mode showing 70cm TOTA spots
-only, use https://spothole.app/?embedded=true&dark-mode=true&sig=TOTA&band=70cm. Providing no URL params causes the
-page to be loaded in the normal way it would when accessed directly in the user's browser.
-The supported parameters are as follows. Generally these match the equivalent parameters in the real Spothole API, where
-a mapping exists.
+ dark mode, use https://spothole.app/bands?embedded=true&dark-mode=true. For an embedded version of
+ the main spots/home page in the system light/dark mode, use https://spothole.app/?embedded=true. For
+ dark mode showing 70cm TOTA spots only, use https://spothole.app/?embedded=true&dark-mode=true&sig=TOTA&band=70cm.
+ Providing no URL params causes the page to be loaded in the normal way it would when accessed directly in the user's
+ browser.
+The supported parameters are as follows. Generally these match the equivalent parameters in the real Spothole API,
+ where a mapping exists.
-
-
-
- Name
- Allowed Values
- Default
- Example
- Description
-
-
-
-
- embedded
- true, false
- false
- ?embedded=true
- Enables embedded mode.
-
-
- color_scheme
- light, dark, auto
- auto
- ?color_scheme=dark
- Forces light or dark mode in preference to the operating system default.
-
-
- time_zone
- UTC, local
- UTC
- ?time_zone=local
- Sets times to be in UTC or local time.
-
-
- limit
- 10, 25, 50, 100
- 50
- ?limit=50
- Sets the number of spots that will be displayed on the main spots page
-
-
- limit
- 25, 50, 100, 200, 500
- 100
- ?limit=100
- Sets the number of alerts that will be displayed on the alerts page
-
-
- max_age
- 300, 600, 1800, 3600
- 1800
- ?max_age=1800
- Sets the maximum age of spots displayed on the map and bands pages, in seconds.
-
-
- band
- Comma-separated list
- (all)
- ?band=20m,40m
- Sets the list of bands that will be shown on the spots, bands and map pages. Available options match the labels of the buttons in the standard web interface.
-
-
- sig
- Comma-separated list
- (all)
- ?sig=POTA,SOTA,NO_SIG
- Sets the list of activities that will be shown on the spots, bands and map pages. Available options match the labels of the buttons in the standard web interface.
-
-
- source
- Comma-separated list
- (all)
- ?source=Cluster
- Sets the list of sources that will be shown on any spot or alert pages. Available options match the labels of the buttons in the standard web interface.
-
-
- mode_type
- Comma-separated list
- (all)
- ?mode_type=PHONE,CW
- Sets the list of mode types that will be shown on the spots, bands and map pages. Available options match the labels of the buttons in the standard web interface.
-
-
- dx_continent
- Comma-separated list
- (all)
- ?dx_continent=NA,SA
- Sets the list of DX Continents that will be shown on any spot or alert pages. Available options match the labels of the buttons in the standard web interface.
-
-
- de_continent
- Comma-separated list
- (all)
- ?de_continent=EU
- Sets the list of DE Continents that will be shown on the spots, bands and map pages. Available options match the labels of the buttons in the standard web interface.
-
-
- map-center-lat
- Numeric (decimal)
- (auto)
- ?map-center-lat=51.5
- Sets the initial latitude of the map centre on the map page. If omitted, the map auto-fits to the loaded spots.
-
-
- map-center-lon
- Numeric (decimal)
- (auto)
- ?map-center-lon=-0.1
- Sets the initial longitude of the map centre on the map page. If omitted, the map auto-fits to the loaded spots.
-
-
- map-zoom
- Numeric (integer)
- (auto)
- ?map-zoom=6
- Sets the initial zoom level of the map on the map page. If omitted, the map auto-fits to the loaded spots.
-
-
-
+
+
+
+ Name
+ Allowed Values
+ Default
+ Example
+ Description
+
+
+
+
+ embedded
+ true, false
+ false
+ ?embedded=true
+ Enables embedded mode.
+
+
+ color_scheme
+ light, dark, auto
+ auto
+ ?color_scheme=dark
+ Forces light or dark mode in preference to the operating system default.
+
+
+ time_zone
+ UTC, local
+ UTC
+ ?time_zone=local
+ Sets times to be in UTC or local time.
+
+
+ limit
+ 10, 25, 50, 100
+ 50
+ ?limit=50
+ Sets the number of spots that will be displayed on the main spots page
+
+
+ limit
+ 25, 50, 100, 200, 500
+ 100
+ ?limit=100
+ Sets the number of alerts that will be displayed on the alerts page
+
+
+ max_age
+ 300, 600, 1800, 3600
+ 1800
+ ?max_age=1800
+ Sets the maximum age of spots displayed on the map and bands pages, in seconds.
+
+
+ band
+ Comma-separated list
+ (all)
+ ?band=20m,40m
+ Sets the list of bands that will be shown on the spots, bands and map pages. Available options match the
+ labels of the buttons in the standard web interface.
+
+
+
+ sig
+ Comma-separated list
+ (all)
+ ?sig=POTA,SOTA,NO_SIG
+ Sets the list of activities that will be shown on the spots, bands and map pages. Available options
+ match the labels of the buttons in the standard web interface.
+
+
+
+ source
+ Comma-separated list
+ (all)
+ ?source=Cluster
+ Sets the list of sources that will be shown on any spot or alert pages. Available options match the
+ labels of the buttons in the standard web interface.
+
+
+
+ mode_type
+ Comma-separated list
+ (all)
+ ?mode_type=PHONE,CW
+ Sets the list of mode types that will be shown on the spots, bands and map pages. Available options
+ match the labels of the buttons in the standard web interface.
+
+
+
+ dx_continent
+ Comma-separated list
+ (all)
+ ?dx_continent=NA,SA
+ Sets the list of DX Continents that will be shown on any spot or alert pages. Available options match
+ the labels of the buttons in the standard web interface.
+
+
+
+ de_continent
+ Comma-separated list
+ (all)
+ ?de_continent=EU
+ Sets the list of DE Continents that will be shown on the spots, bands and map pages. Available options
+ match the labels of the buttons in the standard web interface.
+
+
+
+ map-center-lat
+ Numeric (decimal)
+ (auto)
+ ?map-center-lat=51.5
+ Sets the initial latitude of the map centre on the map page. If omitted, the map auto-fits to the loaded
+ spots.
+
+
+
+ map-center-lon
+ Numeric (decimal)
+ (auto)
+ ?map-center-lon=-0.1
+ Sets the initial longitude of the map centre on the map page. If omitted, the map auto-fits to the
+ loaded spots.
+
+
+
+ map-zoom
+ Numeric (integer)
+ (auto)
+ ?map-zoom=6
+ Sets the initial zoom level of the map on the map page. If omitted, the map auto-fits to the loaded
+ spots.
+
+
+
+
-See the comment at the end of the next section regarding reliability and uptime of the "main" server.
+See the comment at the end of the Writing your own Client page regarding
+ reliability and uptime of the "main" server.
{% end %}
diff --git a/templates/help/usage/modifying.html b/templates/help/usage/modifying.html
index 99fc803..3e7563a 100644
--- a/templates/help/usage/modifying.html
+++ b/templates/help/usage/modifying.html
@@ -3,7 +3,10 @@
Modifying the source code
Spothole is Public Domain licenced, so you can grab the source code and start modifying it for your own needs.
-Contributions of code back to the main repository are encouraged, but completely optional.
+ Contributions of code back to the main repository are encouraged, but completely optional.
+
+The source code can be found at https://git.ianrenton.com/ian/spothole.
+
Code structure
To navigate your way around the source code, this list may help.
@@ -14,13 +17,18 @@ Contributions of code back to the main repository are encouraged, but completely
/data - Data storage classes
/providers/spot - Classes providing spots by accessing the APIs of other services
/providers/alert - Classes providing alerts by accessing the APIs of other services
- /providers/solarconditions - Classes providing solar and propagation by accessing the APIs of other services
- /providers/staticdata - Classes providing static lookup data by accessing bundled data files or the APIs of other
- services
- /providers/callsign - Classes providing callsign lookup data by accessing bundled data files or the APIs of other
- services
- /providers/activityrefdata - Classes providing activity reference lookup data by accessing bundled data files or
- the APIs of other services
+ /providers/solarconditions - Classes providing solar and propagation by accessing the APIs of other
+ services
+
+ /providers/staticdata - Classes providing static lookup data by accessing bundled data files or the
+ APIs of other services
+
+ /providers/callsign - Classes providing callsign lookup data by accessing bundled data files or the
+ APIs of other services
+
+ /providers/activityrefdata - Classes providing activity reference lookup data by accessing bundled
+ data files or the APIs of other services
+
/webserver - Classes for running Spothole's own web server
/telnetserver - Classes for running Spothole's telnet server
spothole.py - Main application script
@@ -33,7 +41,9 @@ Contributions of code back to the main repository are encouraged, but completely
HTML/JS/CSS front-end code
- /static - Root for static files served by the web server. These are all served from a path starting /static/.
+ /static - Root for static files served by the web server. These are all served from a path starting
+ /static/.
+
/static/apidocs - Contains the OpenAPI spec (openapi.yml)
/static/audio - Audio files used by the web front-end
/static/css - CSS files used by the web front-end
@@ -47,32 +57,43 @@ Contributions of code back to the main repository are encouraged, but completely
/ - pip requirements.txt, config, README, etc.
/docs - Documentation
/images - Image sources
- /datafiles - Local data files, used by some providers when the data will never change and/or is not easily available
- online in a format Spothole can handle
- /cache - Directory where Spothole stores all the data it uses that should be persisted to disk. Created on first
- run.
+ /datafiles - Local data files, used by some providers when the data will never change and/or is not
+ easily available online in a format Spothole can handle
+
+ /cache - Directory where Spothole stores all the data it uses that should be persisted to disk.
+ Created on first run.
+
Extending the server
Spothole is designed to be easily extensible. If you want to write your own spot provider, for example, simply add a
-module to the providers.spot package containing your class. (Currently, in order to be loaded correctly, the module
-(file) name should be the same as the class name, but lower case.)
+ module to the providers.spot package containing your class. (Currently, in order to be loaded
+ correctly, the module
+ (file) name should be the same as the class name, but lower case.)
Your class should extend "SpotProvider"; if it operates by polling an HTTP Server on a timer, it can instead extend "
-HTTPSpotProvider" where some of the work is done for you.
-The class will need to implement a constructor that takes in the provider_config and provides it to the superclass
-constructor, while also taking any other config parameters it needs.
-If you're extending the base SpotProvider class, you will need to implement start() and stop() methods that start
-and stop a separate thread which handles the provider's processing needs. The thread should call submit() or
-submit_batch() when it has one or more spots to report.
-If you're extending the HTTPSpotProvider class, you will need to provide a URI to query and an interval to the
-superclass constructor. You'll then need to implement the http_response_to_spots() method which is called when new
-data is retrieved. Your implementation should then call submit() or submit_batch() when it has one or more spots to
-report.
+ HTTPSpotProvider" where some of the work is done for you.
+The class will need to implement a constructor that takes in the provider_config and provides it to the
+ superclass
+ constructor, while also taking any other config parameters it needs.
+If you're extending the base SpotProvider class, you will need to implement start() and
+ stop() methods that start
+ and stop a separate thread which handles the provider's processing needs. The thread should call
+ submit() or
+ submit_batch() when it has one or more spots to report.
+If you're extending the HTTPSpotProvider class, you will need to provide a URI to query and an interval
+ to the
+ superclass constructor. You'll then need to implement the http_response_to_spots() method which is
+ called when new
+ data is retrieved. Your implementation should then call submit() or submit_batch() when it
+ has one or more spots to
+ report.
When constructing spots, use the comments in the Spot class and the existing implementations as an example. All
-parameters are optional, but you will at least want to provide a time (which must be timezone-aware) and a dx_call.
-Finally, simply add the appropriate config to the spot_providers section of config.yml, and your provider should be
-instantiated on startup.
+ parameters are optional, but you will at least want to provide a time (which must be timezone-aware)
+ and a dx_call.
+Finally, simply add the appropriate config to the spot_providers section of config.yml, and
+ your provider should be
+ instantiated on startup.
The same approach as above is also used for alerts, and other types of providers. Give me a shout if you need any
-advice.
+ advice.
{% end %}
diff --git a/templates/help/usage/multicluster.html b/templates/help/usage/multicluster.html
index b7fde47..0a06504 100644
--- a/templates/help/usage/multicluster.html
+++ b/templates/help/usage/multicluster.html
@@ -1,9 +1,10 @@
{% extends "../help_page.html" %}
{% block help_content %}
-Multiple cluster nodes with different settings
+Multiple Cluster Nodes with Different Settings
Dan, S50U has written in with his Spothole cluster settings. He is using a cluster node which provides RBN spots, and
-uses different SSIDs on his callsign to get different settings when logged into the same cluster node. For example:
+ uses different SSIDs on his callsign to get different settings when logged into the same cluster node. For
+ example:
-
class: "DXCluster"
name: "S50CLX"
@@ -15,10 +16,10 @@ uses different SSIDs on his callsign to get different settings when logged into
Telnet to DXSpider and log in with "callsign-10" and execute the following commands:
CLEAR/SPOTS ALL (delete all previous filters)
-UNSET/ANN (stop announce messages)
-UNSET/WCY (stop wcy messages)
-UNSET/WWV (stop wwv messages)
-SET/DX (enable human DX spots)
+ UNSET/ANN (stop announce messages)
+ UNSET/WCY (stop wcy messages)
+ UNSET/WWV (stop wwv messages)
+ SET/DX (enable human DX spots)
-
class: "DXCluster"
name: "RBN CW"
@@ -32,11 +33,11 @@ uses different SSIDs on his callsign to get different settings when logged into
Telnet to DXSpider and log in with "callsign-11" and execute the following commands:
CLEAR/SPOTS ALL (delete all previous filters)
-UNSET/ANN (stop announce messages)
-UNSET/WCY (stop wcy messages)
-UNSET/WWV (stop wwv messages)
-UNSET/DX (stop human DX spots)
-SET/SKIMMER CW (enable CW RBN spots)
+ UNSET/ANN (stop announce messages)
+ UNSET/WCY (stop wcy messages)
+ UNSET/WWV (stop wwv messages)
+ UNSET/DX (stop human DX spots)
+ SET/SKIMMER CW (enable CW RBN spots)
-
class: "DXCluster"
name: "RBN RTTY"
@@ -50,11 +51,11 @@ uses different SSIDs on his callsign to get different settings when logged into
Telnet to DXSpider and log in with "callsign-12" and execute the following commands:
CLEAR/SPOTS ALL (delete all previous filters)
-UNSET/ANN (stop announce messages)
-UNSET/WCY (stop wcy messages)
-UNSET/WWV (stop wwv messages)
-UNSET/DX (stop human DX spots)
-SET/SKIMMER RTTY (enable RTTY RBN spots)
+ UNSET/ANN (stop announce messages)
+ UNSET/WCY (stop wcy messages)
+ UNSET/WWV (stop wwv messages)
+ UNSET/DX (stop human DX spots)
+ SET/SKIMMER RTTY (enable RTTY RBN spots)
-
class: "DXCluster"
name: "RBN FT4/8"
@@ -68,15 +69,15 @@ uses different SSIDs on his callsign to get different settings when logged into
Telnet to DXSpider and log in with "callsign-13" and execute the following commands:
CLEAR/SPOTS ALL (delete all previous filters)
-UNSET/ANN (stop announce messages)
-UNSET/WCY (stop wcy messages)
-UNSET/WWV (stop wwv messages)
-UNSET/DX (stop human DX spots)
-SET/SKIMMER FT (enable FT RBN spots)
+ UNSET/ANN (stop announce messages)
+ UNSET/WCY (stop wcy messages)
+ UNSET/WWV (stop wwv messages)
+ UNSET/DX (stop human DX spots)
+ SET/SKIMMER FT (enable FT RBN spots)
For each callsign-SSID, we also specify our basic information with commands:
SET/NAME Spothole10, Spothole11... etc.
-SET/QTH Cerkno
-SET/QRA JN66XD
-SET/HOME S50CLX
+ SET/QTH Cerkno
+ SET/QRA JN66XD
+ SET/HOME S50CLX
{% end %}
diff --git a/templates/help/usage/nginx.html b/templates/help/usage/nginx.html
index fbb7f66..77ab36a 100644
--- a/templates/help/usage/nginx.html
+++ b/templates/help/usage/nginx.html
@@ -1,22 +1,22 @@
{% extends "../help_page.html" %}
{% block help_content %}
-nginx Reverse Proxy configuration
-Web servers generally serve their pages from port 80. However, it's best not to serve Spothole's web interface directly
-on port 80, as that requires root privileges on a Linux system. It also and prevents us using HTTPS to serve a secure
-site, since Spothole itself doesn't directly support acting as an HTTPS server. The normal solution to this is to use a
-"reverse proxy" setup, where a general web server handles HTTP and HTTP requests (to port 80 & 443 respectively), then
-passes on the request to the back-end application (in this case Spothole). nginx is a common choice for this general web
-server.
+nginx Reverse Proxy Configuration
+Web servers generally serve their pages from port 80. However, it's best not to serve Spothole's web interface
+ directly on port 80, as that requires root privileges on a Linux system. It also and prevents us using HTTPS to
+ serve a secure site, since Spothole itself doesn't directly support acting as an HTTPS server. The normal solution
+ to this is to use a "reverse proxy" setup, where a general web server handles HTTP and HTTP requests (to port 80
+ & 443 respectively), then passes on the request to the back-end application (in this case Spothole). nginx is a
+ common choice for this general web server.
To set up nginx as a reverse proxy that sits in front of Spothole, first ensure it's installed e.g.
-sudo apt install nginx, and enabled e.g. sudo systemd enable nginx.
-Create a file at /etc/nginx/sites-available/ called spothole. Give it the following contents, replacing
-spothole.app with the domain name on which you want to run Spothole. If you changed the port on which Spothole runs,
-update that on the "proxy_pass" line, and if you installed Spothole somewhere other than /home/spothole/spothole,
-adjust the alias location for serving static files.
-(The latter section, configuring the nginx server to serve static files directly, improves efficiency because it saves
-Spothole itself from serving JS, CSS etc. files. If you can't do this for some reason, e.g. your nginx and spothole are
-on different computers, you can omit the location /static/ {} block.)
+ sudo apt install nginx, and enabled e.g. sudo systemd enable nginx.
+Create a file at /etc/nginx/sites-available/ called spothole. Give it the following
+ contents, replacing spothole.app with the domain name on which you want to run Spothole. If you changed
+ the port on which Spothole runs, update that on the "proxy_pass" line, and if you installed Spothole somewhere other
+ than /home/spothole/spothole, adjust the alias location for serving static files.
+(The latter section, configuring the nginx server to serve static files directly, improves efficiency because it
+ saves Spothole itself from serving JS, CSS etc. files. If you can't do this for some reason, e.g. your nginx and
+ spothole are on different computers, you can omit the location /static/ {} block.)
server {
server_name spothole.app;
@@ -84,26 +84,29 @@ on different computers, you can omit the location /static/ {} block
}
}
-One further change you might want to make to the file above is the add_header Access-Control-Allow-Origin statements.
-These are what's used on my own Spothole server to make sure that other third-party web-based software can get the data
-from my instance, and applies to any endpoint underneath /api. If you want your Spothole instance to be set up the
-same way, so that others can write software in JavaScript that can access it, leave this intact. But if you want your
-Spothole instance to only be usable by scripts running on the web server you write, you can remove these lines. (Note
-that this doesn't stop other people writing non-web-based software that accesses your Spothole API—the
-enforcement of cross-origin headers only happens within the user's browser. If you need to lock your instance down so
-that no-one else can access it with any software, that's an aspect of nginx or firewall config that you will need to
-find help with elsewhere.)
+One further change you might want to make to the file above is the add_header
+ Access-Control-Allow-Origin statements. These are what's used on my own Spothole server to make sure that
+ other third-party web-based software can get the data from my instance, and applies to any endpoint underneath
+ /api. If you want your Spothole instance to be set up the same way, so that others can write
+ software in JavaScript that can access it, leave this intact. But if you want your Spothole instance to only be
+ usable by scripts running on the web server you write, you can remove these lines. (Note that this doesn't stop
+ other people writing non-web-based software that accesses your Spothole API—the enforcement of
+ cross-origin headers only happens within the user's browser. If you need to lock your instance down so that no-one
+ else can access it with any software, that's an aspect of nginx or firewall config that you will need to
+ find help with elsewhere.)
Now, make a symbolic link to enable the site:
cd /etc/nginx/sites-enabled
sudo ln -sf ../sites-available/spothole
Test that your nginx config isn't broken using nginx -t. If it works, restart nginx with
-sudo systemctl restart nginx.
+ sudo systemctl restart nginx.
If you haven't already done so, set up a DNS entry to make sure requests for your domain name end up at the server
-that's running Spothole.
+ that's running Spothole.
You should now be able to access the web interface by going to the domain from your browser.
-Once that's working, install certbot onto your server. Run it
-as root, and when prompted pick your domain name from the list. After a few seconds, it should successfully provision a
-certificate and modify your nginx config files automatically. You should then be able to access the site via HTTPS.
+Once that's working, install certbot onto
+ your server. Run it as root, and when prompted pick your domain name from the list. After a few seconds, it should
+ successfully provision a certificate and modify your nginx config files automatically. You should then be able to
+ access the site via HTTPS.
+
{% end %}
diff --git a/templates/help/usage/running.html b/templates/help/usage/running.html
index 012be71..d8a2441 100644
--- a/templates/help/usage/running.html
+++ b/templates/help/usage/running.html
@@ -1,13 +1,13 @@
{% extends "../help_page.html" %}
{% block help_content %}
-Running your own copy
-If you want to run a copy of Spothole with different configuration settings than the main instance, you can download it
-and run it on your own local machine or server.
-You will require Python version 3.10 or later. If you encounter an error about gdal-config during the following
-process, you will also need libgdal-dev installed.
-To download and set up Spothole on a Debian server, run the following commands. Other operating systems will likely be
-similar.
+Running your own Server
+If you want to run a copy of Spothole with different configuration settings than the main instance, you can download
+ it and run it on your own local machine or server.
+You will require Python version 3.10 or later. If you encounter an error about gdal-config during the
+ following process, you will also need libgdal-dev installed.
+To download and set up Spothole on a Debian server, run the following commands. Other operating systems will likely
+ be similar.
git clone ssh://git@git.ianrenton.com/ian/spothole.git
cd spothole
python3 -m venv ./.venv
@@ -16,29 +16,29 @@ pip install -r requirements.txt
deactivate
cp config-example.yml config.yml
-Then edit config.yml in your text editor of choice to set up the software as you like it. Mostly, this will involve
-enabling or disabling the various providers of spot and alert data.
+Then edit config.yml in your text editor of choice to set up the software as you like it. Mostly, this
+ will involve enabling or disabling the various providers of spot and alert data.
By default, all outdoor programme providers are enabled, as is one cluster node and the NG3K DXpedition data. The RBN
-spot providers are turned off by default due to the volume of traffic from CW/RTTY/FT8 skimmers, and the APRS and Packet
-spot providers are off by default on the assumption that Spothole users want a spot with a human at the other end of it,
-but all can be easily re-enabled.
+ spot providers are turned off by default due to the volume of traffic from CW/RTTY/FT8 skimmers, and the APRS and
+ Packet spot providers are off by default on the assumption that Spothole users want a spot with a human at the other
+ end of it, but all can be easily re-enabled.
Other parameters you will want to update include the base URL to your instance, and whether you want to serve a full
-web-based DX cluster interface or just the API endpoints for client software to use.
-config.yml has an entry for a Clublog API key. If provided, this will allow Spothole to retrieve some more information
-about DX spots. The software will work just fine without it, but you may find a few country flags etc. are less accurate
-or missing. Clublog API keys are free, but you'll need to get your own by submitting a helpdesk ticket and explaining
-what you'll use it for. The admin team are happy with the rate of requests made by my Spothole server, so unless you
-change the source code of yours to radically increase the rate of querying Clublog, I'm sure they will be fine with your
-server too.
+ web-based DX cluster interface or just the API endpoints for client software to use.
+config.yml has an entry for a Clublog API key. If provided, this will allow Spothole to retrieve some
+ more information about DX spots. The software will work just fine without it, but you may find a few country flags
+ etc. are less accurate or missing. Clublog API keys are free, but you'll need to get your own by submitting a
+ helpdesk ticket and explaining what you'll use it for. The admin team are happy with the rate of requests made by my
+ Spothole server, so unless you change the source code of yours to radically increase the rate of querying Clublog,
+ I'm sure they will be fine with your server too.
Once you're happy with the content of config.yml, you can proceed to running the software.
To run the software this time and any future times you want to run it directly from the command line:
source .venv/bin/activate
python3 spothole.py
The software can take a few seconds to start up, particularly if it's been run previously and has a large amount of
-cache data to sort through. This is normal, don't panic! Once you see You can access your copy of Spothole at
-http://localhost:8080 in the log, your server is good to go.
-If you see some errors on startup, check your configuration, e.g. in case you have specified a port for the web server
-that is already in use by something else.
+ cache data to sort through. This is normal, don't panic! Once you see You can access your copy of Spothole at
+ http://localhost:8080 in the log, your server is good to go.
+If you see some errors on startup, check your configuration, e.g. in case you have specified a port for the web
+ server that is already in use by something else.
{% end %}
diff --git a/templates/help/usage/systemd.html b/templates/help/usage/systemd.html
index f1d5e83..92d4d6e 100644
--- a/templates/help/usage/systemd.html
+++ b/templates/help/usage/systemd.html
@@ -1,12 +1,12 @@
{% extends "../help_page.html" %}
{% block help_content %}
-systemd configuration
-If you want Spothole to run automatically on startup on a Linux distribution that uses systemd, follow the
-instructions here. For distros that don't use systemd, or Windows/OSX/etc., you can find generic instructions for your
-OS online.
-Create a file at /etc/systemd/system/spothole.service. Give it the following content, adjusting for the user you want
-to run it as and the directory in which you have installed it:
+systemd Configuration
+If you want Spothole to run automatically on startup on a Linux distribution that uses systemd, follow
+ the instructions here. For distros that don't use systemd, or Windows/OSX/etc., you can find generic
+ instructions for your OS online.
+Create a file at /etc/systemd/system/spothole.service. Give it the following content, adjusting for the
+ user you want to run it as and the directory in which you have installed it:
[Unit]
Description=Spothole
After=syslog.target network.target
diff --git a/templates/help/usage/telnet.html b/templates/help/usage/telnet.html
new file mode 100644
index 0000000..e11235e
--- /dev/null
+++ b/templates/help/usage/telnet.html
@@ -0,0 +1,22 @@
+{% extends "../help_page.html" %}
+{% block help_content %}
+
+Using the Telnet Server
+{% if telnet_server_enabled %}
+As well as a web interface and an HTTP API, Spothole offers a telnet server. This can be used to integrate Spothole's
+ data into a traditional desktop logging program. The data Spothole produces is compatible with DXSpider, and
+ therefore many loggers should accept it with no problems.
+This is a relatively new feature however, so if you run into problems, please do let me know.
+The one caveat with the Spothole telnet server is that it does not support any commands, other than exit.
+ You cannot therefore issue commands to retrieve past entries, set up filters, etc. If you need to filter the data,
+ many desktop logging programs support this client-side, so hopefully this is not too big of an obstacle.
+
+To access Spothole via telnet, set up your logger with the server address {{ telnet_server_address }}
+ and port {{ telnet_server_port }}. You can also access it from a terminal with telnet {{
+ telnet_server_address }} {{ telnet_server_port }}
+{% else %}
+The telnet server on this instance of Spothole is disabled. If you need telnet access, please use a different
+ Spothole server, or run your own.
+{% end %}
+
+{% end %}
diff --git a/templates/help/using.html b/templates/help/using.html
deleted file mode 100644
index 9d385ad..0000000
--- a/templates/help/using.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{% extends "help_page.html" %}
-{% block help_content %}
-
-How to Use Spothole
- There are a number of different ways to use Spothole, depending on what you want to do with it and your level of
- technical skill:
-
- - You can use it on the web, like you are (probably) doing right now. This is how most people use it,
- to look up spots and alerts, and make interesting QSOs.
-
- - If you are using an Android or iOS device, you can "install" it on your device. Spothole is a
- Progressive Web App, meaning it's not delivered through app stores, but if you open the page on Chrome
- (Android) or Safari (iOS) there will be an option in the menu to install it. It will then appear in your
- main app menu.
-
- - You can embed the web interface in another website to show its spots in a custom dashboard or the
- like. The usage is explained in more detail in the README file.
-
- {% if telnet_server_enabled %}
- - You can use it as a traditional telnet-based source of spots, similar to DXSpider and other software, in
- your desktop logging application. To do this, set up your logger with the server address
-
{{ telnet_server_address }} and port {{ telnet_server_port }}. You can also access
- it from a terminal with telnet {{ telnet_server_address }} {{ telnet_server_port }}.
-
- {% end %}
- - You can write your own client using the Spothole API, using the main Spothole instance to provide
- data, and do whatever you like with it. The help section contains guidance on how to do this, and the full
- API docs can be found here. You can also find reference implementations in the form
- of Spothole's own web-based front end, plus my other two tools built on Spothole: Field Spotter and the QSO
- Map Tool.
-
- - If you want to run your own version of Spothole so you can customise the configuration, such as
- enabling sources that I disable on the main instance, you can do that too. The README contains not only
- advice on how to set up Spothole but how to get it auto-starting with systemd, using an nginx reverse proxy,
- and setting up HTTPS support with certbot.
-
- - Finally, you can of course download the source code and develop Spothole to meet your needs. Whether
- you contribute your changes back to the main repository is up to you. As usual, the README file contains
- some advice on the structure of the repository, and how to get started writing your own spot provider.
-
-
-
-{% end %}
diff --git a/templates/map.html b/templates/map.html
index e4f92fd..900f605 100644
--- a/templates/map.html
+++ b/templates/map.html
@@ -113,8 +113,8 @@
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
-
-
+
+
diff --git a/templates/spots.html b/templates/spots.html
index e1aa4ce..f274e9c 100644
--- a/templates/spots.html
+++ b/templates/spots.html
@@ -125,8 +125,8 @@