This is a Flask web application designed to extract metadata from .docx and .pdf files. Users can upload a file, and the application will display its metadata, such as title, author, creation date, and more.
Python 3.xFlaskpython-docxPyPDF2
-
Clone this repository:
git clone [your-repo-link] cd [your-repo-directory] -
Install the required packages:
pip install Flask python-docx PyPDF2
To start the application, run:
python [your-app-file-name].pyReplace [your-app-file-name].py with the name of your Python file.
Once the server is running, you can access the application by navigating to:
http://127.0.0.1:5000/
-
File Upload: Users can upload either a
.docxor.pdffile to extract metadata. -
Metadata Display: After the successful upload and extraction process, the metadata of the file will be displayed to the user.
-
Error Handling: The application handles various scenarios like missing file uploads, unsupported file types, and potential file reading errors.
- Home (
/): The main endpoint. It serves the file upload form on a GET request and handles the file upload and metadata extraction on a POST request.
- Always be cautious when handling file uploads. Ensure that you have the necessary security measures in place if deploying in a production environment.
- This application runs in debug mode (
debug=True) by default. It's recommended to setdebug=Falsewhen deploying to production.
Developed by John D. Cyber @ https://Johndcyber.com