Skip to content

Commit

Permalink
Sending heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
gandarez committed Aug 21, 2015
1 parent cc80ace commit 602172f
Show file tree
Hide file tree
Showing 12 changed files with 1,114 additions and 44 deletions.
15 changes: 15 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
WakaTime is written and maintained by Alan Hamlett and
various contributors:


Development Lead
----------------

- Carlos Henrique <[email protected]>


Patches and Suggestions
-----------------------

- Alan Hamlett <[email protected]>

51 changes: 51 additions & 0 deletions Downloader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System.Diagnostics;
using System.IO.Compression;
using System.Net;

namespace WakaTime
{
class Downloader
{
static public void DownloadCli(string url, string dir)
{
Logger.Debug("Downloading wakatime cli...");

var client = new WebClient();
var localZipFile = dir + "\\wakatime-cli.zip";

// Download wakatime cli
client.DownloadFile(url, localZipFile);

Logger.Debug("Finished downloading wakatime cli.");

// Extract wakatime cli zip file
ZipFile.ExtractToDirectory(localZipFile, dir);
}

static public void DownloadPython(string url, string dir)
{
Logger.Debug("Downloading python...");

var localFile = dir + "\\python.msi";

var client = new WebClient();
client.DownloadFile(url, localFile);

Logger.Debug("Finished downloading python.");

var arguments = "/i \"" + localFile + "\"";
arguments = arguments + " /norestart /qb!";

var procInfo = new ProcessStartInfo
{
UseShellExecute = false,
RedirectStandardError = true,
FileName = "msiexec",
CreateNoWindow = true,
Arguments = arguments
};

Process.Start(procInfo);
}
}
}
659 changes: 659 additions & 0 deletions Forms/APIKeyForm.resx

Large diffs are not rendered by default.

124 changes: 124 additions & 0 deletions Forms/ApiKeyForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions Forms/ApiKeyForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using System;
using System.Windows.Forms;

namespace WakaTime.Forms
{
public partial class ApiKeyForm : Form
{
private readonly WakaTimeConfigFile _wakaTimeConfigFile;

public ApiKeyForm()
{
InitializeComponent();

_wakaTimeConfigFile = new WakaTimeConfigFile();
}

private void ApiKeyForm_Load(object sender, EventArgs e)
{
try
{
txtAPIKey.Text = _wakaTimeConfigFile.ApiKey;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void btnOk_Click(object sender, EventArgs e)
{
try
{
Guid apiKey;
var parse = Guid.TryParse(txtAPIKey.Text.Trim(), out apiKey);
if (parse)
{
_wakaTimeConfigFile.ApiKey = apiKey.ToString();
_wakaTimeConfigFile.Save();
WakaTime.ApiKey = apiKey.ToString();
}
else
{
MessageBox.Show("Please enter valid Api Key.");
DialogResult = DialogResult.None; // do not close dialog box
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

}
}
10 changes: 10 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

History
-------


1.0.0 (2015-08-12)
++++++++++++++++++

- Birth

31 changes: 31 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ssms-wakatime
=====================

WakaTime is a productivity & time tracking tool for programmers. Once the WakaTime plugin is installed, you get a dashboard with reports about your programming by time, language, project, and branch.


Installation
------------

1. Inside regedit.exe go to -> `HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0_Config\AutomationOptions\LookInFolders`

2. Copy WakaTime.Addin to one of those folders (I recommend you to copy into `C:\ProgramData\Application Data\Microsoft\MSEnvShared\Addins`)

3. Edit WakaTime.Addin and change the node Extensibility/Addin/Assembly to the full path of WakaTime.dll you downloaded

4. Enter your [api key](https://wakatime.com/settings#apikey), then press `enter`.

5. Use SQL Server Management Studio like you normally do and your time will be tracked for you automatically.

6. Visit https://wakatime.com to see your logged time.


Screen Shots
------------

![Project Overview](https://wakatime.com/static/img/ScreenShots/ScreenShot-2014-10-29.png)
Binary file modified WakaTime.AddIn
Binary file not shown.
Loading

0 comments on commit 602172f

Please sign in to comment.