Skip to content

Terminal based, funcion-heavy and simplistic unit converter for distances, masses, temperatures and time conversions.

License

Notifications You must be signed in to change notification settings

John-JonSteyn/UnitConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Unit Converter - A Terminal-based Unit Converter


Funcion-heavy and simplistic unit converter for distances, masses, temperatures and time conversions.
View Source Code »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. The Basics of the Unit Converter
  4. Roadmap
  5. Contributing
  6. License
  7. Acknowledgments

About The Project

Annoyed with your Canadian cousins' celcius? Frustrated with your British friends refering to distances as miles that aren't "Morales"? Ever tried convert between the metric and imperial systems by hand?

Well now you don't have to. This simple script will do it for you. We've got your back, so that you can go back to the fun life with less measurement politics and less math.

There are many unit converters available on GitHub - probably more than I can count; however, this is mine. Created without guides, nor based on templates - this "bush code", albeit rudamentary and primitave, demonstrates the practicality of functions, elif and the metric system.

Unit Converter supports the following Units of Meassurement:

  1. Distance
  • Kilometer (km)
  • Meter (m)
  • Centimeter (cm)
  • Millimeter (mm)
  • Miles (mi)
  • Yards (yd)
  • Inches (in)
  1. Mass
  • Tonnes (t)
  • Kilogram (kg)
  • Gram (g)
  • Milligram (mm)
  • Pounds (lbs)
  • Stone (st)
  • Ounces (oz)
  1. Temperature
  • Degrees Celcius (C)
  • Kelvin (K)
  • Degrees Farenheit (F)
  • Degrees Rankine (R)
  1. Time
  • Days (d)
  • Hours (hr)
  • Minutes (min)
  • Seconds (sec)
  1. Speed
  • Mile Per Hour (mph)
  • Kilometers Per Hour (kph)
  • Meters Per Second (mps)
  • Knots (kt)

(back to top)

Built With

(back to top)

Getting Started

Setting up Unit Converter on your local machine is as simple as 1, 2, 3. Just follow the steps; 1, 2 and 3.

Prerequisites

You'll need Python 3.8 or higher. Don't worry, it doesn't bite ... often.

How to download the lastest version of Python:

  • Click here to navigate to python's official page.
  • Click on the big, flashy "Download Python [version]" button.
  • Save the executable file.
  • Open the .exe file within the downloaded location, and follow the installation instructions.

Installation

1 Open the terminal / command prompt:

  • On PC: Open Command prompt by pressing start, then typing "cmd" then hit ENTER.
  • On Mac OS: Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
  1. Navigate to the directory you would like to install Unit Converter:
cd [DirectoryPathHere]
  1. Clone the repository by entering the following command into your shell:
    git clone https://github.com/John-JonSteyn/UnitConverter.git

It's that simple! You can run Unit converter with following command:

python unitconverter.py 

(back to top)

The Basics of Unit Converter

Unit Converter Main When you run the script, this message will be displayed. From here we can select which dimention we would like to convert in.

Distance

To select Distance, we'll just type it out:

Distance

Distance Enter Value

Now we select a unit we'd like to convert from, for example:

Meter

Distance Select Next enter the value of our unit, for illustation

273

Distance Output

Now we have our measurement converted and returned to us in each of the units. We are also sent back to the main menu.

Mass

Mass follows the same logic, as can be seen here: Mass

Temperature

As is the case with Temperature: Temperature

Time

And, not surprisingly, Time is no different: Time

Speed

Same with speed. Who would've thought: <Insert Screenshot here>

Quit

You can also quit the program at any time by typing:

Quit

Quit

Roadmap

  • "Kilometre" changed to "Kilometer"
  • Fixed Temperature-function call
  • Revised system exit
  • Add back to top links
  • Remove Case-Sensitivity
  • Improve Output Appearance
  • Add option to utilise acronyms as input

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Acknowledgments

I'd like to thank Nikolai, who not only supported me in my endevour to start loading my projects onto GitHub, but also helped fuzzing and de-bugging my first program.

I'd also like to acknowledge and recommend these resources that made the learning python even simpler than it already is.

(back to top)

About

Terminal based, funcion-heavy and simplistic unit converter for distances, masses, temperatures and time conversions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages