upgrade wakatime cli to v4.0.4
This commit is contained in:
parent
8b0bdf56df
commit
ed8595bf0b
1087 changed files with 51 additions and 508 deletions
39
plugin/packages/wakatime/.gitignore
vendored
39
plugin/packages/wakatime/.gitignore
vendored
|
@ -1,39 +0,0 @@
|
|||
*.py[cod]
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist
|
||||
build
|
||||
eggs
|
||||
parts
|
||||
bin
|
||||
var
|
||||
sdist
|
||||
develop-eggs
|
||||
.installed.cfg
|
||||
lib
|
||||
lib64
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
nosetests.xml
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
||||
|
||||
virtualenv
|
||||
venv
|
||||
.DS_Store
|
|
@ -1,15 +0,0 @@
|
|||
WakaTime is written and maintained by Alan Hamlett and
|
||||
various contributors:
|
||||
|
||||
|
||||
Development Lead
|
||||
----------------
|
||||
|
||||
- Alan Hamlett <alan.hamlett@gmail.com>
|
||||
|
||||
|
||||
Patches and Suggestions
|
||||
-----------------------
|
||||
|
||||
- 3onyc <3onyc@x3tech.com>
|
||||
- userid <xixico@ymail.com>
|
|
@ -1,319 +0,0 @@
|
|||
|
||||
History
|
||||
-------
|
||||
|
||||
|
||||
4.0.1 (2015-03-03)
|
||||
++++++++++++++++++
|
||||
|
||||
- upgrade requests library to v2.5.3 to fix SSL problem on CentOS
|
||||
- new options for excluding and including directories
|
||||
|
||||
|
||||
4.0.0 (2015-02-12)
|
||||
++++++++++++++++++
|
||||
|
||||
- use requests library instead of urllib2, so api SSL cert is verified
|
||||
- new --notfile argument to support logging time without a real file
|
||||
- new --proxy argument for https proxy support
|
||||
|
||||
|
||||
3.0.5 (2015-01-13)
|
||||
++++++++++++++++++
|
||||
|
||||
- ignore errors from malformed markup (too many closing tags)
|
||||
|
||||
|
||||
3.0.4 (2015-01-06)
|
||||
++++++++++++++++++
|
||||
|
||||
- remove unused dependency, which is missing in some python environments
|
||||
|
||||
|
||||
3.0.3 (2014-12-25)
|
||||
++++++++++++++++++
|
||||
|
||||
- detect JavaScript frameworks from script tags in Html template files
|
||||
|
||||
|
||||
3.0.2 (2014-12-25)
|
||||
++++++++++++++++++
|
||||
|
||||
- detect frameworks from JavaScript and JSON files
|
||||
|
||||
|
||||
3.0.1 (2014-12-23)
|
||||
++++++++++++++++++
|
||||
|
||||
- handle unknown language when parsing dependencies
|
||||
|
||||
|
||||
3.0.0 (2014-12-23)
|
||||
++++++++++++++++++
|
||||
|
||||
- detect libraries and frameworks for C++, Java, .NET, PHP, and Python files
|
||||
|
||||
|
||||
2.1.11 (2014-12-22)
|
||||
+++++++++++++++++++
|
||||
|
||||
- fix offline logging when response from api is None
|
||||
|
||||
|
||||
2.1.10 (2014-12-15)
|
||||
+++++++++++++++++++
|
||||
|
||||
- prevent queuing offline heartbeats which will never be valid (400 errors)
|
||||
|
||||
|
||||
2.1.9 (2014-12-05)
|
||||
++++++++++++++++++
|
||||
|
||||
- fix bug preventing offline heartbeats from being purged after uploaded
|
||||
|
||||
|
||||
2.1.8 (2014-12-04)
|
||||
++++++++++++++++++
|
||||
|
||||
- fix UnicodeDecodeError when building user agent string
|
||||
- handle case where response is None
|
||||
|
||||
|
||||
2.1.7 (2014-11-30)
|
||||
++++++++++++++++++
|
||||
|
||||
- upgrade pygments to v2.0.1
|
||||
- always log an error when api key is incorrect
|
||||
|
||||
|
||||
2.1.6 (2014-11-18)
|
||||
++++++++++++++++++
|
||||
|
||||
- fix list index error when detecting subversion project
|
||||
|
||||
|
||||
2.1.5 (2014-11-17)
|
||||
++++++++++++++++++
|
||||
|
||||
- catch exceptions when getting current machine time zone
|
||||
|
||||
|
||||
2.1.4 (2014-11-12)
|
||||
++++++++++++++++++
|
||||
|
||||
- when Python was not compiled with https support, log an error to the log file
|
||||
|
||||
|
||||
2.1.3 (2014-11-10)
|
||||
++++++++++++++++++
|
||||
|
||||
- correctly detect branch name for subversion projects
|
||||
|
||||
|
||||
2.1.2 (2014-10-07)
|
||||
++++++++++++++++++
|
||||
|
||||
- still log heartbeat when something goes wrong while reading num lines in file
|
||||
|
||||
|
||||
2.1.1 (2014-09-30)
|
||||
++++++++++++++++++
|
||||
|
||||
- fix bug where binary file opened as utf-8
|
||||
|
||||
|
||||
2.1.0 (2014-09-30)
|
||||
++++++++++++++++++
|
||||
|
||||
- python3 compatibility changes
|
||||
|
||||
|
||||
2.0.8 (2014-08-29)
|
||||
++++++++++++++++++
|
||||
|
||||
- supress output from svn command
|
||||
|
||||
|
||||
2.0.7 (2014-08-27)
|
||||
++++++++++++++++++
|
||||
|
||||
- find svn binary location from common install directories
|
||||
|
||||
|
||||
2.0.6 (2014-08-07)
|
||||
++++++++++++++++++
|
||||
|
||||
- encode json data as str when passing to urllib
|
||||
|
||||
|
||||
2.0.5 (2014-07-25)
|
||||
++++++++++++++++++
|
||||
|
||||
- option in .wakatime.cfg to obfuscate file names
|
||||
|
||||
|
||||
2.0.4 (2014-07-25)
|
||||
++++++++++++++++++
|
||||
|
||||
- use unique logger namespace to prevent collisions in shared plugin environments
|
||||
|
||||
|
||||
2.0.3 (2014-06-18)
|
||||
++++++++++++++++++
|
||||
|
||||
- use project from command line arg when no revision control project is found
|
||||
|
||||
|
||||
2.0.2 (2014-06-09)
|
||||
++++++++++++++++++
|
||||
|
||||
- include python3.2 compatible versions of simplejson, pytz, and tzlocal
|
||||
- disable offline logging when Python was not compiled with sqlite3 module
|
||||
|
||||
|
||||
2.0.1 (2014-05-26)
|
||||
++++++++++++++++++
|
||||
|
||||
- fix bug in queue preventing actions with NULL values from being purged
|
||||
|
||||
|
||||
2.0.0 (2014-05-25)
|
||||
++++++++++++++++++
|
||||
|
||||
- offline time logging using sqlite3 to queue editor events
|
||||
|
||||
|
||||
1.0.2 (2014-05-06)
|
||||
++++++++++++++++++
|
||||
|
||||
- ability to set project from command line argument
|
||||
|
||||
|
||||
1.0.1 (2014-03-05)
|
||||
++++++++++++++++++
|
||||
|
||||
- use new domain name wakatime.com
|
||||
|
||||
|
||||
1.0.0 (2014-02-05)
|
||||
++++++++++++++++++
|
||||
|
||||
- detect project name and branch name from mercurial revision control
|
||||
|
||||
|
||||
0.5.3 (2014-01-15)
|
||||
++++++++++++++++++
|
||||
|
||||
- bug fix for unicode in Python3
|
||||
|
||||
|
||||
0.5.2 (2014-01-14)
|
||||
++++++++++++++++++
|
||||
|
||||
- minor bug fix for Subversion on non-English systems
|
||||
|
||||
|
||||
0.5.1 (2013-12-13)
|
||||
++++++++++++++++++
|
||||
|
||||
- second line in .wakatime-project file now sets branch name
|
||||
|
||||
|
||||
0.5.0 (2013-12-13)
|
||||
++++++++++++++++++
|
||||
|
||||
- Convert ~/.wakatime.conf to ~/.wakatime.cfg and use configparser format
|
||||
- new [projectmap] section in cfg file for naming projects based on folders
|
||||
|
||||
|
||||
0.4.10 (2013-11-13)
|
||||
+++++++++++++++++++
|
||||
|
||||
- Placing .wakatime-project file in a folder will read the project's name from that file
|
||||
|
||||
|
||||
0.4.9 (2013-10-27)
|
||||
++++++++++++++++++
|
||||
|
||||
- New config for ignoring files from regular expressions
|
||||
- Parse more options from config file (verbose, logfile, ignore)
|
||||
|
||||
|
||||
0.4.8 (2013-10-13)
|
||||
++++++++++++++++++
|
||||
|
||||
- Read git HEAD file to find current branch instead of running git command line
|
||||
|
||||
|
||||
0.4.7 (2013-09-30)
|
||||
++++++++++++++++++
|
||||
|
||||
- Sending local olson timezone string in api request
|
||||
|
||||
|
||||
0.4.6 (2013-09-22)
|
||||
++++++++++++++++++
|
||||
|
||||
- Sending total lines in file and language name to api
|
||||
|
||||
|
||||
0.4.5 (2013-09-07)
|
||||
++++++++++++++++++
|
||||
|
||||
- Fixed relative import error by adding packages directory to sys path
|
||||
|
||||
|
||||
0.4.4 (2013-09-06)
|
||||
++++++++++++++++++
|
||||
|
||||
- Using urllib2 again because of intermittent problems sending json with requests library
|
||||
|
||||
|
||||
0.4.3 (2013-09-04)
|
||||
++++++++++++++++++
|
||||
|
||||
- Encoding json as utf-8 before making request
|
||||
|
||||
|
||||
0.4.2 (2013-09-04)
|
||||
++++++++++++++++++
|
||||
|
||||
- Using requests package v1.2.3 from pypi
|
||||
|
||||
|
||||
0.4.1 (2013-08-25)
|
||||
++++++++++++++++++
|
||||
|
||||
- Fix bug causing requests library to omit POST content
|
||||
|
||||
|
||||
0.4.0 (2013-08-15)
|
||||
++++++++++++++++++
|
||||
|
||||
- Sending single branch instead of multiple tags
|
||||
|
||||
|
||||
0.3.1 (2013-08-08)
|
||||
++++++++++++++++++
|
||||
|
||||
- Using requests module instead of urllib2 to verify SSL certs
|
||||
|
||||
|
||||
0.3.0 (2013-08-08)
|
||||
++++++++++++++++++
|
||||
|
||||
- Allow importing directly from Python plugins
|
||||
|
||||
|
||||
0.1.1 (2013-07-07)
|
||||
++++++++++++++++++
|
||||
|
||||
- Refactored
|
||||
- Simplified action events schema
|
||||
|
||||
|
||||
0.0.1 (2013-07-05)
|
||||
++++++++++++++++++
|
||||
|
||||
- Birth
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2014 by the respective authors (see AUTHORS file).
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
* Neither the names of WakaTime, nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
|
||||
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,2 +0,0 @@
|
|||
include README.rst LICENSE HISTORY.rst
|
||||
recursive-include wakatime *.py
|
|
@ -1,48 +0,0 @@
|
|||
WakaTime
|
||||
========
|
||||
|
||||
Fully automatic time tracking for programmers.
|
||||
|
||||
This is the common interface for the WakaTime api. You shouldn't need to directly use this package unless you are creating a new plugin or your text editor's plugin asks you to install the wakatime-cli interface.
|
||||
|
||||
Go to http://wakatime.com to install the plugin for your text editor.
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Install the plugin for your IDE/editor at https://wakatime.com/plugins
|
||||
|
||||
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 information about using ``wakatime-cli.py``.
|
||||
|
||||
|
||||
Configuring
|
||||
-----------
|
||||
|
||||
Options can be passed via command line, or set in the ``$HOME/.wakatime.cfg``
|
||||
config file. Command line arguments take precedence over config file settings.
|
||||
The ``$HOME/.wakatime.cfg`` file is in `INI <http://en.wikipedia.org/wiki/INI_file>`_
|
||||
format. An example config file looks like::
|
||||
[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
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Each plugin installs wakatime for you, but for testing you can install the
|
||||
common api interface with pip::
|
||||
pip install wakatime
|
9
plugin/packages/wakatime/__about__.py
Normal file
9
plugin/packages/wakatime/__about__.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
__title__ = 'wakatime'
|
||||
__description__ = 'Common interface to the WakaTime api.'
|
||||
__url__ = 'https://github.com/wakatime/wakatime'
|
||||
__version_info__ = ('4', '0', '4')
|
||||
__version__ = '.'.join(__version_info__)
|
||||
__author__ = 'Alan Hamlett'
|
||||
__author_email__ = 'alan@wakatime.com'
|
||||
__license__ = 'BSD'
|
||||
__copyright__ = 'Copyright 2014 Alan Hamlett'
|
17
plugin/packages/wakatime/__init__.py
Normal file
17
plugin/packages/wakatime/__init__.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
wakatime
|
||||
~~~~~~~~
|
||||
|
||||
Common interface to the WakaTime api.
|
||||
http://wakatime.com
|
||||
|
||||
:copyright: (c) 2013 Alan Hamlett.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
|
||||
__all__ = ['main']
|
||||
|
||||
|
||||
from .base import main
|
|
@ -1,10 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
wakatime
|
||||
~~~~~~~~
|
||||
wakatime.base
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Common interface to the WakaTime api.
|
||||
http://wakatime.com
|
||||
wakatime module entry point.
|
||||
|
||||
:copyright: (c) 2013 Alan Hamlett.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
|
@ -12,13 +11,6 @@
|
|||
|
||||
from __future__ import print_function
|
||||
|
||||
__title__ = 'wakatime'
|
||||
__version__ = '4.0.1'
|
||||
__author__ = 'Alan Hamlett'
|
||||
__license__ = 'BSD'
|
||||
__copyright__ = 'Copyright 2014 Alan Hamlett'
|
||||
|
||||
|
||||
import base64
|
||||
import logging
|
||||
import os
|
||||
|
@ -35,6 +27,7 @@ except ImportError:
|
|||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'packages'))
|
||||
|
||||
from .__about__ import __version__
|
||||
from .compat import u, open, is_py3
|
||||
from .offlinequeue import Queue
|
||||
from .log import setup_logging
|
||||
|
@ -175,6 +168,8 @@ def parseArguments(argv):
|
|||
help='filename patterns to log; when used in combination with '+
|
||||
'--exclude, files matching include will still be logged; '+
|
||||
'POSIX regex syntax; can be used more than once')
|
||||
parser.add_argument('--ignore', dest='ignore', action='append',
|
||||
help=argparse.SUPPRESS)
|
||||
parser.add_argument('--logfile', dest='logfile',
|
||||
help='defaults to ~/.wakatime.log')
|
||||
parser.add_argument('--config', dest='config',
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
wakatime-cli
|
||||
wakatime.cli
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Command-line entry point.
|
||||
|
@ -9,11 +9,9 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import wakatime
|
||||
|
||||
if __name__ == '__main__':
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue