Skip to content

feat: support wakatime#953

Merged
ouuan merged 19 commits intomasterfrom
support-wakaTime
Aug 28, 2021
Merged

feat: support wakatime#953
ouuan merged 19 commits intomasterfrom
support-wakaTime

Conversation

@swiftqwq
Copy link
Copy Markdown
Member

@swiftqwq swiftqwq commented Aug 3, 2021

Description

Add wakatime support.

Related Issues / Pull Requests

fix #918

Motivation and Context

How Has This Been Tested?

macOS 12.0
WakaTime 13.1.0

Screenshots (if appropriate)

Screen Shot 2021-08-03 at 9 24 29 PM

Checklist

  • If the key of a setting is changed, the old attribute is updated or it is resolved in SettingsUpdater.
  • If there are changes of the text displayed in the UI, they are wrapped in tr() or QCoreApplication::translate().
  • If needed, I have opened a pull request or an issue to update the documentation.
  • If these changes are notable, they are documented in CHANGELOG.md.

Additional text

@coder3101
Copy link
Copy Markdown
Member

I am not familiar with WakaTime but from your code it seems you run a WakaTime client executable every 2 min with the path of file user is currently engaged in.

A Question:

Is it standard 2 min interval for heart beat? Any problem in making it customisable with lower limit 30s

A better approach:
Start a repeating timer that calls send heartbeat every n second instead of it being called every character press and save changes.

If there is no tab opened stop the timer, if a file is saved by user send heartbeat just before/after save.

@swiftqwq
Copy link
Copy Markdown
Member Author

swiftqwq commented Aug 3, 2021

I am not familiar with WakaTime but from your code it seems you run a WakaTime client executable every 2 min with the path of file user is currently engaged in.

A Question:

Is it standard 2 min interval for heart beat? Any problem in making it customisable with lower limit 30s

A better approach:
Start a repeating timer that calls send heartbeat every n second instead of it being called every character press and save changes.

If there is no tab opened stop the timer, if a file is saved by user send heartbeat just before/after save.

WakaTime has a guide of creating plugin and it tell me to do this.

Copy link
Copy Markdown
Member

@coder3101 coder3101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other things are fine now.

@coder3101
Copy link
Copy Markdown
Member

API key, can it be obsfucated because by storing in plain text in settings file a malicious program can steal it.

@ouuan
Copy link
Copy Markdown
Member

ouuan commented Aug 4, 2021

API key, can it be obsfucated because by storing in plain text in settings file a malicious program can steal it.

Other editors also store it in plain text. And I think there's no way to protect it unless passwords are required.

@coder3101
Copy link
Copy Markdown
Member

API key, can it be obsfucated because by storing in plain text in settings file a malicious program can steal it.

Other editors also store it in plain text. And I think there's no way to protect it unless passwords are required.

OK

I think there was already no race condition, just in case.
@ouuan ouuan added awaiting for docs Associated PR required to update the docs in cpeditor.github.io awaiting for translation:RU Associated PR is waiting for russian translations to be updated labels Aug 4, 2021
@coder3101 coder3101 enabled auto-merge (squash) August 4, 2021 06:00
@coder3101 coder3101 requested review from coder3101 and ouuan August 4, 2021 06:00
@coder3101
Copy link
Copy Markdown
Member

@swift-zym open a PR for documentation on website. Add to "Tips" and relevant "Extensions sections"

@swiftqwq
Copy link
Copy Markdown
Member Author

swiftqwq commented Aug 4, 2021

@swift-zym open a PR for documentation on website. Add to "Tips" and relevant "Extensions sections"

What should be added in "Tips" section?

@coder3101
Copy link
Copy Markdown
Member

Not required to add in tips but if you think you could present this feature as tips and it can help new users unaware about WakaTime then you can write a paragraph about it there.

@ouuan
Copy link
Copy Markdown
Member

ouuan commented Aug 4, 2021

Like CF Tool, I think it should be in the Setup section.

@swiftqwq
Copy link
Copy Markdown
Member Author

swiftqwq commented Aug 4, 2021

ouuan
ouuan previously approved these changes Aug 5, 2021
@ouuan ouuan removed the awaiting for docs Associated PR required to update the docs in cpeditor.github.io label Aug 5, 2021
@ouuan ouuan disabled auto-merge August 28, 2021 00:49
@ouuan ouuan merged commit 326420d into master Aug 28, 2021
@ouuan ouuan deleted the support-wakaTime branch August 28, 2021 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting for translation:RU Associated PR is waiting for russian translations to be updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support WakaTime

3 participants