Python script to fetch configurable images from a map-dots server.
Go to file
2023-08-14 20:51:55 +01:00
.gitignore Add packaged versions to .gitignore 2023-08-14 20:51:55 +01:00
example.conf.toml Init repo 2023-08-14 20:26:26 +01:00
LICENSE Add License 2023-08-14 20:35:21 +01:00
map-dots-fetch.py Rename main.py, fix license block in README 2023-08-14 20:38:25 +01:00
README.md Rename main.py, fix license block in README 2023-08-14 20:38:25 +01:00

map-dots-fetch

A one-shot Python (3.11) script that fetches one or more images from a map-dots server.

Remember that map-dots can be run as a CLI application so if you are not looking to access map-dots images on more than one computer, you are probably best skipping this script and running map-dots locally.

Running

map-dots-fetch uses imports from the standard-library with the exception of requests. You can choose to run it in a venv however it has been written to run in the global environment and should not interfere with any other Python applications that you are running.

map-dots-fetch requires a configuration file, an example of which is provided in this repository. The configuration file must be placed in one of these locations:

Linux systems:

  • ~/.config/map-dots-fetch/conf.toml
  • /etc/map-dots-fetch/conf.toml
  • ./conf.toml In the same folder as map-dots-fetch.py

Windows systems:

  • C:\Users\{user}\map-dots-fetch.toml Alongside your user files
  • ./conf.toml

If the config file exists in more than one place, the first file found will be loaded. Files are checked in the order they appear in the lists.

If no config file is present, the script will exit with an exit code of 1.

License - BSD 1-Clause

Copyright (c) 2023 Frederick Boniface All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.