Wakatime Test Working time

Source: Internet
Author: User

wakatime–, what time is it, what are you doing?

The previous mention of a tool used to QS himself clarify. This time introduced a special tool for programmers.
We all know the 10,000-hour law, but how long have I been writing Java? Wakatime know. It is estimated that many people know rescuetime, and I use RescueTime to keep track of my working hours. But it can't record more specific behaviors (and maybe actually do), like how long I've been writing JavaScript and how long objective-c. Waka is OK, because it provides several main IDE plug-ins, just install the corresponding plug-in, waka can automatically record your behavior in the IDE.

Wakatime

The basic design of waka is similar to RescueTime. Everyone registration will get a key, install a client, the key into the (login is the same reason), and then it will be all local behavior with a key to the server to count, a period of time to give you a report. But Waka is really accurate, accurate to how many seconds each file takes, how much time each language takes.


It is said that waka can also know how long you spend on each branch, which is really a good way to quantify programmers. If there is a project management will use this tool, believe also can more accurately grasp the development progress, control every development attempt cost.

As a paid user madman, the first thing to do after landing is, of course, search pricing~ comparison, the function of paid users is the indefinite data viewing and raw data export. Think about it. Forget it this time. There is also a team version Oh ~

Working principle

Waka let me think that the fun is his plugin are open source, and in his Open source project list to see a wakatime called the core project, Python wrote, said that we basically do not need to use directly. Basically you can determine the core library that every plugin will call.

From queue.py, all the logs will be put under the ~/.wakatime.db, so we'll go and see what it's saved. Open later found to be empty ... It must have been waka the log has been passed away after the deletion of the local. So, break the net, pretend to write code, and then look.

You can see that it records which file I am in, what time, what project, what language was written, and even under what line. If this data is combined with version management, the dynamic presentation will be how cool AH ~

Anyway, because I want to use koding such webide to work, so I did not send waka, so I need to know what the specific API to send records.

This is also called API documentation

Wakatime is that the code is the best document, incredibly in the API document does not write how these logs are entered into the database ... In the document only authentication, get statistics, and current user information interface ...

Well, let's go straight to the python repo. First of all, there must be a code file that includes HTTP and wakatime.com. Then search, find init. A function in the PY is called send_action. This is obviously used to send a log.

Let's use curl to simulate this request (it doesn't look too many fields).

$ curl -d ‘{"time":"1414688349","file":"/root","lines":"123","language":"javascript","is_write":"0","project":"manhattan"}‘ -H "User-Agent: space" -H "Content-Type: application/json" -H "Authorization: Basic ODMwOTliYjMtZGUwZS00NWFkLThhODItZmY4OWUwYzxxxxxxx" https://wakatime.com/api/v1/actions{  "data": {    "id": "83682870-8306-4d12-b4a9-e0ba5f6cc295"  }}

Base64 key to a bit, with date +%s the current timestamp, you can throw data into the waka. When you're done, look at dashboard~, our Manhattan Project is coming up.

If you want to, you can change it to a variety of SDKs (of course there are cross-domain issues in browser, so you can find an intermediary server to do this).

Do something in the future

Just saw a timestamp to show the time, if changed into later. It is estimated that waka will not have an egg ache to do this check ... Throw a few action on January 1, 2015, wait a little while, look at the URL of the Manhattan Project and change it to https://wakatime.com/project/manhattan?start=2014-12-26&end= 2015-1-3. You can see me writing JavaScript in the future.

Extended Waka

So in fact Wakatime is a particularly basic action recording and statistics platform. If it is willing to open source (actually it is not as good as a logger analysis platform ...) ), can completely build a QS small service. For example, the 20-minute acceleration change data is issued at 9 o'clock and then stopped for 10 minutes.

Wakatime Test Working time

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.