SpeedyLom / WhenDoYouFinish

Use PHP and Toggl to allow others to track your workday.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open in Visual Studio Code php workflow results

WhenDoYouFinish

A single page app that uses Toggl to display an estimated finishing time based on fixed working hours written in PHP.

A large title "When do you finish?" followed by a panel with a grey heading and border displaying the day and date (Monday 8th). In the body of the panel an estimated finishing time (3.58pm) and the time worked in hours and minutes (7 hours and 16 minutes) below. At the bottom of the panel is a progress bar showing the amount of the day worked in a percentage (96%).

If you are working remotely and frequently get the following questions throughout your working day:

When do you finish? How much longer do you have left? What time do you finish?

Then WhenDoYouFinish will allow you to divert that question leaving you to carry on with your work uninterrupted. Simply direct your spouse/child/friend/goldfish at your WhenDoYouFinish page and let them find out for themselves.

How it works?

WhenDoYouFinish uses the entries (recorded and running) from your Toggl account to provide a total amount of time worked, this time worked is compared against a fixed working day length to provide an estimated finish.

What do you need?

In order to be able to run your own WhenDoYouFinish page you'll need a:

  • Free Toggl account (or paid)
  • Machine running PHP 8.0 (or later)
  • Fixed workday length (i.e. 7.5 hours)
  • Knowledge of running commands from a terminal

Getting started

To get started on running your own WhenDoYouFinish page check you can meet the requirements below and then follow the installation steps.

Requirements

The technical requirements for this project are:

Installation

Providing your machine has been set up to meet the technical requirements, the first step is to clone this repository to your machine that will run your page.

git clone https://github.com/SpeedyLom/WhenDoYouFinish.git

Once the project has been cloned then use composer to install any dependencies:

cd WhenDoYouFinish
composer install --no-dev

Configuration

After installing any dependencies copy the configuration.example.json to configuration.json and set your:

  • Toggl API token
  • Environment (production)
  • User agent (your email address)
  • Workday length in minutes (default 7.5 hours)
  • Toggl workspace ID (numbers proceeding /settings/general after following this URL)
{
  "api_token": "123456789ABCDEFG123456789ABCDEFG",
  "environment": "production",
  "user_agent": "your_username@example.com",
  "workday_length_in_minutes": 450,
  "workspace_id": 1234567
}

Running

With the configuration in place you can start the application making the page available to friends and loved ones.

PHP Built-in Server

One of the simplest ways to start your WhenDoYouFinish instance is to use PHP's Built-in web server which can be done from the root of your WhenDoYouFinish/ directory.

php -S 0.0.0.0:8080

Usage

With your instance up and running you can then access the page on port 8080 at your machine's local IP address i.e. http://192.168.0.42:8080.

If you are unsure of your machine's IP address you can use a command like hostname to find it out:

hostname -I

About

Use PHP and Toggl to allow others to track your workday.

License:Mozilla Public License 2.0


Languages

Language:PHP 94.1%Language:HTML 5.5%Language:Dockerfile 0.3%