Skip to content

avaritech/itsfullofmars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ItsFullOfMars

ItsFullOfMars.ps1 connects to NASA's API to download photos from a given list of dates from each of the Mars rovers, then generates an HTML file compiled with each of those files. The HTML file is rewritten each time the script is run. Image files are also overwritten if queried twice.

Requirements

  • Powershell v5 or later
    • note: the script may run with earlier versions but is not verified or tested on earlier versions
  • Windows 7 SP1, windows server 2008 or later
  • executionpolicy must be set to allow the script to run
  • write access to the specified output directory
  • storage for images on said directory
  • a correctly formatted list of dates to download images
  • an API key for accessing NASA's API. Get one here: https://api.nasa.gov/index.html#apply-for-an-api-key Keep it secret. Keep it safe.

Instructions

Download the script and run it with the following command:

ItsFullOfMars.ps1 -inputFile [inputFileName] -outputDir [outputDirectoryName] -APIKey [assignedAPIKeyfromNASA]

Default Values

  • inputFile = "dates.txt"
  • outputDir = "images"

Note: a sample dates.txt file is included in this repository to show formatting and error handling of an invalid date

Questions/comments/concerns? contact the author Charles Smith : trey@avari.tech

Building and Running in Docker:

docker build -t [buildname] --build-arg NASAKEY=[API key] .

docker run -it [buildname]:latest

The script will run by default in the container

KNOWN ISSUES

Docker server core image does not get headers for counting the queries remaining, has to do with invoke-webrequest

Docker server core image also does not have a browser to open the generated HTML file

About

Demo: [Powershell][REST API][Docker]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors