Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuchunyang/code-stats-emacs
Code::Stats plugin for Emacs
https://github.com/xuchunyang/code-stats-emacs
Last synced: about 1 month ago
JSON representation
Code::Stats plugin for Emacs
- Host: GitHub
- URL: https://github.com/xuchunyang/code-stats-emacs
- Owner: xuchunyang
- License: gpl-3.0
- Created: 2018-07-13T16:50:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-09T21:35:42.000Z (about 4 years ago)
- Last Synced: 2024-10-16T01:46:17.883Z (3 months ago)
- Language: Emacs Lisp
- Size: 39.1 KB
- Stars: 13
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# [Code::Stats](https://codestats.net/) plugin for Emacs
[![Melpa](https://melpa.org/packages/code-stats-badge.svg)](https://melpa.org/#/code-stats)## Setup
Sample configuration:
``` emacs-lisp
(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:
```emacs-lisp
(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/## Requires
- Emacs 25.1
- Package [request](https://github.com/tkf/emacs-request)