GithubHelp home page GithubHelp logo

eatcheap's Introduction

Eatcheap

Helps you track how many calories and grams of protein you're eating and also tells you how much it's costing you and how efficiently you are getting those calories and grams of protein.

NOTE: THIS REPO HAS BEEN REPLACED! See: https://github.com/robknows/mealplanner for the updated Kdb/Q/J solution.

Build instructions (from scratch):

  1. Go to http://www.jsoftware.com/stable.htm and download J804 for your operating system

  2. Unzip it wherever you like, but remember where obviously, the folder that is unzipped is called your J home

  3. Go to https://github.com/robknows/Eatcheap which is my code. On the right you will see a big gree button which says "Clone or download". Click it and choose "Download zip. There are no viruses, I promise

  4. Unzip it and cut it (as in cut/paste or copy/paste). I'll probably be called "Eatcheap-master" or something"

  5. Go to your J home and find the folder called "projects", which should be empty. Once in the projects folder, paste the Eatcheap-master folder there.

  6. Now go back to J home (1 folder leve up). Probably in the "bin" directory you will find a .exe file called J or Jqt or JTerm or something like that. Double click it

  7. In the navbar at the top (file | edit | view ...etc) under "view", click "editor".

  8. On the left in the tab called "files" you'll see a folder navigator. ".." means the folder 1 level up. Navigate to the projects folder and then into the Eatcheap-master directory.

  9. Find the "eatcheap.ijs" file and double click it to open it in the editor (editor is called JQT)

  10. At the top there is a button that is like a "play" button. Press it.

  11. In the window that you used to open the editor, the little rectangular one with the light brown background, you'll see all the lines of code loaded into the J interpreter.

  12. You can now run the program! Below is usage for the functions

==================================

Available functions:

poundsPerServing x

Where x is a food defined as a list with 5 number elements, representing the £££ per unit (ie cost of box of cornflakes), the number of servings per unit (ie number of bowls of cereal you can get from a box of cornflakes), the protein per serving, the calories per serving and the "food type" which currently has no use... but I will later, to determine the healthiness of meals you know. Carbs+protein+fat+healthyshit=balanced meal.

Example- poundsPerServing rice

Returns the number of pounds you spend per serving of the food. In the above case, rice

Similar usage for caloriesPerPound and proteinPerPound

================================== bowlofcereal x

Equivilant to 'meal milk and x'

Example- bowlofcereal cocopops

Meaning- meal milk and cocopops

================================== sandwich x

Equivilant to 'meal (2 of brownbread) and x'

Example- sandwich peanutbutter

Meaning- meal (2 of brownbread) and peanutbutter

================================== meal x and (n of y) and z

Where x, y and z are

And n is any number, even a decimal if you have maybe half a serving of rice for example cos youre not hungry or whatever.

This function returns the stats (same meaning as the normal food stats). of the meal resulting in combining the ingredients given. The £££ per unit is worked out as the combined price per serving of each ingredient.

Example- meal rice and mince and (2 of pepper)

Meaning- A meal of rice, mince and 2 peppers.

================================== maketable x with y with z

Where x, y and z are string eg they are wrapped with single quotes which are code representing meals.

Example- maketable 'cocopops' with 'cornflakes' with 'alpen' with 'meal brownbread and butter'

Result- A pretty table showing the stats for each of the different breakfast choices next to each other.

==================================

eatcheap's People

Contributors

robmoore-i avatar

Stargazers

The Saba Pilots avatar

Watchers

James Cloos avatar

Forkers

ivanmoore

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.