Package: toggl-tally
Toggl TallyToggl tally is a rich Python command line interface for tracking progress against your monthly project targets and calculating the daily hours you need to work to hit your goals. Toggl tally connects to theToggl Track API, and supports:Filtering by workspaces, clients or projectsConfigurable invoicing day of monthConfigurable weekly working daysExcluding (and reporting upcoming) public holidays in your configured countryInstallationInstall usingpip:pip install toggl-tallySetupToggl API tokenToggl tally handles connection to theToggl Track API; all you need to do is make your Toggl API token available as an environment variable. Get your Toggl API token from theToggl profile pageand set it as theTOGGL_API_TOKENenvironment variable.ConfigurationToggl tally needs to be configured with your monthly goals and projects. This configuration can be passed either via a YAML file or via command line arguments and options. YAML file configuration is the most streamlined and DRY for daily use.The path to the YAML config file can either be passed as a command-line argument (toggl-tally -c /path/to/config.yaml) or can be detected automatically from the environment variableTOGGL_TALLY_CONFIG.The configurable keys are as below, and a full exampleyaml configis provided with this repo.hours_per_month:160invoice_day:18workspaces:clients:-MegaCorpprojects:-Widget Buildingskip_today:falsetimezone:Africa/Johannesburgworking_days:-MO-TU-WE-TH-FRcountry:ZAexclude_public_holidays:trueAlternatively, all configuration can be passed with command-line arguments to thehourscommand. See the CLI help for detailed information about each argument and option.Toggl data model and filteringerDiagram
    WORKSPACE ||--o{ CLIENT : has
    WORKSPACE ||--o{ PROJECT : has
    WORKSPACE ||--o{ TIME_ENTRY : has
    CLIENT |o--|{ PROJECT : has
    PROJECT |o--o{ TIME_ENTRY : hastoggl_tallyenables filtering by multiple workspace, client or project names. The UNION across all of these entities is taken to determine the final set of time entries. For example, for the filter criteria:workspaces:clients:-MegaCorp-HyperCorpprojects:-Widget Building-Baz refactoringA time entry will be included if it:Belongs to a project linked to the MegaCorp client ORBelongs to a project linked to the HyperCorp client ORBelongs to the Widget Building project ORBelongs to the Baz refactoring projectHours commandThehourscommand is the core command for Toggl tally. It reports:Working days to go before next invoice dateDaily hours needed to hit monthly target by next invoice dateHours worked on relevant projects since last invoiceA monthly progress barThehourscommand has a--verbose(-v) flag, which if enabled also reports:Active workspace, project and client filtersUpcoming public holidays in the working periodDevelopmentTo installtoggl_tallyfor development, run:pipinstall-e'.[dev]'Code for this repository is checked usingpre-commit. After cloning this repository please run the following steps to initialise pre-commit:pre-commitinstall--install-hooksThe following hooks are automatically run when new commits are made:Frompre-commit hooks:end-of-file-fixertrailing-whitespacecheck-yamlcheck-added-large-files (max. 500kb)blackPython code format checkingflake8Python code lintingisortPython code import ordering