87 lines
2.5 KiB
Markdown
87 lines
2.5 KiB
Markdown
|
# Time Dispatcher
|
||
|
|
||
|
### Table of contents
|
||
|
<!-- TOC -->
|
||
|
* [Prerequisites](#prerequisites)
|
||
|
* [Installation](#installation)
|
||
|
* [Run the app](#run-the-app)
|
||
|
* [Production](#production)
|
||
|
* [Development](#development)
|
||
|
* [Updating](#updating)
|
||
|
<!-- TOC -->
|
||
|
|
||
|
---
|
||
|
|
||
|
**Time Dispatcher** is a QoL tool to help you track, analyze and allocate your time spent on various projects.
|
||
|
Here is a list of the main features available :
|
||
|
- Import tasks, projects and time imputations from CSV (compatible with [Super Productivity](https://github.com/johannesjo/super-productivity))
|
||
|
- Create parents to group multiple projects
|
||
|
- Track your clock-ins / -outs and/or remote work
|
||
|
- Mark each parent as either productive or not, i.e. whether its projects take a share of the "clocked" time
|
||
|
- Automatically compute the time that should be reported as spent on each productive parent (for example to input in SageX)
|
||
|
- View your monthly working times in a nice table or in a summarized form on the dashboard
|
||
|
|
||
|
## Prerequisites
|
||
|
|
||
|
- Python 3+
|
||
|
|
||
|
## Installation
|
||
|
|
||
|
1. Clone the repository
|
||
|
```shell
|
||
|
git clone https://git.kb28.ch/HEL/TimeDispatcher.git
|
||
|
```
|
||
|
2. Go inside the project directory
|
||
|
```shell
|
||
|
cd TimeDispatcher/
|
||
|
```
|
||
|
3. Install the Python requirements
|
||
|
```shell
|
||
|
pip install -r requirements.txt
|
||
|
```
|
||
|
4. Apply the database migrations
|
||
|
```shell
|
||
|
python manage.py migrate
|
||
|
```
|
||
|
5. Set the appropriate settings in the `.env` file:
|
||
|
1. Copy `.env.template` to `.env`
|
||
|
```shell
|
||
|
cp .env.template .env
|
||
|
```
|
||
|
2. Fill in the settings
|
||
|
- `DJANGO_SECRET_KEY`: The secret key used by Django.
|
||
|
This is a long random string.
|
||
|
For example, it can be generated using Python with
|
||
|
```python
|
||
|
import secrets
|
||
|
secrets.token_urlsafe(64)
|
||
|
```
|
||
|
- `DJANGO_ENV`: Current environment, either `prod` or `dev`
|
||
|
- `DJANGO_HOSTS`: Comma-separated list of allowed hosts used by Django
|
||
|
|
||
|
## Run the app
|
||
|
### Production
|
||
|
1. Start the Uvicorn server
|
||
|
```shell
|
||
|
python main.py
|
||
|
```
|
||
|
2. Open [the app](http://localhost:8000/) in your browser
|
||
|
|
||
|
### Development
|
||
|
1. Start the Django server
|
||
|
```shell
|
||
|
python manage.py runserver
|
||
|
```
|
||
|
2. Open [the app](http://localhost:8000/) in your browser
|
||
|
|
||
|
## Updating
|
||
|
(Before updating to a new version, it is recommended to back up the database file, i.e. `db.sqlite3`)
|
||
|
|
||
|
To update to a new version:
|
||
|
1. Download the new sources
|
||
|
- from the [release page](https://git.kb28.ch/HEL/TimeDispatcher/releases)
|
||
|
- or pull the new version with git
|
||
|
2. Run the database migrations:
|
||
|
```shell
|
||
|
python manage.py migrate
|
||
|
```
|