rkoshy / invoicer

Generate invoices from Toggl data and Go templates.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invoicer

Generate invoices from Toggl data.

Quick Start

  • Run make to build (requires Go).
  • Log in to Toggl, and view your profile settings. Copy your "API token" at the bottom to a new file ~/.config/invoicer/token.txt in your home directory.
  • Run ./bin/invoicer without arguments to get a list of workspace and client IDs.
  • Re-run ./bin/invoicer -WorkspaceID=XX -ClientID=XX, with the desired workspace and client IDs.
  • You'll now have a invoice.tex file of last month's data to tweak.

Configuration

invoicer supports the following options:

  • -WorkspaceID - REQUIRED The workspace ID to report on. Run invoicer without arguments to list available workspaces.
  • -ClientID - REQUIRED The client ID to report on. Run invoicer without arguments to list available workspaces.
  • -TokenFile - Override the default file to read for your Toggl API token.
  • -Template - Specify the input template file.
  • -Output - Specify the output invoice file.
  • -Month - The month to report on. Format is "YYYY-MM". Defaults to the previous month.
  • -Rate - The rate to bill at.

Templates

The invoice template can be customized with the -Template flag. Templates are Go templates with the following functions available:

  • time - Reports a time as "YYYY-MM-DD"
  • texDuration - Converts a duration to some number of hours.
  • texEscape - Escapes "&" symbols for use in LaTeX tables.
  • texCash - Formats a float as a dollar amount with an escaped $.

About

Generate invoices from Toggl data and Go templates.


Languages

Language:Go 52.6%Language:Smarty 43.9%Language:Makefile 3.5%