mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
fcbbf05933 | |||
9733087094 | |||
da4e02199a | |||
09a16dea1e | |||
4c7adf0943 | |||
216a8eaa0a |
19
HISTORY.rst
19
HISTORY.rst
@ -3,6 +3,25 @@ History
|
||||
-------
|
||||
|
||||
|
||||
1.6.3 (2014-01-15)
|
||||
++++++++++++++++++
|
||||
|
||||
- upgrade common wakatime package to v0.5.3
|
||||
|
||||
|
||||
1.6.2 (2014-01-14)
|
||||
++++++++++++++++++
|
||||
|
||||
- upgrade common wakatime package to v0.5.2
|
||||
|
||||
|
||||
1.6.1 (2013-12-13)
|
||||
++++++++++++++++++
|
||||
|
||||
- upgrade common wakatime package to v0.5.1
|
||||
- second line in .wakatime-project now sets branch name
|
||||
|
||||
|
||||
1.6.0 (2013-12-13)
|
||||
++++++++++++++++++
|
||||
|
||||
|
@ -5,7 +5,7 @@ Maintainer: WakaTi.me <support@wakatime.com>
|
||||
Website: https://www.wakati.me/
|
||||
==========================================================="""
|
||||
|
||||
__version__ = '1.6.0'
|
||||
__version__ = '1.6.3'
|
||||
|
||||
import sublime
|
||||
import sublime_plugin
|
||||
|
@ -12,3 +12,4 @@ Patches and Suggestions
|
||||
-----------------------
|
||||
|
||||
- 3onyc <3onyc@x3tech.com>
|
||||
- userid <xixico@ymail.com>
|
||||
|
@ -3,6 +3,24 @@ History
|
||||
-------
|
||||
|
||||
|
||||
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)
|
||||
++++++++++++++++++
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
WakaTime
|
||||
========
|
||||
|
||||
Automatic time tracking for your text editor. This is the common interface
|
||||
for the WakaTime api. You shouldn't need to directly use this package.
|
||||
Fully automatic time tracking for your text editor.
|
||||
|
||||
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.
|
||||
|
||||
Go to http://wakatime.com to install the plugin for your text editor.
|
||||
|
||||
|
@ -3,9 +3,8 @@
|
||||
wakatime
|
||||
~~~~~~~~
|
||||
|
||||
Common interface to WakaTime.com for most text editor plugins.
|
||||
WakaTime.com is fully automatic time tracking for text editors.
|
||||
More info at http://wakatime.com
|
||||
Common interface to the WakaTime api.
|
||||
http://wakatime.com
|
||||
|
||||
:copyright: (c) 2013 Alan Hamlett.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
@ -14,7 +13,7 @@
|
||||
from __future__ import print_function
|
||||
|
||||
__title__ = 'wakatime'
|
||||
__version__ = '0.5.0'
|
||||
__version__ = '0.5.3'
|
||||
__author__ = 'Alan Hamlett'
|
||||
__license__ = 'BSD'
|
||||
__copyright__ = 'Copyright 2013 Alan Hamlett'
|
||||
@ -135,7 +134,7 @@ def parseArguments(argv):
|
||||
|
||||
# define supported command line arguments
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Wakati.Me event api appender')
|
||||
description='Common interface for the WakaTime api.')
|
||||
parser.add_argument('--file', dest='targetFile', metavar='file',
|
||||
action=FileAction, required=True,
|
||||
help='absolute path to file for current action')
|
||||
|
@ -22,6 +22,13 @@ except ImportError:
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# str is unicode in Python3
|
||||
try:
|
||||
unicode
|
||||
except NameError:
|
||||
unicode = str
|
||||
|
||||
|
||||
class Git(BaseProject):
|
||||
|
||||
def process(self):
|
||||
|
@ -29,6 +29,13 @@ from .base import BaseProject
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# str is unicode in Python3
|
||||
try:
|
||||
unicode
|
||||
except NameError:
|
||||
unicode = str
|
||||
|
||||
|
||||
class ProjectMap(BaseProject):
|
||||
|
||||
def process(self):
|
||||
|
@ -24,6 +24,13 @@ except ImportError:
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# str is unicode in Python3
|
||||
try:
|
||||
unicode
|
||||
except NameError:
|
||||
unicode = str
|
||||
|
||||
|
||||
class Subversion(BaseProject):
|
||||
|
||||
def process(self):
|
||||
@ -41,6 +48,7 @@ class Subversion(BaseProject):
|
||||
info = OrderedDict()
|
||||
stdout = None
|
||||
try:
|
||||
os.environ['LANG'] = 'en_US'
|
||||
stdout, stderr = Popen([
|
||||
'svn', 'info', os.path.realpath(path)
|
||||
], stdout=PIPE, stderr=PIPE).communicate()
|
||||
|
@ -4,7 +4,8 @@
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Information from a .wakatime-project file about the project for
|
||||
a given file.
|
||||
a given file. First line of .wakatime-project sets the project
|
||||
name. Second line sets the current branch name.
|
||||
|
||||
:copyright: (c) 2013 Alan Hamlett.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
@ -19,24 +20,37 @@ from .base import BaseProject
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# str is unicode in Python3
|
||||
try:
|
||||
unicode
|
||||
except NameError:
|
||||
unicode = str
|
||||
|
||||
|
||||
class WakaTime(BaseProject):
|
||||
|
||||
def process(self):
|
||||
self.config = self._find_config(self.path)
|
||||
self._project_name = None
|
||||
self._project_branch = None
|
||||
|
||||
if self.config:
|
||||
|
||||
try:
|
||||
with open(self.config) as fh:
|
||||
self._project_name = unicode(fh.readline().strip())
|
||||
self._project_branch = unicode(fh.readline().strip())
|
||||
except IOError as e:
|
||||
log.exception("Exception:")
|
||||
|
||||
return True
|
||||
return False
|
||||
|
||||
def name(self):
|
||||
try:
|
||||
with open(self.config) as fh:
|
||||
return unicode(fh.readline().strip())
|
||||
except IOError as e:
|
||||
log.exception("Exception:")
|
||||
return None
|
||||
return self._project_name
|
||||
|
||||
def branch(self):
|
||||
return None
|
||||
return self._project_branch
|
||||
|
||||
def _find_config(self, path):
|
||||
path = os.path.realpath(path)
|
||||
|
Reference in New Issue
Block a user