Coder Social home page Coder Social logo

ts's Introduction

ts

A text-based timesheet parser
...because who has time to open Excel?

This application is intended for use by contractors to track their hours in the simplest, most programmer-friendly way possible; a human-friendly, computer-parseable text file format, one file per contract.

A typical week's entry might look like this:

client_name: SuperCoolStartup LLC
----
2015-11-30  .25 # kickoff email
2015-12-01  10:45a-4:45p # began work on the website
---- # first week, woo!
2015-12-02  8:50a-10a, 12:15p-5:45p, 7:45p-9:30p # built testing fraamework
2015-12-03  10:09p-10:50p # respond to analysis document
2015-12-04  .50, 1:30p-2p, 3:20p-5:20p, 9:40-10:30
==== 

Some things to note:

  • All timesheets begin with Jekyll-style "front matter" to configure invoice-specific settings.
  • ---- tells the parser you want to summarize hours at this point.
  • ==== tells the parser you want to invoice at this point, chronologically.
  • Anything after a # is simply kept as a comment.

ts will parse and canonicalize this into:

client_name: SuperCoolStartup LLC
----

2015-11-30    .25 # kickoff email
2015-12-01      6 10:45a-4:45p(6) # began work on the website
----------   6.25 (6.25 uninvoiced) # first week, woo!
2015-12-02   8.42 8:50a-10a(1.17), 12:15p-5:45p(5.50), 7:45p-9:30p(1.75) # built testing fraamework
2015-12-03    .68 10:09p-10:50p(.68) # respond to analysis document
2015-12-04   3.83 .50, 1:30p-2p(.50), 3:20p-5:20p(2), 9:40p-10:30p(.83) 
==========  19.18 (26.68 since invoice)

Global Configuration

User default configuration settings can go in ~/.tsconfig.yml (%USERPROFILE%.tsconfig.yml on Windows).

For instance:

address:
  - 'Scott Stafford'
  - '1212 Mockingbird Lane'
  - 'Washington, DC  20016'
  - ''
  - 'Email: [email protected]'
footer:
  - 'Please pay via bank transfer or check. All payments should be made in USD.'
  - 'Bank information for wire/direct deposit: My Bank, ABA/Routing: xxx, Acct#: yyy'
  - 'Make checks payable to XXX YYY'
invoice_filename_template: invoice-myname-{invoice_code}.pdf

# Here are some more.  These are the defaults, below, but uncomment if you want to change them.
# invoice_marker: ====
# invoice_on: marker
# invoice_template: ==========       {hours_this_week} ({hours_since_invoice} since invoice)
# prefix: ''
# summary_marker: '----'
# summary_on: marker
# verbose: 0
# weekly_summary_template: '----------       {hours_this_week} ({hours_since_invoice} uninvoiced)'

Generating Invoices

To generate a PDF invoice, include an invoice marker in the file where you want it and then use the -i/--invoice option. It will write one PDF for every invoice_marker (==== by default) it finds, and include the comment in the invoice. For example:

====  # MYCLIENT001, This invoice covers everything through Jan 31, 2016.

A file (using the invoice_filename_template setting) will be generated. The template supports {invoice_code}, which comes from the ==== comment before the first comma.

Easy!

TODO

ts's People

Contributors

ses4j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ts's Issues

Add instructions for creating PDF invoice

I want to use your software to create a PDF invoice to send you clients. I think you mentioned it can be done with reportlab? Can you provide instructions/example of how to do this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.