A single page app that uses Toggl to display an estimated finishing time based on fixed working hours written in PHP.
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.
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.
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
To get started on running your own WhenDoYouFinish page check you can meet the requirements below and then follow the installation steps.
The technical requirements for this project are:
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
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
}
With the configuration in place you can start the application making the page available to friends and loved ones.
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
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