Git Product home page Git Product logo

blahaj-finder's Introduction

Blåhaj Finder

Blåhaj Finder is a program that finds the nearest IKEA store(s) based on provided location(s) and displays the availability of shonks at those stores(s).

This program currently only searches IKEA stores in the US (although any location in the world can be passed in and the program can still find the nearest American IKEA store(s) to that location).

I made this as my final project in AP Computer Science A (that's why I had to use Java ;~;) and I will probably never update this again. I don't expect anyone to actually use this, but if you do somehow find this, I hope this helps you find a soft and cuddly emotional support blåhaj of your own <3

Installation

You can either run the program in the browser or install the program to your local machine. To build the program from source code or run it on your local machine, you will need the Java Development Kit (JDK).

Browser

Fork this repository to run it in the browser.

Local

Download

Download the blahaj-finder.jar file from the latest (and probably only) release from the releases tab.

Building

First, clone the repository.

git clone https://github.com/Tsundoiii/blahaj-finder.git
cd blahaj-finder

Then, use the Gradle Wrapper to build the program as a JAR file.

Windows:

.\gradlew.bat jar

Linux/MacOS:

./gradlew jar

The blahaj-finder.jar file will be located in the build/libs directory.

Running

Browser

Run the BlahajFinder.java file in the src/main/java/BlahajFinder directory (ignore the Main.java file). To change the Options, edit the values of "args" in the launch.json file located in the .vscode directory.

Local

Run the program using Java.

java -jar <path to JAR file> <options>

Options

Options are passed as command line arguments and can be passed in any order. Although it is technically possible to run the program without options, you will probably want to pass options to the program.

There are two types of options: location and display.

Location

These options determine what location the program will use to search for IKEA stores.

  • -c/--coordinates <coordinates>: Coordinates to use to determine nearest IKEA store in demical degrees. Set to 0, 0 (0°N 0°E) if no coordinates are passed.
  • -s/--state <state(s)>: Two-letter abbreviation of state(s) to search for stores in. Only IKEA stores located in specified state(s) will be displayed. IKEA stores in all states will be displayed if no state(s) are passed.

Display

These options determine what information the program will display.

  • -n/--number-of-stores <number>: Number of stores to display. Set to 1 if no number is passed.
  • -a/--address: Display address of store(s). Address will not be displayed if not passed.
  • -o/--opening-hours: Display opening hours of store(s) and whether the store is current open or not. Opening hours will not be displayed if not passed.

See the Examples for detailed examples of usage.

Examples

No Options

Running the program with no options gives this output (availability of shonks at the closest IKEA store to the default coordinates of 0°N 0°E)

image

If you don't live at 0°N, 0°E (which you probably don't considering it's in the middle of the ocean), you will probably want to pass some location options.

Location Options

Let's say you're at the Georgia Aquarium and you want to know how many frens you can get the sharks there :>. The Georgia Aquarium is at 33°45'48.1"N 84°23'42.7"W, which in demical degrees is 33.763354, -84.395189. You can get decimal degrees by right-clicking on a place in Google Maps. You can pass the -c option to tell the program to search for the nearest IKEA store to those coordinates (remember to remove the space after the comma in the coordinates!).

image

However, let's say you're going down to Florida (I'm not sure why you or anyone else would want to go there, especially if you're the type of person to like blåhajs, but whatever) and you want to know which IKEA store in Florida is closest to your current location. You can pass the -s option with the state's two-letter abbreviation (FL) to limit the result to only the closest store in Florida.

image

You can search multiple states by separating them with commas (so you're not stuck with just going to Florida (ugh)). In this case, it would search for the closest store which is located in either Florida or North Carolina.

image

Lucky for you, the nearest one is not in Florida!

Display Options

To display the 3 closest rather than just the closest, you can pass the -n option to tell the program the (maximum) number of stores to display

image

And to display the addresses of each store, you can pass the -a option

image

And to display the opening hours of each store, you can pass the -o option

image

A star by the current day of the week will indicate whether a store is currently open (green) or closed (red).

blahaj-finder's People

Contributors

tsundoiii avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.