-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ff24d85
Showing
1,876 changed files
with
180,867 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
WakaTime is written and maintained by Alan Hamlett and | ||
various contributors: | ||
|
||
|
||
Development Lead | ||
---------------- | ||
|
||
- Alan Hamlett <alan.hamlett@gmail.com> | ||
|
||
|
||
Patches and Suggestions | ||
----------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
History | ||
------- | ||
|
||
|
||
1.0.0 (2016-06-07) | ||
++++++++++++++++++ | ||
|
||
- Birth | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 2016 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# sketch-wakatime | ||
|
||
Time tracking and metrics automatically generated from your Sketch usage. | ||
|
||
Note: Only works with Sketch 3.8 and newer. Download Sketch 3.8 Beta [here](http://www.sketchapp.com/beta/). | ||
|
||
|
||
## Installation | ||
|
||
|
||
1. Download the [latest plugin release](https://github.com/wakatime/sketch-wakatime/releases/latest). | ||
|
||
2. Unzip the file. | ||
|
||
3. Open the WakaTime.sketch-plugin file to install the plugin. | ||
|
||
4. Use Sketch like you normally do and your time will automatically be tracked for you. | ||
|
||
5. Enter your [api key](https://wakatime.com/settings#apikey) if prompted. | ||
|
||
6. Visit <https://wakatime.com> to see your logged time. | ||
|
||
|
||
## Screen Shots | ||
|
||
![Project Overview](https://wakatime.com/static/img/ScreenShots/Screen-Shot-2016-03-21.png) | ||
|
||
|
||
## Configuring | ||
|
||
To change your api key, copy it from your [Settings page](https://wakatime.com/settings#apikey), then paste into Sketch `Plugins -> WakaTime`. | ||
|
||
Additional settings are in `$HOME/.wakatime.cfg` for [wakatime cli](https://github.com/wakatime/wakatime#configuring). | ||
|
||
|
||
|
||
For more general troubleshooting information, see [wakatime/wakatime#troubleshooting](https://github.com/wakatime/wakatime#troubleshooting). | ||
|
||
|
||
## Troubleshooting | ||
|
||
The Sketch plugin logs errors to `/var/log/system.log` and `~/.wakatime.log`. | ||
|
||
For more general troubleshooting information, see [wakatime/wakatime#troubleshooting](https://github.com/wakatime/wakatime#troubleshooting). |
9 changes: 9 additions & 0 deletions
9
WakaTime.sketchplugin/Contents/Resources/wakatime/__about__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
__title__ = 'wakatime' | ||
__description__ = 'Common interface to the WakaTime api.' | ||
__url__ = 'https://github.com/wakatime/wakatime' | ||
__version_info__ = ('6', '0', '3') | ||
__version__ = '.'.join(__version_info__) | ||
__author__ = 'Alan Hamlett' | ||
__author_email__ = 'alan@wakatime.com' | ||
__license__ = 'BSD' | ||
__copyright__ = 'Copyright 2016 Alan Hamlett' |
Binary file not shown.
17 changes: 17 additions & 0 deletions
17
WakaTime.sketchplugin/Contents/Resources/wakatime/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 .main import execute |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
wakatime.cli | ||
~~~~~~~~~~~~ | ||
Command-line entry point. | ||
:copyright: (c) 2013 Alan Hamlett. | ||
:license: BSD, see LICENSE for more details. | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
|
||
# get path to local wakatime package | ||
package_folder = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
|
||
# add local wakatime package to sys.path | ||
sys.path.insert(0, package_folder) | ||
|
||
# import local wakatime package | ||
try: | ||
import wakatime | ||
except (TypeError, ImportError): | ||
# on Windows, non-ASCII characters in import path can be fixed using | ||
# the script path from sys.argv[0]. | ||
# More info at https://github.com/wakatime/wakatime/issues/32 | ||
package_folder = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
sys.path.insert(0, package_folder) | ||
import wakatime | ||
|
||
|
||
if __name__ == '__main__': | ||
sys.exit(wakatime.execute(sys.argv[1:])) |
93 changes: 93 additions & 0 deletions
93
WakaTime.sketchplugin/Contents/Resources/wakatime/compat.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
wakatime.compat | ||
~~~~~~~~~~~~~~~ | ||
For working with Python2 and Python3. | ||
:copyright: (c) 2014 Alan Hamlett. | ||
:license: BSD, see LICENSE for more details. | ||
""" | ||
|
||
import codecs | ||
import sys | ||
|
||
|
||
is_py2 = (sys.version_info[0] == 2) | ||
is_py3 = (sys.version_info[0] == 3) | ||
|
||
|
||
if is_py2: # pragma: nocover | ||
|
||
def u(text): | ||
if text is None: | ||
return None | ||
try: | ||
return text.decode('utf-8') | ||
except: | ||
try: | ||
return text.decode(sys.getdefaultencoding()) | ||
except: | ||
try: | ||
return unicode(text) | ||
except: | ||
return text | ||
open = codecs.open | ||
basestring = basestring | ||
|
||
|
||
elif is_py3: # pragma: nocover | ||
|
||
def u(text): | ||
if text is None: | ||
return None | ||
if isinstance(text, bytes): | ||
try: | ||
return text.decode('utf-8') | ||
except: | ||
try: | ||
return text.decode(sys.getdefaultencoding()) | ||
except: | ||
pass | ||
try: | ||
return str(text) | ||
except: | ||
return text | ||
open = open | ||
basestring = (str, bytes) | ||
|
||
|
||
try: | ||
from importlib import import_module | ||
except ImportError: # pragma: nocover | ||
def _resolve_name(name, package, level): | ||
"""Return the absolute name of the module to be imported.""" | ||
if not hasattr(package, 'rindex'): | ||
raise ValueError("'package' not set to a string") | ||
dot = len(package) | ||
for x in xrange(level, 1, -1): | ||
try: | ||
dot = package.rindex('.', 0, dot) | ||
except ValueError: | ||
raise ValueError("attempted relative import beyond top-level " | ||
"package") | ||
return "%s.%s" % (package[:dot], name) | ||
|
||
def import_module(name, package=None): | ||
"""Import a module. | ||
The 'package' argument is required when performing a relative import. | ||
It specifies the package to use as the anchor point from which to | ||
resolve the relative import to an absolute import. | ||
""" | ||
if name.startswith('.'): | ||
if not package: | ||
raise TypeError("relative imports require the 'package' " | ||
+ "argument") | ||
level = 0 | ||
for character in name: | ||
if character != '.': | ||
break | ||
level += 1 | ||
name = _resolve_name(name[level:], package, level) | ||
__import__(name) | ||
return sys.modules[name] |
Binary file not shown.
18 changes: 18 additions & 0 deletions
18
WakaTime.sketchplugin/Contents/Resources/wakatime/constants.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
wakatime.constants | ||
~~~~~~~~~~~~~~~~~~ | ||
Constant variable definitions. | ||
:copyright: (c) 2016 Alan Hamlett. | ||
:license: BSD, see LICENSE for more details. | ||
""" | ||
|
||
|
||
SUCCESS = 0 | ||
API_ERROR = 102 | ||
CONFIG_FILE_PARSE_ERROR = 103 | ||
AUTH_ERROR = 104 | ||
UNKNOWN_ERROR = 105 | ||
MALFORMED_HEARTBEAT_ERROR = 106 |
Binary file not shown.
Oops, something went wrong.