mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
Compare commits
2 Commits
11.0.8
...
feature/ap
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a387c08b44 | ||
![]() |
3c2947cf79 |
@@ -3,6 +3,12 @@ History
|
||||
-------
|
||||
|
||||
|
||||
11.1.0 (2022-11-11)
|
||||
++++++++++++++++++
|
||||
|
||||
- Support for api key vault cmd config
|
||||
|
||||
|
||||
11.0.8 (2022-08-23)
|
||||
++++++++++++++++++
|
||||
|
||||
|
@@ -4,7 +4,6 @@
|
||||
|
||||
[WakaTime][wakatime] is an open source Sublime Text plugin for metrics, insights, and time tracking automatically generated from your programming activity.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
1. Install [Package Control](https://packagecontrol.io/installation).
|
||||
@@ -19,12 +18,10 @@
|
||||
|
||||
6. Use Sublime and your coding activity will be displayed on your [WakaTime dashboard](https://wakatime.com).
|
||||
|
||||
|
||||
## Screen Shots
|
||||
|
||||

|
||||
|
||||
|
||||
## Unresponsive Plugin Warning
|
||||
|
||||
In Sublime Text 2, if you get a warning message:
|
||||
@@ -35,7 +32,6 @@ To fix this, go to `Preferences → Settings - User` then add the following sett
|
||||
|
||||
`"detect_slow_plugins": false`
|
||||
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
First, turn on debug mode in your `WakaTime.sublime-settings` file.
|
||||
|
21
WakaTime.py
21
WakaTime.py
@@ -194,11 +194,32 @@ class ApiKey(object):
|
||||
if key:
|
||||
self._key = key
|
||||
return self._key
|
||||
|
||||
apiKeyFromVault = self.__readFromVaultCmd()
|
||||
if apiKeyFromVault:
|
||||
self._key = apiKeyFromVault
|
||||
return self._key
|
||||
except:
|
||||
pass
|
||||
|
||||
return self._key
|
||||
|
||||
def __readFromVaultCmd(self):
|
||||
apiKeyCmd = SETTINGS.get('api_key_vault_cmd')
|
||||
if not apiKeyCmd:
|
||||
return None
|
||||
|
||||
try:
|
||||
p = Popen(apiKeyCmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode == 0:
|
||||
return stdout.strip()
|
||||
log(WARNING, u(stderr))
|
||||
except:
|
||||
log(ERROR, traceback.format_exc())
|
||||
|
||||
return None
|
||||
|
||||
def write(self, key):
|
||||
global SETTINGS
|
||||
self._key = key
|
||||
|
Reference in New Issue
Block a user