Skip to content

A Python-based timesheet management app that tracks time entries for projects, stages, and tasks using SQLite. Features a terminal menu for adding entries and viewing timesheets for today, yesterday, or any specified date.

License

Notifications You must be signed in to change notification settings

rfrost-xyz/timesheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timesheet

This is a Python-based timesheet management application that helps you track time entries for different projects, stages and tasks. The script interacts with an SQLite database to store and retrieve time tracking data.

Features

  • Add time entries for specific projects, stages, and tasks.
  • View timesheets for today, yesterday, or any specified date.
  • Interact with the script via a terminal menu for ease of use.

Prerequisites

  • Python 3.x
  • SQLite3

Installation

  1. Clone the repository:
git clone git@github.com:rfrost-xyz/timesheet.git
cd timesheet-management
  1. Install the required libraries using venv or similiar.
pip install -r requirements.txt
  1. Ensure you have an SQLite database and the file is resolved in the connection schema.

Usage

Run the script using the following command:

python ./main.py

You can also directly view the timesheet for a specific date using the command line argument:

main.py --timesheet YYYY-MM-DD

Database Schema

Make sure your SQLite database has the following tables:

client Table

Copy code
CREATE TABLE client (
    clientID INTEGER PRIMARY KEY,
    clientName TEXT NOT NULL
);

project Table

CREATE TABLE project (
    projectId INTEGER PRIMARY KEY,
    projectCode TEXT NOT NULL,
    projectSubCode TEXT,
    projectName TEXT NOT NULL,
    clientId INTEGER,
    FOREIGN KEY (clientId) REFERENCES client (clientID)
);

stage Table

CREATE TABLE stage (
    stageId INTEGER PRIMARY KEY,
    stageName TEXT NOT NULL,
    projectId INTEGER,
    FOREIGN KEY (projectId) REFERENCES project (projectId)
);

task Table

CREATE TABLE task (
    taskId INTEGER PRIMARY KEY,
    taskName TEXT NOT NULL,
    projectId INTEGER,
    stageId INTEGER,
    FOREIGN KEY (projectId) REFERENCES project (projectId),
    FOREIGN KEY (stageId) REFERENCES stage (stageId)
);

time Table

CREATE TABLE time (
    timeId INTEGER PRIMARY KEY,
    userId INTEGER,
    stageId INTEGER,
    taskId INTEGER,
    startTime TEXT NOT NULL,
    endTime TEXT NOT NULL,
    FOREIGN KEY (stageId) REFERENCES stage (stageId),
    FOREIGN KEY (taskId) REFERENCES task (taskId)
);

About

A Python-based timesheet management app that tracks time entries for projects, stages, and tasks using SQLite. Features a terminal menu for adding entries and viewing timesheets for today, yesterday, or any specified date.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages