Git Product home page Git Product logo

edittimereport's Introduction

Edit Time Report
----------------

  Logging the times of edits can give you a pretty good overview of 
  the work you've done in the past and opens the data up for analysis.
  Edit Time Report is a set of tools ('report', 'editlogd' and 'editlog')
  that help with logging, querying and generating reports in plain text, 
  html, xhtml or csv format.

  Using this tools, you will be able to answer questions like:

     * How many hours did I spent working on a language/project/file?
     * What language have I used the most this year?
     * What's my most productive day of the week?
     * How much time did I work on year/month/week/day?
     * ..and on which project or language?


Logging
-------
  
  To be able to make logging easy and editor-agnostic we use a simple 
  daemon and client architecture (you could also let your editor 
  write the logs directly if you want).
 
  The daemon `editlogd' is an Haskell program that logs to a flat plain 
  text file in the following format:

     YEAR MONTH DAY HOUR MIN SEC DOW DOY COMMAND FILE
     2009 12 29 10 39 23 1 363 EDIT /home/bspaans/src/file.hs

     where DOW and DOY resp. stand for the day of the week (0 is sunday)
     and year, and where COMMAND is one of EDIT, NEW, START or STOP. 

  The client `editlog' is a simple bash script that contacts the daemon 
  when executed and should be called from your editor. 


Generating Reports
------------------

  The reporting program is also written in Haskell. It can parse the log file, 
  do some analysis (like project and language classification) and produce 
  HTML, XHTML, csv and plain text output.

  To create reports you can use a tiny DSL to query the data. For some usage 
  examples and the grammar, you should check out the wiki.


Installing
----------

  Compiling the tool-set is easy if you have cabal:

    cabal install

  Alternatively, you could install the program manually if you have all
  the dependencies (see EditTimeReport.cabal):
 
    alex QueryLexer.x
    happy QueryParser.y
    ghc --make Main.hs 
    ghc --make Daemon.hs

  Next, you need to make sure the daemon is started when you login. 
  There are several ways to do this, some dependent of 
  window managers, but that should be easy enough to find out. 

  The command to be started on login should read like this:

      editlogd /path/to/log/file

  The path can be used to specify the location of the logfile. 
  If left blank ~/report.log will be used.

  Now the only thing that remains is to set up your editor hooks.


Editor Hooks :: vim
-------------------

    Put the following in your ~/.vimrc:

    " chart functionality
    autocmd VimEnter * :silent ! editlog -s
    autocmd VimLeave * :silent ! editlog -e
    autocmd BufNewFile * :silent ! editlog -n <afile>:p
    autocmd BufWritePost * :silent ! editlog -w <afile>:p

Editor Hooks :: emacs
---------------------

    TODO

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.