Files
spothole/README.md
2025-10-02 10:13:52 +01:00

1.9 KiB

(S)pothole

Work in progress.

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.

Currently supports:

  • DX Clusters
  • POTA
  • WWFF
  • SOTA
  • GMA
  • HEMA
  • UKBOTA
  • Parks n Peaks
  • RBN
  • APRS

Writing your own Providers

(S)pothole is designed to be easily extensible. If you want to write your own provider, simply add a module to the providers 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 "Provider"; if it operates by polling an HTTP Server on a timer, it can instead extend "HTTPProvider" 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 Provider 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 HTTPProvider 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 providers section of config.yml, and your provider should be instantiated on startup.