Code::Stats plugin for Emacs
Sample configuration:
(setq code-stats-token "your-token")
(add-hook 'prog-mode-hook #'code-stats-mode)
(run-with-idle-timer 30 t #'code-stats-sync)
(add-hook 'kill-emacs-hook (lambda () (code-stats-sync :wait)))
-
The variable
code-stats-token
should store your API token. You should keep the token privately, an idea is using auth-source, put your API token to~/.authinfo[.gpg]
, e.g.,machine codestats.net password your-token
then retrieve it:
(setq code-stats-token (auth-source-pick-first-password :host "codestats.net"))
-
The buffer-local minor mode
code-stats-token
tracks codestats for current buffer. -
the function
code-stats-sync
syncs codestats to https://codestats.net/
- Emacs 25.1
- Package request