Skip to content

Modernism-in-Architecture/MIA-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MIA-utils: utilities for maintenance of MIA

building-trigger

A script to request all buildings together with their image URLs from the MIA API. This helps us (until we come up with a better solution ;)) to pre-generate thumbnails on the image server which otherwise would be created during the first display of the building in the apps and could cause a timeout error.

Usage

Setup a virtual env and install requirements

$ python -m venv env
$ source env/bin/activate
$(env) cd building-trigger/
$(env) pip install -r requirements.txt

You will need to use an API token stored in a token.txt file.

$(env) cd building-trigger/
$(env) echo 'Your API token' > token.txt

Call the script with the number of buildings whose images you wish to pre-generate.

$(env) python trigger.py 10

About

utilities for maintenance of MIA

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages