The Scary Movie website is a CLI developed with Python language. The interface is straightforward to interact with. The site is about a list of some available horror movies where the user must select which movie he/she will book to watch.
View the live Website on Github Pages Please note: To open any links in this document in a new browser tab, please press CTRL + Click.
- Initially, I used Flowchart to organise the structure of the logic. The flowchart shows the steps as boxes of various kinds, and their order by connecting the boxes with arrows. A flowchart is a type of diagram that represents a workflow or process.
- The colours used in this CLI are standard colours from the Heroku website.
- The user will greeted with the name of the cinema with a welcome message. The user can choose whether to see our list of movies or change their mind and leave the platform. The option to view the list of movies is to enter Y or N to exit. I made sure to capture also a smaller letter if the user types in lowercase.
- If the user decides not to book the movie, he/she must exit the platform by typing N.
- If the user enters a invalid input an error message shows up and he will be asked to enter either Y or N.
- If the user decides to book the movie, a list of 8 horror films will be printed and displayed.
- If the user wants to book a movie, he/she is asked to enter a number between 1 and 8 to choose the desired title. Note: The user should read a guide explaining how to select the movie before their choice.
- If the user has decided on the movie, he/she must fill in its details. The following details are name, last name and phone number.
- If the user fills in the incorrect data, he/she will have to fill it in again. Note: an error message will be displayed.
- If the user enters an invalid input he/she will be asked to start again from the top. Note: an error message will be displayed.
- If the user enters an invalid input he/she will be asked to start again from the top. Note: an error message will be displayed.
- If the user enters an invalid input he/she will be asked to make sure to put the right numbers. Note: an error message will be displayed.
- Once the user has confirmed their details, at this stage, the user is being thanked for supporting their local cinema, and a small receipt will be printed. On this receipt, the user will find the address of the cinema, the title and the price of the movie he has booked and the date and time.
- If the user wants to book another movie, he must select 1, otherwise select any other key.
- If he/she enters 1 the programme starts again from the beginning.
- If he/she enters any other key, it will display a goodbye message.
- Data reported by users will be stored in a spreadsheet created by Google Sheet.
- To allow the user to enter the email and receive confirmation via email.
- To allow the user to print the PDF confirmation booking.
- Gspread - API for Google Sheets. Open a spreadsheet by title, key or url. Read, write, and format cell ranges.
- Datetime - The datetime module supplies classes for manipulating dates and times.
- Pyfiglet - It takes ASCII text and renders it in ASCII art fonts.
- Sys - This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter.
- Time - Time access and conversions. This module provides various time-related functions.
- The programme has been tested on Google Chrome, Firefox and Safari without any issues. Due to the nature of the programme, it is not suitable for mobile phones and smaller devices.
- At the moment, the time printed on the receipt is UTC-time. As it doesn't affect the functionality of the program and is solely for aesthetic purposes (the receipt) I decided to leave it for now.
- No errors were found during the final check.
-
The site was deployed to Heroku pages. The steps to deploy are as follows:
- Log in Heroku.
- Click 'New' and select 'Create new app'
- Choose a name for the app, region and click on 'Create app'.
- Only 'Deploy' and 'Settings' are relevant from the menu section. Starting with the 'Settings' first.
- Now Buildpacks need to be added. They install future dependencies that are needed outside of the requirements file. The first is Python and the second is node.js. Python needs to be selected first and then node.js. Save this selection.
- Now the 'Deploy' section needs to be selected from the menu and connect it to github.
- Enter the name of the repository we want to connect it with and click 'Connect'
- The choice appears now to either deploy using automatic deploys or manual deployment, which deploys the current state of the branch.
- Click deploy branch.
-
How to run the program. The steps to run the program are as follow:
-
To start the program again, the user must return to the beginning where it says "RUN PROGRAM" and click with the right mouse button or refresh the page.
-
To run a backend Python file, type python3 app.py, if your Python file is named app.py of course.
The live link can be found here - The Scary Movie