Skip to content

Task Manager automates tasks with: Python, GitHub Actions, AWS S3

Notifications You must be signed in to change notification settings

LuciaHeredia/TaskManagerApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ Task Manager

Automates your tasks with Python, GitHub Actions, and AWS S3

"Task manager" is an automation tool that manages your tasks, exports them as a PDF, and uploads the report to an AWS S3 bucket every day at a scheduled time using GitHub Actions.

You must clone this project using the web URL and save it in your own Github repository for the GitHub Actions to work.


🧩 Features:

βœ… Add Tasks – Store tasks with due dates
βœ… List Tasks – Show pending and completed tasks
βœ… Complete Tasks – Mark tasks as done
βœ… Delete Tasks – Remove tasks when no longer needed
βœ… Data Persistence – Save tasks in a JSON file
βœ… Web UI - For visualization and live updates via page reload
βœ… PDF Export – Automatically export a PDF and uploads it to an AWS S3 bucket at a specific time

πŸ“ Folders Structure:

TaskManagerApp
│── .github/
β”‚   └── workflow/
β”‚       └── export-and-push.yml     # Export PDF and upload to a S3 bucket
└── task_manager/
    │── app.py                      # Main Flask app
    │── export_tasks.py             # Export tasks as PDF
    │── upload_to_s3.py             # Upload PDF to a S3 bucket
    │── requirements.txt            # Requirements file
    │── reports/
    β”‚   └── tasks_report.pdf        # PDF tasks report
    │── routes/
    β”‚   └── task_routes.py          # Task-related routes
    │── utils/
    β”‚   └── task_manager.py         # Task loading & saving logic
    │── templates/
    β”‚   └── index.html              # HTML for visualization
    │── static/
    β”‚   └── style.css               # CSS style
    └── tasks.json                  # Stores tasks

🧠 Logic Flow:

  1. At e.g. 00:00 UTC daily
  2. GitHub Actions pulls the latest version of your repository
  3. Runs export_tasks.py β†’ generates tasks_report_DATE.pdf
  4. Runs upload_pdf_to_s3.py β†’ uploads the PDF to your AWS S3 bucket

πŸ•ΉοΈ Manual test:

  1. Push your latest tasks.json to GitHub
  2. Go to GitHub β†’ "Actions tab" β†’ "Export Tasks and Upload to S3"
  3. Click β€œRun workflow”, it will run the full pipeline and upload the PDF

πŸ“¦ Requirements:

  1. Create an AWS S3 Bucket:
    • Go to "AWS S3 Console" β†’ "Create bucket"
    • Fill Name(e.g. tasks-pdf-storage), Region and uncheck Block all public access only if you want public files
    • Click "Create bucket"
  2. Create an IAM User for uploading:
    • Go to "IAM" β†’ "Users"
    • Add user: tasks-pdf-bot
    • Attach policy: Use AmazonS3FullAccess (for testing) Or create a custom policy for limited access
    • Click "Create user"
  3. Create Access key for new user:
    • Click the user you created β†’ "Security credentials" β†’ "Access keys" β†’ "Create Access key"
    • Choose "Third-party service" β†’ Next β†’ "Create access key"
    • Save the Access Key ID and Secret Access Key
  4. Add GitHub Secrets in your repository :
    • Go to your "GitHub" repository β†’ "Settings" β†’ "Secrets" β†’ "Actions"
    • Click "New repository secret"
    • Add:
      • AWS_ACCESS_KEY_ID : Your Access Key ID
      • AWS_SECRET_ACCESS_KEY : Your Secret Access Key
      • AWS_REGION : e.g. us-east-2
      • S3_BUCKET_NAME : e.g. tasks-pdf-storage

πŸ’» CLI Steps:

Change schedule time in workflow export-and-push.yml before you start.

1️⃣ Clone this project using the web URL and also save it in your own Github repository.
2️⃣ Run: pip install -r task_manager/requirements.txt
3️⃣ Start the server with: python3 task_manager/app.py