mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
08b64b4ff6 | |||
20571ec085 | |||
e43dcc1c83 | |||
4610ff3e0c | |||
c86d6254e0 | |||
df331db5cc | |||
baff0f415d | |||
499dc167a5 | |||
83f4a29a15 | |||
8f02adacf9 | |||
e631d33944 | |||
cbd92a69b3 |
20
HISTORY.rst
20
HISTORY.rst
@ -3,6 +3,26 @@ History
|
||||
-------
|
||||
|
||||
|
||||
2.0.15 (2014-11-10)
|
||||
++++++++++++++++++
|
||||
|
||||
- upgrade external wakatime package to v2.1.3
|
||||
- correctly detect branch for subversion projects
|
||||
|
||||
|
||||
2.0.14 (2014-10-14)
|
||||
++++++++++++++++++
|
||||
|
||||
- popup error message if Python binary not found
|
||||
|
||||
|
||||
2.0.13 (2014-10-07)
|
||||
++++++++++++++++++
|
||||
|
||||
- upgrade external wakatime package to v2.1.2
|
||||
- still log heartbeat when something goes wrong while reading num lines in file
|
||||
|
||||
|
||||
2.0.12 (2014-09-30)
|
||||
++++++++++++++++++
|
||||
|
||||
|
16
README.md
16
README.md
@ -7,27 +7,25 @@ Installation
|
||||
------------
|
||||
|
||||
Heads Up! For Sublime Text 2 on Windows & Linux, WakaTime depends on [Python](http://www.python.org/getit/) being installed to work correctly.
|
||||
|
||||
1. Get an api key from: https://wakatime.com/#apikey
|
||||
|
||||
1. Install [Sublime Package Control](https://sublime.wbond.net/installation).
|
||||
|
||||
2. Using [Sublime Package Control](http://wbond.net/sublime_packages/package_control):
|
||||
|
||||
a) Press `ctrl+shift+p`(Windows, Linux) or `cmd+shift+p`(OS X).
|
||||
a) Inside Sublime, press `ctrl+shift+p`(Windows, Linux) or `cmd+shift+p`(OS X).
|
||||
|
||||
b) Type `install`, then press `enter` with `Package Control: Install Package` selected.
|
||||
|
||||
c) Type `wakatime`, then press `enter` with the `WakaTime` plugin selected.
|
||||
|
||||
3. You will see a prompt at the bottom asking for your [api key](https://wakatime.com/#apikey). Enter your api key, then press `enter`.
|
||||
3. Enter your [api key](https://wakatime.com/settings#apikey) from https://wakatime.com/settings#apikey, then press `enter`.
|
||||
|
||||
4. Use Sublime and your time will automatically be tracked for you.
|
||||
4. Use Sublime and your time will be tracked for you automatically.
|
||||
|
||||
5. Visit https://wakatime.com to see your logged time.
|
||||
|
||||
6. Consider installing [BIND9](https://help.ubuntu.com/community/BIND9ServerHowto#Caching_Server_configuration) to cache your repeated DNS requests: `sudo apt-get install bind9`
|
||||
5. Visit https://wakatime.com/dashboard to see your logged time.
|
||||
|
||||
Screen Shots
|
||||
------------
|
||||
|
||||

|
||||

|
||||
|
||||
|
@ -6,7 +6,7 @@ License: BSD, see LICENSE for more details.
|
||||
Website: https://wakatime.com/
|
||||
==========================================================="""
|
||||
|
||||
__version__ = '2.0.12'
|
||||
__version__ = '2.0.15'
|
||||
|
||||
import sublime
|
||||
import sublime_plugin
|
||||
@ -181,6 +181,13 @@ class SendActionThread(threading.Thread):
|
||||
def plugin_loaded():
|
||||
global SETTINGS
|
||||
print('[WakaTime] Initializing WakaTime plugin v%s' % __version__)
|
||||
|
||||
if not HAS_SSL:
|
||||
python = python_binary()
|
||||
if not python:
|
||||
sublime.error_message("Unable to find Python binary!\nWakaTime needs Python to work correctly.\n\nGo to https://www.python.org/downloads")
|
||||
return
|
||||
|
||||
SETTINGS = sublime.load_settings(SETTINGS_FILE)
|
||||
after_loaded()
|
||||
|
||||
|
@ -3,6 +3,12 @@ History
|
||||
-------
|
||||
|
||||
|
||||
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)
|
||||
++++++++++++++++++
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
from __future__ import print_function
|
||||
|
||||
__title__ = 'wakatime'
|
||||
__version__ = '2.1.1'
|
||||
__version__ = '2.1.3'
|
||||
__author__ = 'Alan Hamlett'
|
||||
__license__ = 'BSD'
|
||||
__copyright__ = 'Copyright 2014 Alan Hamlett'
|
||||
@ -122,8 +122,7 @@ def parseConfigFile(configFile):
|
||||
print(traceback.format_exc())
|
||||
return None
|
||||
except IOError:
|
||||
if not os.path.isfile(configFile):
|
||||
print('Error: Could not read from config file ~/.wakatime.cfg')
|
||||
print(u('Error: Could not read from config file {0}').format(configFile))
|
||||
return configs
|
||||
|
||||
|
||||
|
@ -35,9 +35,7 @@ class Subversion(BaseProject):
|
||||
return u(self.info['Repository Root'].split('/')[-1])
|
||||
|
||||
def branch(self):
|
||||
if self.base:
|
||||
u(os.path.basename(self.base))
|
||||
return None
|
||||
return u(self.info['URL'].split('/')[-1])
|
||||
|
||||
def _find_binary(self):
|
||||
if self.binary_location:
|
||||
@ -70,17 +68,11 @@ class Subversion(BaseProject):
|
||||
pass
|
||||
else:
|
||||
if stdout:
|
||||
interesting = [
|
||||
'Repository Root',
|
||||
'Repository UUID',
|
||||
'URL',
|
||||
]
|
||||
for line in stdout.splitlines():
|
||||
if isinstance(line, bytes):
|
||||
line = bytes.decode(line)
|
||||
line = line.split(': ', 1)
|
||||
if line[0] in interesting:
|
||||
info[line[0]] = line[1]
|
||||
info[line[0]] = line[1]
|
||||
return info
|
||||
|
||||
def _find_project_base(self, path, found=False):
|
||||
|
@ -82,7 +82,7 @@ def number_lines_in_file(file_name):
|
||||
with open(file_name, 'r', encoding='utf-8') as fh:
|
||||
for line in fh:
|
||||
lines += 1
|
||||
except IOError:
|
||||
except:
|
||||
return None
|
||||
return lines
|
||||
|
||||
|
Reference in New Issue
Block a user