Skip to main content

Timewarrior Synchronization client

Project description

Timewarrior Synchronization Client

This repository contains the client of the Timewarrior Sync project.

Installation

Using PIP

To install timewsync in your current Python environment:

pip install timewsync

Using Nix

To install timewsync in your current Nix environment:

nix-env -f default.nix -i

Usage

usage: timewsync [-h] [--version] [-v] [--data-dir DATA_DIR] {generate-key} ...

timewarrior synchronization client

positional arguments:
  {generate-key}
    generate-key       generates a new key pair.

optional arguments:
  -h, --help           show this help message and exit
  --version            print version information
  -v, --verbose        enable debug output
  --data-dir DATA_DIR  the path to the data directory

Data directory

The data directory contains all information required by timewsync for storing configuration options and tracking changes.

The path of the data directory defaults to ~/.timewsync. This can be overridden with the command line flag --data-dir.

Configuration

An example configuration file is available under example.conf. The two available configuration options are the base URL of the server and the client ID.

timewsync reads the configuration from $TIMEWSYNC/timewsync.conf where $TIMEWSYNC represents the path of the data directory (i.e. if the default data directory path is assumed, the configuration file is at ~/.timewsync/timewsync.conf).

Authentification keys

The public-private key pair used for authentification is also stored in the data directory under $TIMEWSYNC/private_key.pem and $TIMEWSYNC/public_key.pem. The key pair can be generated using the generate-keys subcommand.

Hooks

Hooks are special files located in the data directory which will be contextually executed on specific events. They reside in $TIMEWSYNC/hooks (e.g. $TIMEWSYNC/hooks/conflicts-occurred).

Available hooks:

  • conflicts-occurred: Triggered when the server responds with the information that a conflict has been resolved by merging intervals.

Development

Using a virtual environment

To avoid conflicts between packages, you can use a virtual environment. Make sure you have virtualenv installed (first time only):

pip install virtualenv

Create a new virtual environment (first time only):

virtualenv -p python3 venv

To activate your virtual environment run:

# For bash users (usually default)
source venv/bin/activate

# For fish users
source venv/bin/activate.fish

On NixOS, all of the above steps boil down to:

nix-shell

Installing the projects dependencies

To install the project dependencies:

pip install -r requirements-dev.txt

Now you should be good to go :)

Running the client

Once you have all dependencies installed, the client can be started:

python -m timewsync

Acknowledgements

This project was developed during the so-called "Bachelorpraktikum" at TU Darmstadt. It was supervised by the Department of Biology, Computer-aided Synthetic Biology. For more information visit kabisch-lab.de.

This work was supported by the BMBF-funded de.NBI Cloud within the German Network for Bioinformatics Infrastructure (de.NBI) (031A532B, 031A533A, 031A533B, 031A534A, 031A535A, 031A537A, 031A537B, 031A537C, 031A537D, 031A538A).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timewsync-1.1.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

timewsync-1.1-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file timewsync-1.1.tar.gz.

File metadata

  • Download URL: timewsync-1.1.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for timewsync-1.1.tar.gz
Algorithm Hash digest
SHA256 43f79de0ef3aeae042a863ca064643661ccd7fe6b76206197014e2e730d9c258
MD5 3149844d2b64ae1bc53c73db34354640
BLAKE2b-256 8806ab529a0c436373cc4a2f70c5865e4007cd53bf8b413b8586504ed9de1971

See more details on using hashes here.

File details

Details for the file timewsync-1.1-py3-none-any.whl.

File metadata

  • Download URL: timewsync-1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for timewsync-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 66c1946d5df932462e8466f0933fe659792cd2953b42249f6a45442d69b58e72
MD5 57348352c8c36d38d14919e916aac30a
BLAKE2b-256 00b9b0e2840480c56ba12f0685ea69755c54c5e3916bd47462e28955bdfd606a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page