fork of the wakatime cli program for rana
Find a file
2017-03-04 13:53:56 -08:00
tests F# takes priority over Forth language 2017-03-04 13:42:44 -08:00
wakatime typoscript lexer should not have higher priority than typescript 2017-03-04 13:53:56 -08:00
.coveragerc remove unused python token parser method 2016-08-31 17:13:25 +02:00
.gitignore ignore venv3 virtualenv folder 2016-06-08 20:37:43 +02:00
.travis.yml add support for python 3.6 2017-02-16 12:11:12 -08:00
AUTHORS set system language to English before running subversion program 2014-01-14 05:02:51 -08:00
dev-requirements.txt upgrade testfixtures to v4.13.5 2017-03-01 22:26:26 -08:00
HISTORY.rst changes for v7.0.4 2017-03-01 22:25:50 -08:00
LICENSE update copyright year to 2016 2016-03-06 13:02:46 -08:00
MANIFEST.in add NOTICE to manifest for pypi 2015-05-27 22:34:46 -07:00
NOTICE add NOTICE file for vendorized python libraries 2015-05-27 22:34:19 -07:00
README.rst manual install steps not needed 2017-02-15 17:38:26 -08:00
setup.cfg include non-executed python files in coverage report 2015-09-29 15:50:33 -07:00
setup.py add support for python 3.6 2017-02-16 12:11:12 -08:00
tox.ini run tests locally on py 3.6 2017-02-16 12:20:33 -08:00

WakaTime
========

.. image:: https://travis-ci.org/wakatime/wakatime.svg
    :target: https://travis-ci.org/wakatime/wakatime
    :alt: Tests

.. image:: https://coveralls.io/repos/wakatime/wakatime/badge.svg?branch=master&service=github
    :target: https://coveralls.io/github/wakatime/wakatime?branch=master
    :alt: Coverage

.. image:: https://badge.fury.io/py/wakatime.svg
    :target: https://pypi.python.org/pypi/wakatime
    :alt: Version

.. image:: https://gemnasium.com/badges/github.com/wakatime/wakatime.svg
    :target: https://gemnasium.com/github.com/wakatime/wakatime
    :alt: Dependencies

.. image:: https://wakaslack.herokuapp.com/badge.svg
    :target: https://wakaslack.herokuapp.com
    :alt: Slack


Command line interface to `WakaTime <https://wakatime.com/>`_ used by all WakaTime `text editor plugins <https://wakatime.com/editors>`_.

Go to http://wakatime.com/editors to install the plugin for your text editor or IDE.


Installation
------------

Note: You shouldn't need to directly use this package unless you are `building your own plugin <https://wakatime.com/help/misc/creating-plugin>`_ or your text editor's plugin asks you to install the WakaTime CLI manually.

Each `plugin <https://wakatime.com/editors>`_ installs the WakaTime CLI for you, except for the `Emacs WakaTime plugin <https://github.com/wakatime/wakatime-mode>`_.

Install the plugin for your IDE/editor:

https://wakatime.com/editors

Each plugin either comes pre-bundled with WakaTime CLI, or downloads the latest version from GitHub for you.


Usage
-----

If you are building a plugin using the `WakaTime API <https://wakatime.com/developers/>`_
then follow the `Creating a Plugin <https://wakatime.com/help/misc/creating-plugin>`_
guide.

For command line options, run ``wakatime --help``.

Some more usage information is available in the `FAQ <https://wakatime.com/faq>`_.


Configuring
-----------

Options can be passed via command line, or set in the ``$WAKATIME_HOME/.wakatime.cfg``
config file. Command line arguments take precedence over config file settings.
The ``$WAKATIME_HOME/.wakatime.cfg`` file is in `INI <http://en.wikipedia.org/wiki/INI_file>`_
format. An example config file with all available options::

    [settings]
    debug = false
    api_key = your-api-key
    hidefilenames = false
    exclude =
        ^COMMIT_EDITMSG$
        ^TAG_EDITMSG$
        ^/var/
        ^/etc/
    include =
        .*
    offline = true
    proxy = https://user:pass@localhost:8080
    timeout = 30
    hostname = machinename
    [projectmap]
        projects/foo = new project name
        ^/home/user/projects/bar(\d+)/ = project{0}

For commonly used configuration options, see examples in the `FAQ <https://wakatime.com/faq>`_.


Troubleshooting
---------------

Read the `FAQ <https://wakatime.com/faq>`_ for solutions to common problems.

WakaTime CLI writes errors to a common log file in your User ``$WAKATIME_HOME`` directory::

    ~/.wakatime.log

Set ``debug=true`` in ``~/.wakatime.cfg`` for more verbose logging, but don't forget to set it back to ``debug=false`` afterwards or your editor might be laggy while waiting for WakaTime CLI to finish executing.

Each plugin also has it's own log file for things outside the scope of WakaTime CLI:

* **Atom** writes errors to the developer console (View -> Developer -> Toggle Developer Tools)
* **Brackets** errors go to the developer console (Debug -> Show Developer Tools)
* **Cloud9** logs to the browser console (View -> Developer -> JavaScript Console)
* **Coda** logs to ``/var/log/system.log`` so use ``sudo tail -f /var/log/system.log`` in Terminal to watch Coda 2 logs
* **Eclipse** logs can be found in the Eclipse ``Error Log`` (Window -> Show View -> Error Log)
* **Emacs** messages go to the *messages* buffer window
* **Jetbrains IDEs (IntelliJ IDEA, PyCharm, RubyMine, PhpStorm, AppCode, AndroidStudio, WebStorm)** log to ``idea.log`` (`locating IDE log files <https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files>`_)
* **Komodo** logs are written to ``pystderr.log`` (Help -> Troubleshooting -> View Log File)
* **Netbeans** logs to it's own log file (View -> IDE Log)
* **Notepad++** errors go to ``AppData\Roaming\Notepad++\plugins\config\WakaTime.log`` (this file is only created when an error occurs)
* **Sublime** Text logs to the Sublime Console (View -> Show Console)
* **TextMate** logs to stderr so run TextMate from Terminal to see any errors (`enable logging <https://github.com/textmate/textmate/wiki/Enable-Logging>`_)
* **Vim** errors get displayed in the status line or inline (use ``:redraw!`` to clear inline errors)
* **Visual Studio** logs to the Output window, but uncaught exceptions go to ActivityLog.xml (`more info... <http://blogs.msdn.com/b/visualstudio/archive/2010/02/24/troubleshooting-with-the-activity-log.aspx>`_)
* **Vscode** logs to the developer console (Help -> Toggle Developer Tools)
* **Xcode** type ``sudo tail -f /var/log/system.log`` in a Terminal to view Xcode errors

Check that heartbeats are received by the WakaTime api with the ``last_heartbeat`` and ``last_plugin`` attributes from the `current user <https://wakatime.com/api/v1/users/current>`_ api resource.
You can also see a list of all your plugins and when they were last seen by the api with the `user_agents <https://wakatime.com/api/v1/users/current/user_agents>`_ api endpoint.

Note: Saving a file forces a heartbeat to be sent.

`Official API Docs <https://wakatime.com/api>`_


Contributing
------------

Before contributing a pull request, make sure tests pass::

    virtualenv venv
    . venv/bin/activate
    pip install tox
    tox

The above will run tests on all Python versions available on your machine.
To just run tests on a single Python version::

    virtualenv venv
    . venv/bin/activate
    pip install -r dev-requirements.txt
    nosetests

Many thanks to all `contributors <https://github.com/wakatime/wakatime/blob/master/AUTHORS>`_!