README.md in clock_window-0.0.5 vs README.md in clock_window-0.0.6

- old
+ new

@@ -1,15 +1,21 @@ [![Build Status](https://travis-ci.org/danielpclark/clock_window.svg?branch=master)](https://travis-ci.org/danielpclark/clock_window) +[![Gem Version](https://badge.fury.io/rb/clock_window.svg)](https://badge.fury.io/rb/clock_window) [![Code Triagers Badge](http://www.codetriage.com/danielpclark/clock_window/badges/users.svg)](http://www.codetriage.com/danielpclark/clock_window) # Clock Window -A minimalist script to keep track of how long each window is active. Measured in quarter minutes. Hash builds until you kill the script with CTRL-C at which point it writes out the log file. This script <del>adds no extra CPU load</del> will not raise the CPUs temperature indicating minimal CPU usage. +[![OS Support](https://github.com/danielpclark/clock_window/blob/master/assets/mac-lin.png)]() -The output will look quite nice in any text editor aligned by the colon separator. +**Mac** & **Linux** compatible. -**Linux** & **Mac** compatible. +A minimalist script to keep track of how long each window is active. +Measured in quarter minutes. Hash builds until you kill the script with CTRL-C +at which point it writes out the log file. This script <del>adds no extra CPU load</del> +will not raise the CPUs temperature indicating minimal CPU usage. +The output will look quite nice in any text editor aligned by the colon separator. + Output looks like: ``` { "*---------- WINDOW NAME ----------*" : "minutes", "Pandora Internet Radio - Listen to Free Music You'll Love - C" : 0.5, @@ -23,10 +29,32 @@ ``` gem install clock_window ``` -To execute just run `clock_window` . If you put this script in your executable path then the **timelog.json** file should appear in whatever folder you run it from. +# Usage + +The `clock_window` script now accepts command line parameters. + +``` +usage: clock_window [options] + + -c, --clean Use all known name filters + -o, --output File/directory output in strftime + -e, --eager Use strftime of time at start of script + + --version Print the version + -h, --help This help menu +``` + +And to save the file in a `year-month/day_of_year.json` format you can execute the script with. + +``` +clock_window -ceo "%Y-%m/%j.json" +``` + +For more customizable date formats see the [documentation for strftime](http://apidock.com/ruby/DateTime/strftime). +Default file output name is `timelog.json`. # Contributing Feel free to contribute! We're looking for additional OS support by people who use different operating systems.