bspaans / edittimereport Goto Github PK
View Code? Open in Web Editor NEWGenerate reports of time spent in your editor
License: GNU General Public License v3.0
Generate reports of time spent in your editor
License: GNU General Public License v3.0
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.