All Projects → thinkinglabs → toggl-google-sheet

thinkinglabs / toggl-google-sheet

Licence: MIT license
Import Toggl time entries into a Google Sheet

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to toggl-google-sheet

ftgogo
FTGOGO - event-driven architecture demonstration application using edat
Stars: ✭ 82 (+382.35%)
Mutual labels:  hexagonal-architecture, ports-and-adapters
ktor-hexagonal-multimodule
Template project to build ktor-based multi-module web service with Kotlin using Hexagonal architecture
Stars: ✭ 30 (+76.47%)
Mutual labels:  hexagonal-architecture, ports-and-adapters
archunit-junit5-kotlin
Generic Architecture Tests written in Kotlin using ArchUnit and Junit5
Stars: ✭ 22 (+29.41%)
Mutual labels:  hexagonal-architecture, ports-and-adapters
DDD
Domain-Driven Design example
Stars: ✭ 116 (+582.35%)
Mutual labels:  hexagonal-architecture, ports-and-adapters
kingdom-python-server
Modular, cohesive, transparent and fast web server template
Stars: ✭ 20 (+17.65%)
Mutual labels:  hexagonal-architecture, ports-and-adapters
Library
This is a project of a library, driven by real business requirements. We use techniques strongly connected with Domain Driven Design, Behavior-Driven Development, Event Storming, User Story Mapping.
Stars: ✭ 2,685 (+15694.12%)
Mutual labels:  hexagonal-architecture, ports-and-adapters
Timesheet-Hero
Small utility to keep track of your time
Stars: ✭ 31 (+82.35%)
Mutual labels:  timesheet
fastapi-csv
🏗️ Create APIs from CSV files within seconds, using fastapi
Stars: ✭ 46 (+170.59%)
Mutual labels:  google-sheets
financial
POC de uma aplicação de domínio financeiro.
Stars: ✭ 62 (+264.71%)
Mutual labels:  hexagonal-architecture
Gson
Google sheets as a api service
Stars: ✭ 38 (+123.53%)
Mutual labels:  google-sheets
csvtogs
Take a CSV file and create a Google Spreadsheet with the contents
Stars: ✭ 15 (-11.76%)
Mutual labels:  google-sheets
org-toggl-py
Create Toggl entries from Emacs org-mode CLOCK entries
Stars: ✭ 41 (+141.18%)
Mutual labels:  toggl
educational-platform
Modular Monolith Java application with DDD
Stars: ✭ 124 (+629.41%)
Mutual labels:  hexagonal-architecture
poem-hexagon
A simple example for a hexagonal architecture.
Stars: ✭ 33 (+94.12%)
Mutual labels:  hexagonal-architecture
react-google-sheet
Pulling data from Google Sheets with React components
Stars: ✭ 24 (+41.18%)
Mutual labels:  google-sheets
BakingSheet
Easy datasheet management for C# and Unity. Supports Excel, Google Sheet, JSON and CSV format.
Stars: ✭ 144 (+747.06%)
Mutual labels:  google-sheets
Liquid-Application-Framework
Liquid Application Framework documentation, useful links and sample project
Stars: ✭ 467 (+2647.06%)
Mutual labels:  hexagonal-architecture
ktor-hexagonal-benchmark
a experimental ktor application using hexagonal architecture
Stars: ✭ 32 (+88.24%)
Mutual labels:  hexagonal-architecture
hex-example
Little API to demonstrate various microservice design principles and technologies
Stars: ✭ 131 (+670.59%)
Mutual labels:  hexagonal-architecture
cap-table-tool
Cap Table and Exit Waterfall Tool, https://foresight.is/cap-table
Stars: ✭ 22 (+29.41%)
Mutual labels:  google-sheets

Toggl Google Sheet Build Status

This Google Apps script imports time entries from Toggl.com into a Google Sheet using their Detailed Report API.

For a given month it aggregates the time entries per day and per customer.

Installation

Simple

Open this Google Sheet and make a copy in your Google Drive account.

From scratch

Create a new Google Sheet.

Create a new script in your newly created Google Sheet and paste the contents of all of the src/*.gs files in their respective script files.

Rename the first sheet as Config.

Add the following information in cell A1 of the Config sheet:

A: Variable B: Value C: Description
1 timesheetDate 01/01/2015 Timesheet Month
2 workspaceId workspaceId Toggl Workspace Id
3 apiToken your toggle api token Toggl API Token

To figure out your workspace_id: go to Team in toggl.com. The number at the end of the URL is the workspace id.

To figure out your api_token: go to your Profile in toggl.com, your API token is at the bottom of the page.

Usage

Re-open your Google Sheet. Now you will have a new menu called "Toggl" with a sub-menu "Get Timesheet for Month".

Fill a date of the month you want to import in cell B1. If you want your timesheet for December 2014, fill the date 01/12/2014 and click Toggl > Get Timesheet for Month.

It also calculates the number of days worked during that month.

Implementation

Google App Scripts only supports EcmaScript 5 because it is powered by Mozilla's Rhina Javascript Interpreter.

toggl-google-sheet is written in ES6 (aka EcmaScript2015). But the codebase still implements classes the old way using functions. That is because of historical reasons. The codebase started in full ES5 mode as a pure hack. Gradually, it got refactored by introducing classes, the hexagonal architecture and DDD concepts.

Webpack and Babel are used to transpile ES6 to ES5.

  • ./src/Code.js : contains the global functions required by Google Apps Script written in ES5.
  • ./src/App.js : entry point for Webpack bundle. Here we can use ES6 modules written in ES6. The bundle is exposed as a global variable app to Code.js.

Since early 2020, Google App Scripts is now supported by the V8 Runtime that powers Chrome and Node.js. But ES6 modules are not yet supported.

Because ES6 modules are not supported, there is still value in transpiling. And, the right now the Google Sheets still use the Rhino powered Google App Scripts.

Run tests

To run the tests:

npm install
npm test

Tests are implemented using Jest.

Build

To transpile the ES6 to ES5 for Google Apps Script:

npm run build

Acknowledgment

koen-github for providing an example on how to use the Toggl API with Google Sheet.

GSmart.in for providing an example of using ES6 and webpack/babel for Google Apps Script. See also Creating a complete web app on Google Apps Script using Google Sheet as database.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].