This application allows the user to convert XLSX (Microsoft Excel) files to CSV (Comma-separated values) file format. The application runs as a web application using python as the primary language to run the back-end of the app. Django framework used to organize the structure of the application. Set-up instructions on how to install the required libraries can be found in the installation section. The app will display a home page that shows a button the user can click to upload an XLSX file to be converted. When the user clicks on the convert button, the app will validate the input file and will show a message with any problems that the user might have. After validating the user input, the app will read the file and convert it to a pandas data frame. Then the app will save the data frame as a CSV file and render a the home page with download link. A list of commonly used resources that I find helpful are listed in the acknowledgements section.
This project was built using the following libraries and frameworks.
These are the set-up instructions to run the application locally. You can access the app live demo here.
The app requires an installation of python 3. You can download python 3.9.2 from python3.9. Run the following command to check if you have python installed in your machine.
py -V
-
Unzip the project files for windows
-
Navigate to the project folder and launch Command Prompt
-
Create a new virtual environment
py -m venv env
-
Activate the virtual environment
env\Scripts\activate
-
Install the app requirements
py -m pip install -r requirements.txt
-
Run the server
py manage.py runserver
-
Access the app via a browser at https://127.0.0.1:8000/
The app requires an installation pipenv on you machine. If you don't have pipenv installed, run the following commnad.
pip install pipenv
Note: You might need to prefix "sudo" to commnad if you run into permission issues.
-
Unzip the project files fo linux
-
Navigate to the project folder and launch terminal
-
Create a new virtual environment and install packages from Pipfile
pipenv install
-
Activate the virtual environment
pipenv shell
-
Run the server
python manage.py runserver
-
Access the app via a browser at https://127.0.0.1:8000/
-
Do steps 1-5 from Installation for linux section
-
Build docker image
sudo docker build -t parser_app -f Dockerfile .
-
Check to make sure the image has been built
sudo docker images
-
Run the image
sudo docker run -it -p 8888:8888 parser_app
-
Access the app via a browser at https://0.0.0.0:8000
- Note requirement.txt have been moved to src directory in the zip file
main_folder/
├── README.md # Documentation of the project
├── requirements.txt # contains name and version of libraries used by the name
└── src
├── db.sqlite3 # not used in this app
├── images
│ └── screenshot.jpg # screenshot of the app
├── manage.py # main module to run the app
├── media # used to store output files
├── parser_app
│ ├── admin.py
│ ├── apps.py
│ ├── __init__.py
│ ├── models.py
│ ├── static # contains CSS and website icon
│ │ └── parser_app
│ │ ├── favicon.ico
│ │ └── style.css
│ ├── templates # contains HTML pages for the app
│ │ └── parser_app
│ │ ├── base.html
│ │ └── upload.html
│ ├── tests.py
│ └── views.py # this file handle get and post requests for the app
└── parser_project
├── asgi.py
├── __init__.py
├── settings.py
├── urls.py
└── wsgi.py
Alhaitham Al Jabri - My website