It's like git, but instead of adding files, you add toppings. Commit, push, and your order is placed
Winner of the "Best Developer Tool" category at nwHacks 2016.
Go check out the demo on YouTube
- Begin by downloading gitpizza.py (you can download it directly or clone the repository with
git clone https://github.com/Microsquad/gitpizza.git) - Ensure you have write permissions in the directory which
gitpizza.pyis saved, as it creates a shelf for persistence between runs (in a folder.gitpizza-shelfif you want to remove it later) - Initialize a new order with
python gitpizza.py init - Try some of the other commands below!
gitpizza init Initialize a new order.
gitpizza reset Remove an order and return gitpizza to its initial state.
gitpizza add Print a list of available pizza toppings.
gitpizza add [--left|--right|--both] <topping> Add a topping to the pizza. Provide either --left, --right or --both (default) to add the topping to a specific side.
gitpizza rm [--left|--right|--both] <topping> Remove a topping from the pizza. Provide either --left, --right or --both (default) to remove the topping only from a specific side.
gitpizza merge Add any toppings which are missing from the left side of the pizza to the right and vice versa.
gitpizza revert Under a merge, so long as the pizza has not been altered since it was merged.
gitpizza checkout -b <branch-name> Add a new pizza to the order.
gitpizza checkout <branch-name> Return to editing a certain pizza in the order.
gitpizza branch List the pizzas in the order, and highlight the current branch.
gitpizza branch --delete <branch-name> Remove a branch (pizza) from the order.
gitpizza mv [size|sauce|base] <option> Update a property of the pizza.
gitpizza config Lists the available config options.
gitpizza config [--global] <config.name> <value> Updates config.name to be equal to value. Including the option --global also updates the value to be the default for new repositories setup with gitpizza init.
gitpizza diff See the differences between the left and right sides of the current branch (pizza).
gitpizza status See the properties and toppings on the current pizza.
gitpizza clean Reset the current pizza to its initial state. Cannot be undone.
gitpizza commit View the properties of all of the branches in the order and check the order details.
gitpizza push origin master Begins the process of ordering a pizza. This process will stop just before finishing a pizza order, to ensure orders are not accidentally misplaced. Use with care!
Visit the Devpost entry here.
gitpizza was inspired by a late night development push and a bout of hunger. What if you could order a pizza without having to leave the comfort of your terminal?
gitpizza is a CLI based on git which allows you to create a number of pizzas (branches), add toppings (files), configure your address and delivery info, and push your order straight to Pizza Hut.
Python is bread and butter of gitpizza, parsing the provided arguments and using selenium to automatically navigate through the Pizza Hut website.
Pizza Hut's website is mostly created with angular, meaning selenium would retrieve a barebones HTML page and it would later be dynamically populated with JavaScript. But selenium didn't see these changes, so finding elements by ids and such was impossible. That, along with the generic names and lack of ids in general on the website meant that my only solution was the physically move the mouse and click on pixel-perfect positions to add toppings and place the user's order.
Just the amount of commands that gitpizza supports. gitpizza init to start a new order, gitpizza checkout -b new-pizza to create a second pizza, gitpizza add --left pepperoni to add pepperoni to only the left half of your pizza, and gitpizza diff to see the differences between each side of your pizza.