A time recording tool
- Records begin, end and interruption of your working day
- Data storage in human readable json files, one file per month
- Backup data by creating a git repository for the data folder and commit every day
- Supported day types (see json example):
- Normal working day (default for Monday to Friday):
WORK
- Weekend (Saturday and Sunday, detected automatically):
WEEKEND
- Public holiday (won't deduct overtime):
HOLIDAY
- Vacation (won't deduct overtime):
VACATION
- Flex time (will deduct overtime):
FLEX_TIME
- Sickness (won't deduct overtime):
SICK
- Normal working day (default for Monday to Friday):
- Automatic update in the background: just keep it running, and it will record your working time:
- Start of work is detected when
- Program start
- Computer resumes from sleep in the morning
- Detects the end of work when
- Program shutdown
- Computer sleeps for the rest of the day
- You click the "Stop working for today" button
- Interruptions detected when computer sleeps for more than 2 minutes
- Start of work is detected when
- Generates reports for your vacation and monthly working time
- Detects when a second instance is started to avoid data corruption
- Export project working times to pm-smart. See below for details.
- Double click on a table cell (Type, Begin, End, Interruption and Comment) to edit it
- Interruptions must be entered as
01:23
for 1 hour, 23 minutes
- Interruptions must be entered as
- Close the window to minimize in the task bar:
- Won't work on weekends. To force working on a weekend, manually change the day type to
WORK
. - Public holidays can be calculated using plugin holidays-calculator or user can are set the day type to
HOLIDAY
manually. - If you manually change the working time in previous months you might need to adjust the
overtimePreviousMonth
field in the following months by selecting menu itemFile -> Update overtime for all months
. - Assumptions:
- Working time of 8h Monday to Friday
- Mandatory break of 45 minutes after 6 hours of working
- If you want to run WhiteRabbit locally, you need a Java Runtime Environment (JRE) 11 or 16, e.g. AdoptOpenJDK.
- If you want to run WhiteRabbit using WebStart, install OpenWebStart and go to https://whiterabbit.chp1.net.
White Rabbit will search for the configuration file in the following locations:
- The path specified via command line parameter
--config=<path>
time.properties
in the current working directory$HOME/.whiterabbit.properties
If the no config file is found, White Rabbit will create a default file at $HOME/.whiterabbit.properties
, using data directory $HOME/whiterabbit-data
.
The config file has the following content:
data = <path-to-data-dir> # e.g.: ../time-recording-data/
Restart WhiteRabbit after changing the configuration file.
locale
: format of date and time values as an IETF language tag, e.g.de
,de-DE
oren-GB
. Default: system locale.- Note: enter a locale with country code (e.g.
de-DE
) to get correct formatting of date and time, e.g. the calendar week.
- Note: enter a locale with country code (e.g.
current_working_time_per_day
: custom working time per day differing from the default of 8 hours. Format: see Duration.parse(), e.g.PT5H
for 5 hours orPT5H30M
for 5 hours and 30 minutes. This setting will only affect the future.
To use activity tracking, create file projects.json
in your data directory with the following content:
{
"projects": [
{
"projectId": "p1",
"label": "Project 1",
"costCarrier": "P1001"
},
{
"projectId": "p2",
"label": "Project 2",
"costCarrier": "P1002"
},
{
"projectId": "general",
"label": "General",
"costCarrier": "P0001"
},
{
"projectId": "training",
"label": "Training",
"costCarrier": "P0002"
}
]
}
- Download one of the available plugins:
- Copy the downloaded plugin to
$HOME/.whiterabbit/plugins/
.
for plugin in pmsmart holidays-calculator csv demo
do
fileName=$plugin-plugin-signed.jar
curl https://whiterabbit.chp1.net/plugins/$fileName --output $HOME/.whiterabbit/plugins/$fileName
done
WhiteRabbit logs to stdout and to $data/logs/white-rabbit.log
where $data
is the data directory defined in the configuration.
- Microsoft Edge browser with password-less access to pm-smart
-
Create a project configuration as described above. Make sure to use the same IDs for
costCarrier
as in pm-smart. -
Make sure to install the latest version of the pmsmart plugin, see above for details.
-
Add the base URL of your pm-smart server to the configuration file:
pmsmart.baseurl = http://my-pmsmart.example.com
-
In pm-smart open the week view ("Wochenansicht") and add favorites for all projects you use. The export will only work for projects added as favorite.
-
Start the export in WhiteRabbit:
- Select the month that you want to export
- Select menu Reports > Project report
- Click button "Export to pmsmart"
Optionally you can configure pmsmart plugin to skip transfer of a comment for each activity.
For each activity in WhiteRabbit you can enter a comment. By default pmsmart plugin transfers these comment to pm-smart. As the web ui is quite slow, transfer of comments can take a while. If you want to speed-up pm-smart export by skipping transfer of comments you can add an optional property to WhiteRabbit configuration file:
pmsmart.transfer.comments = false
Optionally you can configure pmsmart plugin to clear durations for all other projects, not matching any activity recorded in WhiteRabbit.
For each day pm-smart plugin by default transfers the durations of all activities entered into WhiteRabbit. If pm-smart contains durations for other projects then pm-smart plugin does not overwrite these. This will especially happen if users export their time recordings for a particular month multiple times and change the selection of activities in between. In order to ensure consistent data in pm-smart you can add an optional property to WhiteRabbit configuration file:
pmsmart.clear_other_projects = true
Optionally you can configure holidays-calculator plugin to enable WhiteRabbit to display your personal selection of holidays.
Create a file named holidays.cfg
in your data directory defined in the configuration file of WhiteRabbit.
You can use one of the predefined holiday definition files or you can edit the file and add or remove holidays to your own taste, see the holiday-calculator documentation for a detailed description of the syntax.
Note: WhiteRabbit adds holidays provided by plugins only to new months without any time recordings. As soon as the user adds a time recording for a particular month, WhiteRabbit saves the time recordings for this month including any holidays whether provided by plugins or entered manually. After this point in time for the given month WhiteRabbit uses only on the saved file and will not ask any plugin to update the holidays.
mkdir time-recording-data
git clone https://github.com/itsallcode/white-rabbit.git
cd white-rabbit
# Configure
echo "data = $HOME/time-recording-data/" > $HOME/.whiterabbit.properties
CSVExport plugin supports the export of the current monthly report to
a pre-configured path. The file names are hard coded, and have the format
of YYYY-MM_working_time.csv
.
Please note that all days must have a valid project assigned for
the correct export.
-
Create a project configuration as described above.
-
Make sure to install the latest version of the csv plugin, see above for details.
-
Start the export in WhiteRabbit:
- Select the month that you want to export
- Select menu Reports > Project report
- Click the "Export to csv" button
Currently, you can configure the destination path, separator and flag in WhiteRabbit's configuration file:
csv.destination = ~/working_time_reports
csv.separator = \t
csv.filter_for_weekdays = True
The default values are:
csv.destination = $HOME
csv.separator = ","
csv.filter_for_weekdays = False
mkdir time-recording-data
git clone https://github.com/itsallcode/white-rabbit.git
cd white-rabbit
# Configure
echo "data = $HOME/time-recording-data/" > $HOME/.whiterabbit.properties
# Build WhiteRabbit and install plugins to $HOME/.whiterabbit/plugins/
./gradlew build installPlugins
# To skip unit and ui-tests, run
./gradlew build installPlugins -x test -x uiTest
# Run
java -jar jfxui/build/libs/white-rabbit-fx-<version>[-SNAPSHOT].jar
# Build and run, loading plugins from $HOME/.whiterabbit/plugins/
./gradlew runJfxui
# Build and run including plugins. Useful when developing plugins.
# Make sure to remove unwanted plugins from $HOME/.whiterabbit/plugins/
./gradlew runJfxuiWithPlugins
# Headless (default)
./gradlew check
# Not Headless (don't move mouse while running)
./gradlew check -PuiTestsHeadless=false
./gradlew dependencyUpdates
This will build WhiteRabbit, upload it to the AWS S3 bucket and publish the plugin api to Maven Central.
-
Setup of keystore and AWS configuration.
-
Add the following to your
~/.gradle/gradle.properties
:ossrhUsername=<your maven central username> ossrhPassword=<your maven central passwort> signing.keyId=<gpg key id (last 8 chars)> signing.password=<gpg key password> signing.secretKeyRingFile=<path to secret keyring file>
-
Make sure the Changelog is updated
-
Run the following command:
./gradlew clean build publish closeAndReleaseRepository webstart:publishWebstart --info -PreleaseVersion=<version>
The release will be written to
jfxui/build/libs/white-rabbit-fx-<version>.jar
and the uploaded content will be available at whiterabbit.chp1.net. Snapshots will be available at oss.sonatype.org. -
Create a new release in GitHub and attach the built jar.
-
Close the milestone in GitHub.
-
After some time the release will be available at Maven Central.
This project requires some configuration files with deployment specific information, e.g. domain names that should not be stored in a public git repository. That's why these files are added to .gitignore
. If you want to still keep your configuration under version control you can do so in a private branch (e.g. private-master
) that you push to a private repository only.
When switching from private-master
to the public develop
branch, git will delete the configuration files. To restore them you can run the following command in the project root:
git show private-master:webstart-infrastructure/config.ts > webstart-infrastructure/config.ts \
&& git show private-master:webstart/webstart.properties > webstart/webstart.properties \
&& git show private-master:webstart/keystore.jks > webstart/keystore.jks