Programmers tend to not go out often simply because we're too busy trying to push a new feature to our side projects, or we've been struggling with a bug fix at work. And whenever we do wish to go outside the weather may be unappetizing which may lower our motivation to buy more caffine.
Introducing SIGO, a command line interface with the convenient feature of telling you if you should go outside depending by your location.
Built using go and its flag package alongside with the Weather API
Start by cloning the repository
// HTTPS
git clone https://github.com/bryanmontalvan/sigo.git
// GitHub CLI
gh repo clone bryanmontalvan/sigo
After cloning the repo you you have two options ..
- Run the CLI in a containerized environment (If you do not have Go installed or you do not wish to install Go)
- Building the binary yourself (If you already have Go installed) Note: Option 2 is more tailored for people who wish contribute/develop in a containerized environment
(If you wish to run a containerized version of the CLI click here)
Move into the /src
directory and build the go binary
go build
And that's it for the setup, now you roam free and explore
In the root directory of the project do the following
make docker-dev
You will now find yourself in a isolated containerized development environment where you can code freely without installing Go on your system. This container process is seperate from your own filesystem.
Now check to see if Go has been installed correctly
go version
Head over to Weather API and create an account so you can retrieve your API key.
Now head over to the src/store/
folder, here create a text file called APIKEY.txt
and store your API key within that file
In order to use the SIGO CLI you must move into the src folder cd src
. There you have 3 main commands which all require a ./sigo
prefix
Syntax | Description | Example |
---|---|---|
get | displays inputted city | ./sigo get -city Boston |
add | stores inputted city into local-save | ./sigo add -city Austin |
saved | displays stored city | ./sigo saved |
get:
./sigo get -city <cityname or zipcode>
- Requires the
-city
flag
add:
./sigo add -city <cityname or zipcode>
- Requires the
-city
flag - Its recommended to use your zipcode for better accuracy since multiple countries have similar city names
saved:
./sigo saved
- Requires no flags!!!
(Note: Currently only zipcodes from USA, Canda, and UK work!)
Feel free to leave any suggestion, feedback, or opinion by opening an issue on this repo! Any and all contributions will be greatly appreciated!