A PDF editor application for windows using Tkinter and Flask. (ForgePDF Live is an online edition of the ForgePDF project which contains authentication and APIs. Connects to a Flask backend.)
- Install python virtual environment package if not installed already
pip install virtualenv. - Create a python virtual environment
virtualenv <environment_name>. - Run the virtual environment:
- For windows based systems (environment_name):
source <environment_name>\Scripts\activate.bat. - For Unix based systems (environment_name):
source <environment_name>/bin/activate.
- For windows based systems (environment_name):
- Install dependencies
pip install -r requirements.txt.
- Run the project
py main.py --dev[--dev option must be specified].
- Install pyinstaller
pip install pyinstaller - Create initial build
pyinstaller --onefile -w -i dist/logo.ico. - Update the project build
pyinstaller main.spec.
- The file
ForgePDF.exefile will execute the application. - Package together along the dist folder and you can share the application.
- Run the psql command using a termninal (Eg: Git bash)
- Login to your PSQL account
psql -U <user>. - Enter your password.
- Create the database
CREATE DATABASE forgepdf;. - Connect to that database
\c forgepdf;. - Create the necessary tables.
- Using flask-migrate.
- Run the command
flask db upgrade
- Run the command
- Using manual create table query.
- Enter the following SQL query:
create table "users" ( user_id serial primary key, name varchar(30) not null, email varchar(30) not null, password varchar(30) not null );
- Enter the following SQL query:
- Using flask-migrate.
- Install python virtual environment package if not installed already
pip install virtualenv. - Create a python virtual environment
virtualenv <environment_name>. - Run the virtual environment:
- For windows based systems (environment_name):
source <environment_name>\Scripts\activate.bat. - For Unix based systems (environment_name):
source <environment_name>/bin/activate.
- For windows based systems (environment_name):
- Install dependencies
pip install -r requirements.txt
- Create a copy of .env.example to .env
cp .env.example .env. - For
DATABASE_URL:- In local development, set the variable to
postgresql://<username>:<password>@localhost:5432/forgepdf. - In production development, set the variable to the published URL
- In local development, set the variable to
- For
WEATHER_API_KEY:- In local and production development, set the variable to your OpenWeatherMap API key
- Run the backend
flask run.
- Run the backend
gunicorn app:app.
Note: This command works only on Linux.